unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Lukasz Stelmach <stlman@poczta.fm>
To: Jani Nikula <jani@nikula.org>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: do not change users' mail agent configuration
Date: Mon, 15 Dec 2014 00:49:17 +0100	[thread overview]
Message-ID: <548E21FD.4040307@poczta.fm> (raw)
In-Reply-To: <87h9wyr2bb.fsf@nikula.org>

[-- Attachment #1: Type: text/plain, Size: 3326 bytes --]

On 14.12.2014 10:46, Jani Nikula wrote:
> On Sat, 13 Dec 2014, Lukasz Stelmach <stlman@poczta.fm> wrote:
>> On 13.12.2014 22:04, Jani Nikula wrote:
>>> On Fri, 12 Dec 2014, Łukasz Stelmach <stlman@poczta.fm> wrote:
>>>> `mail-user-agent' is defined with defcustom and may be customised
>>>> by users. It should not be set to arbitrary values in modules.
>>>
>>> Point taken.
>>>
>>>> To make use of that configuration value call `compose-mail' which
>>>> starts user's preferred mail composition package as selected with
>>>> the variable `mail-user-agent' instead of notmuch's hardcoded
>>>> `message-mail'.
>>>
>>> So your proposed change is that `notmuch-mua-mail` should start
>>> whichever mua the user has configured in `mail-user-agent` instead of
>>> the notmuch mail composition window, as described in the function
>>> documentation? I don't think I like that either.
>>>
>>> Maybe we should let bind `mail-user-agent` instead?
>>
>>
>> Actually `message-mail` isn't a "notmuch mail composition window" but
>> rather a "mail composition window" implemented in message.el which is a
>> part of Emacs.  Even more, it is the default "mail composition window"
>> in Emacs because the default value of `mail-user-agent`, as defined in
>> simple.el, is `message-user-agent` (since Emacs 23.3 as described in a
>> comment in `compose-mail` function therein) which causes to be launched by
>> `compose-mail`.
> 
> Basically notmuch layers its own stuff on top of message mode.

I need to dig into notmuch-mua a little bit deeper but at the first
glance it doesn't seem that what I want is impossible. What I want is:

- keep notmuch working as it is for everyone who uses it now,

- enable clean integration with other MUAs for those who don't use it
  yet.

The second point is very important for me because I use Gnus for
incoming mail but notmuch is definitely better for browsing archives
and I'd love to use it.

>> TL;DR with the mail-user-agent variable set to the default value nothing
>>       changes for a notmuch user.
> 
> Except `message-user-agent` gets used instead of `notmuch-user-agent`
> which does the layering on top. We currently don't do much more, but
> might in the future. As an example, `notmuch-mua-send-hook` won't get
> called.

Indeed I need to sit down and draw it all.

> Another question open to debate is, if the user is using the notmuch
> interface, and calls a function named `notmuch-mua-new-mail` to compose
> mail, should the function respect `mail-user-agent` and pop up a
> non-notmuch interface? Basically what we do is tested to work on top of
> message mode only, so all bets would be off anyway.

And that should be kept as default. I, on the other hand have tested,
replying from notmuch with Gnus (which is also works on top of message)
and as far as I can tell it works fine. I don't say notmuch has to work
with all possible user agents, I just want it to be able to work with
more than one.

I will keep investigating the issue.

BTW There is also the `read-mail-command` variable in simple.el which
which might need some of our attention.

Kind regards,
-- 
Było mi bardzo miło.                   Twoje oczy lubią mnie
>Łukasz<                                     i to mnie zgubi  (c)SNL


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 538 bytes --]

  reply	other threads:[~2014-12-14 23:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-12 18:54 [PATCH] emacs: do not change users' mail agent configuration Łukasz Stelmach
2014-12-13 21:04 ` Jani Nikula
2014-12-13 21:54   ` Lukasz Stelmach
2014-12-14  9:46     ` Jani Nikula
2014-12-14 23:49       ` Lukasz Stelmach [this message]
2017-08-23 13:40         ` Importing notmuch should not change user configuration David Bremner
  -- strict thread matches above, loose matches on Subject: below --
2017-08-23 12:07 Christoph Groth

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://notmuchmail.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=548E21FD.4040307@poczta.fm \
    --to=stlman@poczta.fm \
    --cc=jani@nikula.org \
    --cc=notmuch@notmuchmail.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://yhetil.org/notmuch.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).