unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Damien Cassou <damien@cassou.me>
Cc: 57816@debbugs.gnu.org
Subject: bug#57816: 28.2; Renaming a help buffer from help-mode-hook
Date: Fri, 16 Sep 2022 13:51:26 +0200	[thread overview]
Message-ID: <87wna38rlt.fsf@gnus.org> (raw)
In-Reply-To: <87leqlqmc2.fsf@cassou.me> (Damien Cassou's message of "Thu, 15 Sep 2022 06:43:25 +0200")

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	other threads:[~2022-09-16 11:51 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-15  4:43 bug#57816: 28.2; Renaming a help buffer from help-mode-hook Damien Cassou
2022-09-16 11:51 ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wna38rlt.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=57816@debbugs.gnu.org \
    --cc=damien@cassou.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).