Uniqifying emacs apps

1 · Shane Mulligan · Sept. 17, 2019, noon
The problem Many useful emacs apps can only have one instance running at a time due to working with a fixed buffer name. Examples of useful apps which you can only run one of eww Perl-REPL dictionary-search calculator The fix: rename the buffer to tack on a hash after it is created Create the advice function (defun unique-buffer-generic-after-advice (&rest args) "Give the buffer a unique name" (ignore-errors (let* ((hash (short-hash (str (time-to-seconds)))) (new-buffer-name (pcre-replace-s...