From: David Bremner <david@tethera.net>
To: Michal Sojka <sojkam1@fel.cvut.cz>, notmuch@notmuchmail.org
Subject: Re: [PATCH] emacs: Fix regression in (notmuch-)message-mode initialization
Date: Mon, 09 Nov 2015 08:17:44 -0400 [thread overview]
Message-ID: <87d1vj4b9z.fsf@zancas.localnet> (raw)
In-Reply-To: <1446573161-28068-1-git-send-email-sojkam1@fel.cvut.cz>
Michal Sojka <sojkam1@fel.cvut.cz> writes:
> This commit uses advice mechanism to call notmuch-message-mode instead
> of message-mode. This way, a call to message-mail initializes directly
> notmuch-message-mode rather than message-mode which is later changed
> to notmuch-message-mode. The advice is constructed in such a way, that
> it is effective only once and when called by notmuch. The second call
> to message-mode (from notmuch-message-mode) calls the original
> message-mode.
I wanted to answer this with an alternative patch, but I haven't had
time.
I admit to being somewhat prejudiced against shipping code with advice
in it (IMHO it's fine for user specific customization, but not very
maintainable).
I think we might be better off in the long run replacing the call to
message-mail. Code duplication is obviously not great, but perhaps some
of the complexity of message-mail / message-pop-to-buffer can be
eliminated, since we don't need to support all of the use cases of
message-mail.
> This implementation uses the new advice mechanism introduced in Emacs
> 24.4. If we want to support older version, this must be changed.
We do try to support Emacs 23 still (except for some optional
features). Unfortunately old advice is even nastier.
d
next prev parent reply other threads:[~2015-11-09 12:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-03 17:52 [PATCH] emacs: Fix regression in (notmuch-)message-mode initialization Michal Sojka
2015-11-09 12:17 ` David Bremner [this message]
2015-11-09 12:50 ` Michal Sojka
2015-11-09 14:26 ` David Bremner
2015-11-09 20:52 ` Tomi Ollila
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=87d1vj4b9z.fsf@zancas.localnet \
--to=david@tethera.net \
--cc=notmuch@notmuchmail.org \
--cc=sojkam1@fel.cvut.cz \
/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).