docs(emacs/misc): set custom function for Elcord buffer name

This commit is contained in:
Lucien Cartier-Tilet 2025-03-02 14:18:44 +01:00
parent 316aabe413
commit c2ebc0db51
Signed by: phundrak
GPG Key ID: 347803E8073EACE0

View File

@ -67,6 +67,13 @@ Lets give ~calc-mode~ some better defaults.
** Elcord
Whats the point of using Emacs if you cant tell everyone?
#+begin_src emacs-lisp
(defun my/elcord-buffer-details-format ()
"Return the buffer details string shown on Discord."
(format "Editing %s"
(if (projectile-project-p default-directory)
(f-relative (buffer-file-name) (projectile-project-root))
(buffer-name))))
(use-package elcord
:straight (:built t)
:defer t
@ -76,7 +83,8 @@ Whats the point of using Emacs if you cant tell everyone?
elcord-boring-buffers-regexp-list `("^ "
,(rx "*" (+ any) "*")
,(rx bol (or "Re: "
"Fwd: ")))))
"Fwd: ")))
elcord-buffer-details-format-function #'my/elcord-buffer-details-format))
#+end_src
** Elpher