Module Ecaml.Minibuffer

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 Var.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_kernel.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_kernel.never_returns

(describe-function 'exit-minibuffer)

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