A user that loads notmuch.el does not necessarily want to user notmuch-message-mode to send mail. --- emacs/notmuch.el | 2 -- 1 file changed, 2 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 6d37c623..3e2713e2 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -1162,8 +1162,6 @@ Point should be at the beginning of the line." ;;; _ -(setq mail-user-agent 'notmuch-user-agent) - (provide 'notmuch) ;; After provide to avoid loops if notmuch was require'd via notmuch-init-file. -- 2.30.2
On Thu, May 13 2021, David Bremner wrote: > A user that loads notmuch.el does not necessarily want to user > notmuch-message-mode to send mail. If this does not break anything, could be point release content, provided it did not ship yet (then to the next sailing ship...). > --- > emacs/notmuch.el | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index 6d37c623..3e2713e2 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -1162,8 +1162,6 @@ Point should be at the beginning of the line." > > ;;; _ > > -(setq mail-user-agent 'notmuch-user-agent) > - > (provide 'notmuch) > > ;; After provide to avoid loops if notmuch was require'd via notmuch-init-file. > -- > 2.30.2 > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org
This would be terrific on my account, with that user-agent problem. It seems reasonable to ask Notmuch to NOT mess with global settings unconditionally.
The one thing I wasn't sure about in what I saw of the changes of this patch is where the "conditional" option is. Usually when I've implemented something like this I just create a custom variable and IF that variable is something, then I do the new thing; otherwise do the old thing, thereby maintaining reverse-compatibility. I didn't see that pattern here, I'm not familiar with this medium of code discussion.
I'm not familiar with how the git process goes here, since it's somewhat different than gitlab/github. Is there something I can do to apply this, or is there a separate notification for master, or should I subscribe to a different branch?
- Tory
Tomi Ollila <tomi.ollila@iki.fi> writes:
> On Thu, May 13 2021, David Bremner wrote:
>
>> A user that loads notmuch.el does not necessarily want to user
>> notmuch-message-mode to send mail.
>
> If this does not break anything, could be point release content,
> provided it did not ship yet (then to the next sailing ship...).
>
>> ---
>> emacs/notmuch.el | 2 --
>> 1 file changed, 2 deletions(-)
>>
>> diff --git a/emacs/notmuch.el b/emacs/notmuch.el
>> index 6d37c623..3e2713e2 100644
>> --- a/emacs/notmuch.el
>> +++ b/emacs/notmuch.el
>> @@ -1162,8 +1162,6 @@ Point should be at the beginning of the line."
>>
>> ;;; _
>>
>> -(setq mail-user-agent 'notmuch-user-agent)
>> -
>> (provide 'notmuch)
>>
>> ;; After provide to avoid loops if notmuch was require'd via notmuch-init-file.
>> --
>> 2.30.2
>> _______________________________________________
>> notmuch mailing list -- notmuch@notmuchmail.org
>> To unsubscribe send an email to notmuch-leave@notmuchmail.org
> _______________________________________________
> notmuch mailing list -- notmuch@notmuchmail.org
> To unsubscribe send an email to notmuch-leave@notmuchmail.org
Tomi Ollila <tomi.ollila@iki.fi> writes:
> On Thu, May 13 2021, David Bremner wrote:
>
>> A user that loads notmuch.el does not necessarily want to user
>> notmuch-message-mode to send mail.
>
> If this does not break anything, could be point release content,
> provided it did not ship yet (then to the next sailing ship...).
I'm a bit hesitent to include it in the current point release. I suspect
it will be a breaking change for some people, and there might be a way
to ease that pain. But we'll see, we can always roll another point
release in a few weeks.
webdev@toryanderson.com (Tory S. Anderson) writes:
> I'm not familiar with how the git process goes here, since it's
> somewhat different than gitlab/github. Is there something I can do to
> apply this, or is there a separate notification for master, or should
> I subscribe to a different branch?
You'll need a checkout of the source, then you can apply that patch with
"git am".
I use roughly the following workflow
1) 'c i' in notmuch-show-mode to grab the message id
2) Switch to a terminal, run
$ notmuch show --format=raw <paste-message-id-from-emacs> | git am
If you do this often, then you may want to investigate the package
"mailscripts" by Sean Whitton that includes some utilities that smooth
out some of the rough edges.
After some discussion [1], I decided it is better to make notmuch users who rely on this behaviour customize mail-user-agent. This is consistent with the behaviour of other emacs mail packages. [1]: id:87k0nuhfrk.fsf@toryanderson.com --- NEWS | 7 +++++++ doc/notmuch-emacs.rst | 10 ++++++++++ emacs/notmuch.el | 2 -- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 35b57cef..538ec168 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,13 @@ Notmuch 0.33 (UNRELEASED) ========================= +Emacs +----- + +`notmuch` no longer sets `mail-user-agent` on load. To restore the +previous behaviour of using notmuch to send mail by default, customize +`mail-user-agent` to `notmuch-user-agent`. + Vim --- diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst index d9b497a3..7772871b 100644 --- a/doc/notmuch-emacs.rst +++ b/doc/notmuch-emacs.rst @@ -366,6 +366,16 @@ Importing Mail :index:`notmuch-poll-script` |docstring::notmuch-poll-script| +Sending Mail +------------ + +:index:`mail-user-agent` + + Emacs consults the variable :ref:`mail-user-agent` to choose a mail + sending package for commands like :ref:`report-emacs-bug` and + :ref:`compose-mail`. To use ``notmuch`` for this, customize this + variable to the symbol :ref:`notmuch-user-agent`. + Init File --------- diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 6d37c623..3e2713e2 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -1162,8 +1162,6 @@ Point should be at the beginning of the line." ;;; _ -(setq mail-user-agent 'notmuch-user-agent) - (provide 'notmuch) ;; After provide to avoid loops if notmuch was require'd via notmuch-init-file. -- 2.30.2
On Fri, Jun 04 2021, David Bremner wrote: > After some discussion [1], I decided it is better to make notmuch users > who rely on this behaviour customize mail-user-agent. This is > consistent with the behaviour of other emacs mail packages. LGTM. Tomi > > [1]: id:87k0nuhfrk.fsf@toryanderson.com > --- > NEWS | 7 +++++++ > doc/notmuch-emacs.rst | 10 ++++++++++ > emacs/notmuch.el | 2 -- > 3 files changed, 17 insertions(+), 2 deletions(-) > > diff --git a/NEWS b/NEWS > index 35b57cef..538ec168 100644 > --- a/NEWS > +++ b/NEWS > @@ -1,6 +1,13 @@ > Notmuch 0.33 (UNRELEASED) > ========================= > > +Emacs > +----- > + > +`notmuch` no longer sets `mail-user-agent` on load. To restore the > +previous behaviour of using notmuch to send mail by default, customize > +`mail-user-agent` to `notmuch-user-agent`. > + > Vim > --- > > diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst > index d9b497a3..7772871b 100644 > --- a/doc/notmuch-emacs.rst > +++ b/doc/notmuch-emacs.rst > @@ -366,6 +366,16 @@ Importing Mail > :index:`notmuch-poll-script` > |docstring::notmuch-poll-script| > > +Sending Mail > +------------ > + > +:index:`mail-user-agent` > + > + Emacs consults the variable :ref:`mail-user-agent` to choose a mail > + sending package for commands like :ref:`report-emacs-bug` and > + :ref:`compose-mail`. To use ``notmuch`` for this, customize this > + variable to the symbol :ref:`notmuch-user-agent`. > + > Init File > --------- > > diff --git a/emacs/notmuch.el b/emacs/notmuch.el > index 6d37c623..3e2713e2 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -1162,8 +1162,6 @@ Point should be at the beginning of the line." > > ;;; _ > > -(setq mail-user-agent 'notmuch-user-agent) > - > (provide 'notmuch) > > ;; After provide to avoid loops if notmuch was require'd via notmuch-init-file. > -- > 2.30.2 > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org
David Bremner <david@tethera.net> writes:
> After some discussion [1], I decided it is better to make notmuch users
> who rely on this behaviour customize mail-user-agent. This is
> consistent with the behaviour of other emacs mail packages.
>
> [1]: id:87k0nuhfrk.fsf@toryanderson.com
Applied to master. I (still) don't think this is an appropriate change
for a point release, so it will need to wait for the next full release.