[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bug-reference auto-setup for Rmail (please test)
From: |
Eli Zaretskii |
Subject: |
Re: Bug-reference auto-setup for Rmail (please test) |
Date: |
Sun, 16 May 2021 14:04:01 +0300 |
> From: Tassilo Horn <tsdh@gnu.org>
> Cc: emacs-devel@gnu.org
> Date: Sun, 16 May 2021 11:58:25 +0200
>
> > OK, but what is this supposed to do for other forums, like
> > emacs-devel? what is the relevant URL there?
>
> The default value sets
>
> bug-reference-bug-regexp = "\\([Bb]ug ?#?\\)\\([0-9]+\\(?:#[0-9]+\\)?\\)"
> bug-reference-url-format = "https://debbugs.gnu.org/%s"
>
> if some considered mail header (To, From, Cc, List-ID) matches something
> emacs-related including emacs-devel@gnu.org (or some auctex, org-mode,
> tramp) mailing list address or list-id.
At least for Emacs, when we mention bug#NNNNN on emacs-devel, we
always mean debbugs, so the URL seems independent of the forum.
> > Then yes, this should be set up when showing a message, not when
> > turning on the Rmail mode.
>
> Right, the question is just what is the best way to do it. It has been
> my design intention that
>
> 1. there is no special setup needed (just enable `bug-reference-mode'
> where you like, and it'll work),
>
> 2. it does never interfere with explicit user settings. Therefore,
> the auto-setup runs in `bug-reference-mode's :after-hook, so if the
> 2 variables are already set by file/dir-local variables or a hook
> function, it won't do anything.
>
> So the alternative of having some special `bug-reference-rmail-setup'
> function rmail users can add to `rmail-show-message-hook' would go
> against 1 whereas the alternative of adding special handling in rmail
> would possibly go against 2 because we couldn't know if bug-regexp &
> url-format have been set by the previous auto-setup or if it has been an
> explicit user setting, so resetting them to nil could be a violation of
> that rule.
We could add an Rmail-specific defcustom in bug-reference.el, which,
if non-nil, will tell Rmail to run bug-reference-rmail-setup when
showing a message.
> I don't know how Rmail users work but guess that some users have one
> mbox file per mailinglist and use rmail-mode-hook to activate & setup
> bug-reference explitly looking at the name of the mbox file. In that
> case, nuking the values and re-setting would be wrong.
The new defcustom could accept values that are alists, with separate
values for each inbox.
- Bug-reference auto-setup for Rmail (please test), Tassilo Horn, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test), Eli Zaretskii, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test), Tassilo Horn, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test), Eli Zaretskii, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test), Tassilo Horn, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test),
Eli Zaretskii <=
- Re: Bug-reference auto-setup for Rmail (please test), Tassilo Horn, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test), Tassilo Horn, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test), Tassilo Horn, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test), Eli Zaretskii, 2021/05/16
- Re: Bug-reference auto-setup for Rmail (please test), Tassilo Horn, 2021/05/16
Re: Bug-reference auto-setup for Rmail (please test), Eli Zaretskii, 2021/05/16