unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
From: Tomi Ollila <tomi.ollila@iki.fi>
To: "Tory S. Anderson" <webdev@toryanderson.com>,
	David Bremner <david@tethera.net>
Cc: notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: PATCH [1/2] mail user agent
Date: Thu, 03 Jun 2021 21:22:44 +0300	[thread overview]
Message-ID: <m2fsxy7qq3.fsf@guru.guru-group.fi> (raw)
In-Reply-To: <87lf7r569u.fsf@toryanderson.com>

On Thu, Jun 03 2021, Tory S. Anderson wrote:

> Nice follow-upabout what other browsers do!
>
> David Bremner <david@tethera.net> writes:
>
>> Tomi Ollila <tomi.ollila@iki.fi> writes:
>>
>>> On Mon, May 31 2021, David Bremner wrote:
>>>
>>>> Tomi Ollila <tomi.ollila@iki.fi> writes:
>>>>>
>>>>> I am for 'ripping the bandage off' and not configure mail-user-agent
>>>>> outside of notmuch use (and just require 'notmuch would not set anything...)
>>>>>
>>>>> Could we have some 'compose-mail' variant (different name, of course;
>>>>> I had one in mind but then came off-by one problem... >;) which 
>>>>> configures mail-user-agent just for that use (or something).
>>>>>
>>>>
>>>> Are you thinking about notmuch-mua-mail (which exists)?
>>>>
>>>> Tory, did you try the eval-after-load trick I mentioned btw? That seemed
>>>> to work in my testing, and I'm just not sure that customizing a
>>>> notmuch-* variable is much less annoying than adding an eval-after-load to
>>>> reset the variable after notmuch messes with it.
>
> No, I'm guilty here. I used my patch instead and haven't looked back
> since. I think having to add code lines to an init file is much more
> annoying (and less transparent) than simply having something for which I
> can add a =:custom= line in my use-package statements, or new users just
> use the customizer to explore to. Maybe that's just me, but I feel much
> more comfortable about sharing that config or that suggestion with
> others, too. Explorability is what customizer's big benefit to emacs is,
> so it seems to me a real advantage to have this in there.
>

mail-user-agent is defcustom in simple.el, starting:

  (defcustom mail-user-agent 'message-user-agent
    "Your preference for a mail composition package.
  Various Emacs Lisp packages (e.g. Reporter) require you to compose an
  outgoing email message.  This variable lets you specify which
  mail-sending package you prefer.

  Valid values include:

    `message-user-agent'  -- use the Message package.
                             See Info node `(message)'.
    `sendmail-user-agent' -- use the Mail package.
                             See Info node `(emacs)Sending Mail'.
    `mh-e-user-agent'     -- use the Emacs interface to the MH mail system.
                             See Info node `(mh-e)'.
    `gnus-user-agent'     -- like `message-user-agent', but with Gnus
                             paraphernalia if Gnus is running, particularly
                             the Gcc: header for archiving.

  Additional valid symbols may be available; check with the author of
  your package for details.  The function should return non-nil if it
  succeeds.
  ...

Currently if one uses/used customizer to change to something else, which
is saved to .emacs (or somewhere else where custom-file points to), and
then loads notmuch, it suddenly changes to 'notmuch-user-agent.

AFAIU the change your patch did does not change that, one just has to
customize notmuch-mail-user-agent.

IMO that makes things messy.

If there were option to somehow magically add more values to the
mail-user-agent customize menu while loading notmuch.el then one
could just directly choose notmuch-user-agent from that menu.

Otherwise I don't see other options than document how to do that
configuration (and drop that setq and add NEWS entry).

Tomi

>>>>
>>>> Still waiting for feedback from notmuch users that actually use M-x
>>>> compose-mail or other similar generic entry points.
>>>
>>> Does anyone know how compose-mail behaves when one has loaded any other
>>> emacs mua (mh, vm, gnus, mu, ...) ?
>>>
>>
>> As far as I can tell
>>
>>    vm: only locally binds mail-user-agent
>>    mh-e: used to have a setq mail-user-agent, removed in 2003-ish
>>    mu4e: documents how to set mail-user-agent
>>    rmail: reads mail-user-agent, but does not set
>>    gnus: only locally binds mail-user-agent
>>    wanderlust: tells you how how to set mail-user-agent (and oddly, how
>>                to define conditionaly define a user agent)
>>
>> So I think notmuch is the odd one out here.
>> _______________________________________________
>> 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

      reply	other threads:[~2021-06-03 18:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-19 16:03 [PATCH] emacs: PATCH [1/2] mail user agent Tory S. Anderson
2021-05-22 12:16 ` David Bremner
2021-05-22 13:28   ` Tomi Ollila
2021-05-22 15:38     ` Tory S. Anderson
2021-05-31 23:33     ` David Bremner
2021-06-02 19:10       ` Tomi Ollila
2021-06-03 12:18         ` David Bremner
2021-06-03 15:15           ` Tory S. Anderson
2021-06-03 18:22             ` Tomi Ollila [this message]

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=m2fsxy7qq3.fsf@guru.guru-group.fi \
    --to=tomi.ollila@iki.fi \
    --cc=david@tethera.net \
    --cc=notmuch@notmuchmail.org \
    --cc=webdev@toryanderson.com \
    /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).