From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Okam Newsgroups: gmane.emacs.help Subject: Re: Command `vc-annotate' runs `help-mode-hook'? Date: Fri, 16 Oct 2020 21:06:10 +0000 Message-ID: <1ab7d3c0-a11e-f464-2a37-c2b9460c3d38@protonmail.com> References: <87a6wpqpic.fsf@web.de> Reply-To: Okam Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="18841"; mail-complaints-to="usenet@ciao.gmane.io" Cc: help-gnu-emacs@gnu.org To: Michael Heerdegen Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Oct 16 23:07:06 2020 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kTWwM-0004nu-EK for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 16 Oct 2020 23:07:06 +0200 Original-Received: from localhost ([::1]:46422 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kTWwL-000087-GZ for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 16 Oct 2020 17:07:05 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35554) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTWvb-00007w-Id for help-gnu-emacs@gnu.org; Fri, 16 Oct 2020 17:06:19 -0400 Original-Received: from mail1.protonmail.ch ([185.70.40.18]:10142) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kTWvZ-0004dc-QB for help-gnu-emacs@gnu.org; Fri, 16 Oct 2020 17:06:19 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail; t=1602882374; bh=tAq2biHvbp49DGlSfz32Qgf3BChQGBvN3HgGqtRjqHQ=; h=Date:To:From:Cc:Reply-To:Subject:In-Reply-To:References:From; b=KJH1fuAflv8wgED0gyvBOW+HI00SRwi79e/yev9YyvnGbytfIt4qb+l+CuIAAZ/Oj KZvK9DwAl8LVDPTs5UKaHeM2f8oGgZybTZxVmkXh7agD1oyZNTE5xV+Zsk7IKvtFJm D/43VrlUu9O0HYThImqyrsLM5pZgk5wZRg2XGB+A= In-Reply-To: <87a6wpqpic.fsf@web.de> Received-SPF: pass client-ip=185.70.40.18; envelope-from=okamsn@protonmail.com; helo=mail1.protonmail.ch X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/16 17:06:14 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.io gmane.emacs.help:124513 Archived-At: On 10/14/20 2:40 AM, Michael Heerdegen wrote: >> I was trying to add a function to `help-mode-hook' to automatically >> rename the "*Help*" buffer. >=20 > May I ask why you want to rename it? I guess it could cause other > problems. I found a package that renamed Help buffers to include the name of the=20 variable/function being shown, but saw that this broke `vc-annotate'=20 This is helpful when I want to refer to multiple "*Help*" buffers. >> Why does `vc-annotate' run `help-mode-hook' >=20 > That probably comes from `vc-annotate' calling > `with-output-to-temp-buffer'. I don't recall why it had been decided > that this macro performs help-mode setup, but it does. Thank you. >> and is there a good way of detecting this and similar cases? >=20 > You could look at the buffer name? The answer depends on the set of > cases you want to handle. This makes sense. I wasn't sure whether doing so would also have=20 unexpected behavior. With thanks, Okam