bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#57816: 28.2; Renaming a help buffer from help-mode-hook


From: Lars Ingebrigtsen
Subject: bug#57816: 28.2; Renaming a help buffer from help-mode-hook
Date: Fri, 16 Sep 2022 13:51:26 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

Damien Cassou <damien@cassou.me> writes:

> In GNU Emacs 28.2, I would like to automatically rename help buffers so
> their name reflect their content. For example, I want *Help: car*
> instead of just *Help* for the help buffer of `car'. Unfortunately,
> adding #'rename-buffer to `help-mode-hook' doesn't work as this results
> in 2 buffers instead of just one:
>
>   emacs --batch -Q \
>     --eval "(add-hook 'help-mode-hook (lambda () (rename-buffer \"*foo*\")))" 
> \
>     --eval "(describe-function #'describe-function)" \
>     --eval "(prin1 (cons (get-buffer \"*Help*\") (get-buffer \"*foo*\")))"
>
> prints
>
>   (#<buffer *Help*> . #<buffer *foo*>)
>
> After the "rename", there is still a buffer with the old name. Is there
> a more correct way to do this?

I can reproduce this in Emacs 28.2, but not in Emacs 29, so it looks
like this has been fixed already.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]