Variable: ghostel-buffer-name-function

ghostel-buffer-name-function is a customizable variable defined in ghostel.el.

Value

nil

Documentation

Function returning the ghostel buffer name, or nil to leave it unchanged.

Called in the ghostel buffer with one argument, the terminal TITLE (the OSC 2 string; nil when the terminal has no title), on both a title change and a cd (OSC 7). A title clear (empty OSC 0/2) reverts a title-derived name to the buffer's original name. Read default-directory for the current directory. Renames the buffer to the returned string, declining after a manual rename. The mode line shows the title independently of this variable; see ghostel-buffer-identification-format.

Aliases

ghostel-set-title-function (obsolete since 0.32.0)

Source Code

;; Defined in /nix/store/1252krff0gb2kisjcpp45m50cpdskfrl-emacs-packages-deps/share/emacs/site-lisp/ghostel.el
(defcustom ghostel-buffer-name-function nil
  "Function returning the ghostel buffer name, or nil to leave it unchanged.
Called in the ghostel buffer with one argument, the terminal TITLE (the
OSC 2 string; nil when the terminal has no title), on both a title change
and a `cd' \(OSC 7).  A title clear (empty OSC 0/2) reverts a
title-derived name to the buffer's original name.
Read `default-directory' for the current directory.
Renames the buffer to the returned string, declining after a manual rename.
The mode line shows the title independently of this variable;
see `ghostel-buffer-identification-format'."
  :type '(choice (const :tag "Disabled" nil)
                 (function-item :tag "By title — *ghostel: TITLE*"
                                ghostel-buffer-name-by-title)
                 (function-item :tag "By directory — *ghostel: DIR*"
                                ghostel-buffer-name-by-directory)
                 (function :tag "Custom function")))