Re: [PATCH] emacs: Fix regression in (notmuch-)message-mode initialization
authorMichal Sojka <sojkam1@fel.cvut.cz>
Mon, 9 Nov 2015 12:50:52 +0000 (13:50 +0100)
committerW. Trevor King <wking@tremily.us>
Sat, 20 Aug 2016 21:50:02 +0000 (14:50 -0700)
01/7b1d660154b2fc4eaf0c4f924aab7bf3dd27a4 [new file with mode: 0644]

diff --git a/01/7b1d660154b2fc4eaf0c4f924aab7bf3dd27a4 b/01/7b1d660154b2fc4eaf0c4f924aab7bf3dd27a4
new file mode 100644 (file)
index 0000000..1c2ce1e
--- /dev/null
@@ -0,0 +1,97 @@
+Return-Path: <sojkam1@fel.cvut.cz>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 6959C6DE1104\r
+ for <notmuch@notmuchmail.org>; Mon,  9 Nov 2015 04:51:01 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -1.135\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-1.135 tagged_above=-999 required=5 tests=[AWL=1.715,\r
+  RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.55] autolearn=disabled\r
+Received: from arlo.cworth.org ([127.0.0.1])\r
+ by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024)\r
+ with ESMTP id f1grokkLq803 for <notmuch@notmuchmail.org>;\r
+ Mon,  9 Nov 2015 04:50:59 -0800 (PST)\r
+Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36])\r
+ by arlo.cworth.org (Postfix) with ESMTP id 136D96DE020B\r
+ for <notmuch@notmuchmail.org>; Mon,  9 Nov 2015 04:50:58 -0800 (PST)\r
+Received: from localhost (unknown [192.168.200.7])\r
+ by max.feld.cvut.cz (Postfix) with ESMTP id 49CA319F4575;\r
+ Mon,  9 Nov 2015 13:50:56 +0100 (CET)\r
+X-Virus-Scanned: IMAP STYX AMAVIS\r
+Received: from max.feld.cvut.cz ([192.168.200.1])\r
+ by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044)\r
+ with ESMTP id aIIAG29-imuF; Mon,  9 Nov 2015 13:50:54 +0100 (CET)\r
+Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34])\r
+ by max.feld.cvut.cz (Postfix) with ESMTP id 8C1DB19F41ED;\r
+ Mon,  9 Nov 2015 13:50:53 +0100 (CET)\r
+Received: from wsh by steelpick.2x.cz with local (Exim 4.86)\r
+ (envelope-from <sojkam1@fel.cvut.cz>)\r
+ id 1ZvluO-0000vu-Fs; Mon, 09 Nov 2015 13:50:52 +0100\r
+From: Michal Sojka <sojkam1@fel.cvut.cz>\r
+To: David Bremner <david@tethera.net>, notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs: Fix regression in (notmuch-)message-mode\r
+ initialization\r
+In-Reply-To: <87d1vj4b9z.fsf@zancas.localnet>\r
+References: <1446573161-28068-1-git-send-email-sojkam1@fel.cvut.cz>\r
+ <87d1vj4b9z.fsf@zancas.localnet>\r
+User-Agent: Notmuch/0.21+9~ga3f5262 (http://notmuchmail.org) Emacs/24.5.1\r
+ (x86_64-pc-linux-gnu)\r
+Date: Mon, 09 Nov 2015 13:50:52 +0100\r
+Message-ID: <87bnb38hg3.fsf@steelpick.2x.cz>\r
+MIME-Version: 1.0\r
+Content-Type: text/plain\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.20\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+ <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <https://notmuchmail.org/mailman/options/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch/>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <https://notmuchmail.org/mailman/listinfo/notmuch>,\r
+ <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 09 Nov 2015 12:51:01 -0000\r
+\r
+On Mon, Nov 09 2015, David Bremner wrote:\r
+> Michal Sojka <sojkam1@fel.cvut.cz> writes:\r
+>\r
+>> This commit uses advice mechanism to call notmuch-message-mode instead\r
+>> of message-mode. This way, a call to message-mail initializes directly\r
+>> notmuch-message-mode rather than message-mode which is later changed\r
+>> to notmuch-message-mode. The advice is constructed in such a way, that\r
+>> it is effective only once and when called by notmuch. The second call\r
+>> to message-mode (from notmuch-message-mode) calls the original\r
+>> message-mode.\r
+>\r
+> I wanted to answer this with an alternative patch, but I haven't had\r
+> time.\r
+>\r
+> I admit to being somewhat prejudiced against shipping code with advice\r
+> in it (IMHO it's fine for user specific customization, but not very\r
+> maintainable).\r
+>\r
+> I think we might be better off in the long run replacing the call to\r
+> message-mail. Code duplication is obviously not great, but perhaps some\r
+> of the complexity of message-mail / message-pop-to-buffer can be\r
+> eliminated, since we don't need to support all of the use cases of\r
+> message-mail.\r
+\r
+OK. I'll try implement notmuch-message-mail as a simpler alternative to\r
+message-mail. Let's see how it will look like.\r
+\r
+>\r
+>> This implementation uses the new advice mechanism introduced in Emacs\r
+>> 24.4. If we want to support older version, this must be changed.\r
+>\r
+> We do try to support Emacs 23 still (except for some optional\r
+> features). Unfortunately old advice is even nastier.\r
+\r
+Hopefully, advises won't be needed then.\r
+\r
+Thanks,\r
+-Michal\r