I am starting to use "rename-uniquely" for help buffers so I can see multiple function helps at the same time.

However, what I get is:



What I would like is:

  1. Does something similar exist?
  2. Is there an easy way to get properties from the help buffer? I am thinking the symbol that was requested, and the symbol type would be most useful.
  • You can use rename-buffer to rename the buffer, but you'll have to provide the name explicitly. You might want to advise rename-buffer with a uniquification function. E.g. by default, in emacs-27 (at least - I haven't checked when it was added) rename-buffer is given an around-advice of uniquify--rename-buffer-advice which doesn't do what you want but is similar in spirit. You might want to check out uniquify.el which implements this function. – NickD Aug 12 '18 at 21:53
  • FWIW, I bind rename-buffer to a key. I like to give my own names to help buffers etc. – Drew Aug 13 '18 at 0:16
  • 1
    In that case, is there a better way to get the function or variable that a help buffer is displaying than using regular expressions? – Realraptor Aug 13 '18 at 0:57

I don't see anything built-in for doing this, but the following might do what you need:

(defun get-help-name ()
    (goto-char 1)
    (thing-at-point 'symbol)))

(defun rename-help-buffer ()
  (rename-buffer (concat "*Help: "
                         " *")))

I haven't included any logic to check to see that you're actually in a help buffer, or to add the v or f flags, but maybe that's enough, or enough to get you started.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.