package ecaml

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

A minibuffer is a special buffer that Emacs commands use to read arguments more complicated than the single numeric prefix argument. These arguments include file names, buffer names, and command names (as in M-x). The minibuffer is displayed on the bottom line of the frame, in the same place as the echo area, but only while it is in use for reading an argument.

(Info-goto-node "(elisp)Minibuffers")

module Y_or_n_with_timeout : sig ... end
module History : sig ... end
val history : History.t

history is the default history list used when reading from the minibuffer.

module History_length : sig ... end
val history_length : History_length.t Customization.t

(describe-variable 'history-length)

val read_from : prompt:string -> ?initial_contents:string -> ?default_value:string -> history:History.t -> ?history_pos:int -> unit -> string Async.Deferred.t

(describe-function 'read-from-minibuffer) (Info-goto-node "(elisp)Text from Minibuffer")

val y_or_n : prompt:string -> bool Async.Deferred.t

(describe-function 'y-or-n-p) (Info-goto-node "(elisp)Yes-or-No Queries")

val y_or_n_with_timeout : prompt:string -> timeout:(Core.Time_ns.Span.t * 'a) -> 'a Y_or_n_with_timeout.t Async.Deferred.t

(describe-function 'y-or-n-p-with-timeout) (Info-goto-node "(elisp)Yes-or-No Queries")

val yes_or_no : prompt:string -> bool Async.Deferred.t

(describe-function 'yes-or-no-p) (Info-goto-node "(elisp)Yes-or-No Queries")

val exit_hook : Hook.normal Hook.t

(describe-variable 'minibuffer-exit-hook) (Info-goto-node "(elisp)Minibuffer Misc")

val setup_hook : Hook.normal Hook.t

(describe-variable 'minibuffer-setup-hook) (Info-goto-node "(elisp)Minibuffer Misc")

val active_window : unit -> Window.t option

(describe-function 'active-minibuffer-window)

val prompt : unit -> string option

(describe-function 'minibuffer-prompt)

val exit : unit -> Core.never_returns

(describe-function 'exit-minibuffer)

This exits the minibuffer by throwing 'exit, so from OCaml's perspective it always raises.

val depth : unit -> int

(describe-function 'minibuffer-depth)

val contents : unit -> string

(describe-function 'minibuffer-contents)

Note: if the current buffer is not a minibuffer, contents returns its contents too.