From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bug-reference auto-setup for Rmail (please test) Date: Sun, 16 May 2021 12:19:15 +0300 Message-ID: <83h7j3ujcc.fsf@gnu.org> References: <87eee75d8n.fsf@gnu.org> <83o8dbukk9.fsf@gnu.org> <878s4f59u9.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="19573"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Tassilo Horn Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 16 11:22:26 2021 Return-path: Envelope-to: ged-emacs-devel@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 1liCyf-0004rT-Hk for ged-emacs-devel@m.gmane-mx.org; Sun, 16 May 2021 11:22:25 +0200 Original-Received: from localhost ([::1]:50788 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liCye-0005Xc-K0 for ged-emacs-devel@m.gmane-mx.org; Sun, 16 May 2021 05:22:24 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37956) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liCva-0002D3-4E for emacs-devel@gnu.org; Sun, 16 May 2021 05:19:14 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:45492) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1liCvZ-0005Lq-S6 for emacs-devel@gnu.org; Sun, 16 May 2021 05:19:13 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1807 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1liCvZ-0002by-2o; Sun, 16 May 2021 05:19:13 -0400 In-Reply-To: <878s4f59u9.fsf@gnu.org> (message from Tassilo Horn on Sun, 16 May 2021 10:53:55 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269340 Archived-At: > From: Tassilo Horn > Cc: emacs-devel@gnu.org > Date: Sun, 16 May 2021 10:53:55 +0200 > > > Thanks, but it is not clear to me what this feature is supposed to do, > > and how do I test that. You say "it will try to guess", but what is > > the expression of that guesswork, from the user perspective? > > With the default value of `bug-reference-setup-from-mail-alist', the > user-visible effect would be that bug reference (bug#12345) would be > fontified and clickable and browse that bug report on debbugs.gnu.org in > terms of `browse-url'. OK, but what is this supposed to do for other forums, like emacs-devel? what is the relevant URL there? > >> We'd need to nuke the buffer-local values and re-enable > >> `bug-reference-mode' on switching messages, e.g., > >> > >> (add-hook 'rmail-show-message-hook #'rmail-bug-reference-setup) > >> > >> for a yet to be written rmail-bug-reference-setup which is a bit sad > >> because for all other modes where I've added this auto-setup capability > >> (Gnus, Mu4e [currently only in my ~/.emacs], rcirc, ERC, VC) the > >> "normal" > >> > >> (add-hook '-hook #'bug-reference-mode) > >> > >> will do, that is, for Rmail the user would need to use a special > >> function rather than just enabling `bug-reference-mode' in the mode of > >> his choice. (Of course, this could be documented.) > >> > >> Alternatively, Rmail itself could check if `bug-reference-mode' is > >> enabled, nuke the two variables, and call > >> `bug-reference--run-auto-setup'. > > > > How is Rmail different in this regard from other MUA in Emacs? why do > > you need something special for Rmail and not for the rest? > > Gnus and Mu4e create a fresh buffer with their viewing mode when viewing > another mail just like you'd get another buffer when finding another > file. Then yes, this should be set up when showing a message, not when turning on the Rmail mode. Thanks.