Module Ecaml.Buffer
Buffers are used to hold the contents of files that are being visited; there may also be buffers that are not visiting files.
(Info-goto-node "(elisp)Buffers")
include Ecaml__.Import0.Value.Subtype with type t = Ecaml__.Buffer0.t
type valuetype t= Ecaml__.Buffer0.tWe expose
private valuefor free identity conversions when the value is nested in some covariant type, e.g.(symbols : Symbol.t list :> Value.t list)rather thanList.map symbols ~f:Symbol.to_value.
val sexp_of_t : t -> Ppx_sexp_conv_lib.Sexp.t
val eq : t -> t -> booleq t1 t2 = Value.eq (to_value t1) (to_value t2), i.e.eqchecks whether the Emacs values underlyingt1andt2are physically equal. This is different thanphys_equal t1 t2, because we don't always wrapeqEmacs values inphys_equalOCaml values. I.e.phys_equal t1 t2implieseq t1 t2, but not the converse.
val is_in_subtype : value -> bool
include Ecaml_value__.Valueable0.S with type t := t
val of_value_exn : Ecaml_value__.Value0.t -> tval to_value : t -> Ecaml_value__.Value0.tval type_ : t type_
type buffer= t
module Compare_by_name : Core_kernel.Comparable.S_plain with type t = tval file_name : t -> string option(describe-function 'buffer-file-name)
val is_live : t -> bool(describe-function 'buffer-live-p)
val name : t -> string option(describe-function 'buffer-name)
val process : t -> Ecaml__.Process0.t option(describe-function 'get-buffer-process)
val process_exn : t -> Ecaml__.Process0.tval all_live : unit -> t listall_livereturns a list of all live buffers.(describe-function 'buffer-list).
val create : name:string -> tcreate ~namecreates a new buffer with namename, adjusting the name if necessary to make the buffer's name unique.(describe-function 'generate-new-buffer).
val find : name:string -> t optionfind ~namereturns the live buffer whose name isname, if any.(describe-function 'get-buffer).
val find_visiting : file:Ecaml__.Ecaml_filename.Filename.t -> t option(describe-function 'get-file-buffer).(Info-goto-node "(elisp)Buffer File Name")
val find_or_create : name:string -> tfind ~namereturns the live buffer whose name isname, and if there is no such buffer, creates it.(describe-function 'get-buffer-create).
val kill : t -> unitkill tkillst, so thatnot (is_live t).(describe-function 'kill-buffer).
val displayed_in : ?current_frame_only:bool -> t -> Ecaml__.Window0.t listReturn a list of all windows on the current terminal that are displaying the given buffer.
(describe-function 'get-buffer-window-list)
val display : t -> unit(Info-goto-node "(elisp)Choosing Window")(describe-function 'display-buffer)
val buffer_local_value : t -> 'a Var.t -> 'a(describe-function 'buffer-local-value)(Info-goto-node "(elisp)Creating Buffer-Local")
val buffer_local_variables : t -> (Symbol.t * Ecaml__.Import0.Value.t option) list(describe-function 'buffer-local-variables)(Info-goto-node "(elisp)Creating Buffer-Local")
val find_file_noselect : Ecaml__.Ecaml_filename.Filename.t -> t(describe-function 'find-file-noselect)(Info-goto-node "(elisp)Visiting Functions")See also
Selected_window.find_file.
val is_internal_or_dead : t -> boolFrom
(Info-goto-node "(emacs)Select Buffer"):Emacs uses buffer names that start with a space for internal purposes. It treats these buffers specially in minor ways---for example, by default they do not record undo information. It is best to avoid using such buffer names yourself.
As dead buffers have no names, it is unknown whether a dead buffer was internal.
module Which_buffers : sig ... endval save_some : ?query:bool -> ?which_buffers:Which_buffers.t -> unit -> unit(describe-function 'save-some-buffers)(Info-goto-node "(elisp)Saving Buffers")
val with_temp_buffer : (t -> 'a) -> 'a