emacs: Use full profile name in Guix buffer names.
* emacs/guix-ui.el (guix-ui-buffer-name-default): Rename to... (guix-ui-buffer-name-short): ... this. (guix-ui-buffer-name-full): New procedure. (guix-ui-buffer-name-function): Set it as default.
This commit is contained in:
parent
6ea80938ae
commit
117195c28d
@ -105,10 +105,11 @@ If `all', update all Guix buffers (not recommended)."
|
|||||||
:group 'guix-ui)
|
:group 'guix-ui)
|
||||||
|
|
||||||
(defcustom guix-ui-buffer-name-function
|
(defcustom guix-ui-buffer-name-function
|
||||||
#'guix-ui-buffer-name-default
|
#'guix-ui-buffer-name-full
|
||||||
"Function used to define a name of a Guix buffer.
|
"Function used to define a name of a Guix buffer.
|
||||||
The function is called with 2 arguments: BASE-NAME and PROFILE."
|
The function is called with 2 arguments: BASE-NAME and PROFILE."
|
||||||
:type '(choice (function-item guix-ui-buffer-name-default)
|
:type '(choice (function-item guix-ui-buffer-name-full)
|
||||||
|
(function-item guix-ui-buffer-name-short)
|
||||||
(function-item guix-ui-buffer-name-simple)
|
(function-item guix-ui-buffer-name-simple)
|
||||||
(function :tag "Other function"))
|
(function :tag "Other function"))
|
||||||
:group 'guix-ui)
|
:group 'guix-ui)
|
||||||
@ -117,11 +118,15 @@ The function is called with 2 arguments: BASE-NAME and PROFILE."
|
|||||||
"Return BASE-NAME."
|
"Return BASE-NAME."
|
||||||
base-name)
|
base-name)
|
||||||
|
|
||||||
(defun guix-ui-buffer-name-default (base-name profile)
|
(defun guix-ui-buffer-name-short (base-name profile)
|
||||||
"Return buffer name by appending BASE-NAME and PROFILE's base file name."
|
"Return buffer name by appending BASE-NAME and PROFILE's base file name."
|
||||||
(guix-compose-buffer-name base-name
|
(guix-compose-buffer-name base-name
|
||||||
(file-name-base (directory-file-name profile))))
|
(file-name-base (directory-file-name profile))))
|
||||||
|
|
||||||
|
(defun guix-ui-buffer-name-full (base-name profile)
|
||||||
|
"Return buffer name by appending BASE-NAME and PROFILE's full name."
|
||||||
|
(guix-compose-buffer-name base-name profile))
|
||||||
|
|
||||||
(defun guix-ui-buffer-name (base-name profile)
|
(defun guix-ui-buffer-name (base-name profile)
|
||||||
"Return Guix buffer name based on BASE-NAME and profile.
|
"Return Guix buffer name based on BASE-NAME and profile.
|
||||||
See `guix-ui-buffer-name-function' for details."
|
See `guix-ui-buffer-name-function' for details."
|
||||||
|
Loading…
Reference in New Issue
Block a user