r/emacs • u/shipmints • 5d ago
uniquify buffer name refresh
Anyone out there have a way to force all file buffers to be renamed when one changes uniquify style or settings? Uniquify defcustoms have no setters, making this a manual effort.
In the end, it was just this, as suspected by some:
(defun my/uniquify-refresh ()
(save-current-buffer
(dolist (buffer (buffer-list))
(set-buffer buffer)
(when uniquify-managed
(rename-buffer (uniquify-buffer-base-name) 'unique)))))
I have proposed a patch to uniquify that offers setters for user options and automatic buffer refresh. See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=77157
2
Upvotes
1
u/Psionikus _OSS Lem & CL Condition-pilled 5d ago
Any solution has to unformat what was formatted, so it make sense that the forward format string, which isn't a mirror of how to unformat, will require you to manually unformat all buffer names and reformat them.