unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Tassilo Horn <tsdh@gnu.org>
Cc: emacs-devel@gnu.org
Subject: Re: Bug-reference auto-setup for Rmail (please test)
Date: Sun, 16 May 2021 11:52:54 +0300	[thread overview]
Message-ID: <83o8dbukk9.fsf@gnu.org> (raw)
In-Reply-To: <87eee75d8n.fsf@gnu.org> (message from Tassilo Horn on Sun, 16 May 2021 09:23:21 +0200)

> From: Tassilo Horn <tsdh@gnu.org>
> Date: Sun, 16 May 2021 09:23:21 +0200
> 
> What you need to do is activate `bug-reference-mode' in Rmail, so
> probably:
> 
>   (add-hook 'rmail-mode-hook #'bug-reference-mode)
> 
> and then it'll try to guess the right `bug-reference-bug-regexp' and
> `bug-reference-url-format' based on the List-Id, To, From, and Cc
> headers according to the customize option
> `bug-reference-setup-from-mail-alist' which should at least have a
> suitable default value for (some) emacs-related mailinglists including
> emacs-devel.

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?

> There is one problem where I need implementation advice.  The
> bug-reference auto-setup is a no-op if `bug-reference-bug-regexp' and
> `bug-reference-url-format' are already set (see
> `bug-reference--run-auto-setup').  So if you view an emacs-devel message
> first, it'll set those variables.  When you move on to the next message
> (which might be completely unrelated to emacs), the variables are still
> set, so no new guesswork will be done.
> 
> 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 '<mode>-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?

Thanks.



  reply	other threads:[~2021-05-16  8:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-16  7:23 Bug-reference auto-setup for Rmail (please test) Tassilo Horn
2021-05-16  8:52 ` Eli Zaretskii [this message]
2021-05-16  8:53   ` Tassilo Horn
2021-05-16  9:19     ` Eli Zaretskii
2021-05-16  9:58       ` Tassilo Horn
2021-05-16 11:04         ` Eli Zaretskii
2021-05-16 14:23           ` Tassilo Horn
2021-05-16 14:53             ` Tassilo Horn
2021-05-16 15:39             ` Tassilo Horn
2021-05-16 18:05               ` Eli Zaretskii
2021-05-16 18:53                 ` Tassilo Horn
2021-05-16 10:02 ` Eli Zaretskii
2021-05-16 10:28   ` Tassilo Horn
2021-05-16 10:59     ` Eli Zaretskii

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=83o8dbukk9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=tsdh@gnu.org \
    /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).