There are, in general, many buffers in an Emacs session. At any time, one of them is designated as the "current buffer". This is the buffer in which most editing takes place, because most of the primitives for examining or changing text in a buffer operate implicitly on the current buffer. Normally the buffer that is displayed on the screen in the selected window is the current buffer, but this is not always so: a program can temporarily designate any buffer as current in order to operate on its contents, without changing what is displayed on the screen.
(Info-goto-node "(elisp)Current Buffer").
val directory : Filename.t Var.t(describe-variable 'default-directory)(Info-goto-node "(elisp)File Name Expansion")
val undo_list : unit ‑> Value.t(describe-variable 'buffer-undo-list)(Info-goto-node "(elisp)Undo")(Info-goto-node "(elisp)Maintaining Undo")
val file_name : unit ‑> string option(describe-function 'buffer-file-name)(Info-goto-node "(elisp)Buffer File Name")
val file_name_var : Filename.t Var.t(describe-variable 'buffer-file-name)(Info-goto-node "(elisp)Buffer File Name")
val add_undo_boundary : unit ‑> unit(describe-function 'undo-boundary)(Info-goto-node "(elisp)Undo")
val set_temporarily : Buffer.t ‑> f:(unit ‑> 'a) ‑> 'aset_temporarily t ~f runs f with the current buffer set to t.
(describe-function 'with-current-buffer).
val set_temporarily_to_temp_buffer : (unit ‑> 'a) ‑> 'aset_temporarily_to_temp_buffer f creates a temporary buffer and runs f with the
current buffer set to the temporary buffer. (describe-function 'with-temp-buffer).
val read_only : bool Var.t(describe-variable 'buffer-read-only)(Info-goto-node "(elisp)Read-Only Buffers")
val transient_mark_mode : bool Var.t(describe-variable 'transient-mark-mode)(describe-function 'transient-mark-mode)(Info-goto-node "(elisp)The Mark")
val major_mode : unit ‑> Major_mode.t(describe-variable 'major-mode)(Info-goto-node "(elisp)Auto Major Mode")
val change_major_mode : Major_mode.t ‑> unitval set_value_temporarily : 'a Var.t ‑> 'a ‑> f:(unit ‑> 'b) ‑> 'bval set_values_temporarily : Var.And_value.t list ‑> f:(unit ‑> 'a) ‑> 'aval make_buffer_local : _ Var.t ‑> unit(describe-function 'make-local-variable)(Info-goto-node "(elisp)Creating Buffer-Local")
val is_buffer_local : _ Var.t ‑> bool(describe-function 'local-variable-p)(Info-goto-node "(elisp)Creating Buffer-Local")
val is_buffer_local_if_set : _ Var.t ‑> bool(describe-function 'local-variable-if-set-p)(Info-goto-node "(elisp)Creating Buffer-Local")
val kill_buffer_local : _ Var.t ‑> unit(describe-function 'kill-local-variable)(Info-goto-node "(elisp)Creating Buffer-Local")
val local_keymap : unit ‑> Keymap.t option(describe-function 'current-local-map)(Info-goto-node "(elisp)Controlling Active Maps")
val set_local_keymap : Keymap.t ‑> unit(describe-function 'use-local-map)(Info-goto-node "(elisp)Controlling Active Maps")
val minor_mode_keymaps : unit ‑> Keymap.t list(describe-function 'current-minor-mode-maps)(Info-goto-node "(elisp)Controlling Active Maps")
val contents : ?start:Position.t ‑> ?end_:Position.t ‑> ?text_properties:bool ‑> unit ‑> Text.t(describe-function 'buffer-substring)(describe-function 'buffer-substring-no-properties)
val delete_region : start:Position.t ‑> end_:Position.t ‑> unit(describe-function 'delete-region)(Info-goto-node "(elisp)Deletion")
val set_multibyte : bool ‑> unit(describe-function 'set-buffer-multibyte).
(Info-goto-node "(elisp)Selecting a Representation").
val rename_exn : ?unique:bool ‑> unit ‑> name:string ‑> unitrename_exn renames the current buffer, raising if name is already taken and
unique = false; with unique = true it generates a new name. (describe-function
'rename-buffer).
val set_text_property : ?start:Position.t ‑> ?end_:Position.t ‑> 'a Text.Property_name.t ‑> 'a ‑> unit(describe-function 'put-text-property)(Info-goto-node "(elisp)Changing Properties").
val set_text_property_staged : 'a Text.Property_name.t ‑> 'a ‑> (start:int ‑> end_:int ‑> unit) Core_kernel.Staged.tset_text_property_staged is an optimization of set_text_property for the same text
property on a number of regions, where the positions are ints. It precomputes the
Elisp property value once, and reuses it for each region.
val set_text_properties : ?start:Position.t ‑> ?end_:Position.t ‑> Text.Property.t list ‑> unit(describe-function 'set-text-properties)(Info-goto-node "(elisp)Changing Properties").
val set_text_properties_staged : Text.Property.t list ‑> (start:int ‑> end_:int ‑> unit) Core_kernel.Staged.tset_text_properties_staged is an optimization of set_text_properties for the same
text property on a number of regions, where the positions are ints. It precomputes
the Elisp property value once, and reuses it for each region.
val add_text_properties : ?start:Position.t ‑> ?end_:Position.t ‑> Text.Property.t list ‑> unit(describe-function 'add-text-properties)(Info-goto-node "(elisp)Changing Properties").
val add_text_properties_staged : Text.Property.t list ‑> (start:int ‑> end_:int ‑> unit) Core_kernel.Staged.tadd_text_properties_staged is an optimization of add_text_properties for the same
text property on a number of regions, where the positions are ints. It precomputes
the Elisp property value once, and reuses it for each region.
val text_property_is_present : ?start:Position.t ‑> ?end_:Position.t ‑> _ Text.Property_name.t ‑> booltext_property_is_present property_name returns true if any text in the region from
start to end_ uses property_name. (describe-function
'text-property-not-all)
val set_marker_position : Marker.t ‑> Position.t ‑> unit(describe-function 'set-marker)(Info-goto-node "(elisp)Moving Markers")
val deactivate_mark : unit ‑> unit(describe-function 'deactivate-mark)(Info-goto-node "(elisp)The Mark")
val syntax_class : Char_code.t ‑> Syntax_table.Class.t(describe-function 'char-syntax)(Info-goto-node "(elisp)Syntax Table Functions")
val syntax_table : unit ‑> Syntax_table.t(describe-function 'syntax-table)(Info-goto-node "(elisp)Syntax Table Functions")
val set_syntax_table : Syntax_table.t ‑> unit(describe-function 'set-syntax-table)(Info-goto-node "(elisp)Syntax Table Functions")
val delete_lines_matching : ?start:Position.t ‑> ?end_:Position.t ‑> Regexp.t ‑> unit(describe-function 'flush-lines)
val sort_lines : ?start:Position.t ‑> ?end_:Position.t ‑> unit ‑> unit(describe-function 'sort-lines)(Info-goto-node "(elisp)Sorting")
val delete_duplicate_lines : ?start:Position.t ‑> ?end_:Position.t ‑> unit ‑> unit(describe-function 'delete-duplicate-lines)
val indent_region : ?start:Position.t ‑> ?end_:Position.t ‑> unit ‑> unit(describe-function 'indent-region)(Info-goto-node "(elisp)Region Indent")