--- /dev/null
+Return-Path: <tomi.ollila@iki.fi>\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 305346DE1601\r
+ for <notmuch@notmuchmail.org>; Mon, 9 Nov 2015 12:52:46 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at cworth.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0.727\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0.727 tagged_above=-999 required=5 tests=[AWL=0.075, \r
+ SPF_NEUTRAL=0.652] 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 ZitdA9P0dI1F for <notmuch@notmuchmail.org>;\r
+ Mon, 9 Nov 2015 12:52:43 -0800 (PST)\r
+Received: from guru.guru-group.fi (guru.guru-group.fi [46.183.73.34])\r
+ by arlo.cworth.org (Postfix) with ESMTP id E845B6DE158D\r
+ for <notmuch@notmuchmail.org>; Mon, 9 Nov 2015 12:52:42 -0800 (PST)\r
+Received: from guru.guru-group.fi (localhost [IPv6:::1])\r
+ by guru.guru-group.fi (Postfix) with ESMTP id 1C85510007F;\r
+ Mon, 9 Nov 2015 22:52:40 +0200 (EET)\r
+From: Tomi Ollila <tomi.ollila@iki.fi>\r
+To: Michal Sojka <sojkam1@fel.cvut.cz>, David Bremner <david@tethera.net>,\r
+ notmuch@notmuchmail.org\r
+Subject: Re: [PATCH] emacs: Fix regression in (notmuch-)message-mode\r
+ initialization\r
+In-Reply-To: <87bnb38hg3.fsf@steelpick.2x.cz>\r
+References: <1446573161-28068-1-git-send-email-sojkam1@fel.cvut.cz>\r
+ <87d1vj4b9z.fsf@zancas.localnet> <87bnb38hg3.fsf@steelpick.2x.cz>\r
+User-Agent: Notmuch/0.21+14~g053baf4 (http://notmuchmail.org) Emacs/24.3.1\r
+ (x86_64-unknown-linux-gnu)\r
+X-Face: HhBM'cA~<r"^Xv\KRN0P{vn'Y"Kd;zg_y3S[4)KSN~s?O\"QPoL\r
+ $[Xv_BD:i/F$WiEWax}R(MPS`^UaptOGD`*/=@\1lKoVa9tnrg0TW?"r7aRtgk[F\r
+ !)g;OY^,BjTbr)Np:%c_o'jj,Z\r
+Date: Mon, 09 Nov 2015 22:52:39 +0200\r
+Message-ID: <m2wptqlwtk.fsf@guru.guru-group.fi>\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 20:52:46 -0000\r
+\r
+On Mon, Nov 09 2015, Michal Sojka <sojkam1@fel.cvut.cz> wrote:\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
+that might be better than my vague thought of let-binding that particular\r
+hook (to nil) and run-hooks it later...\r
+\r
+Tomi (sending from my N9)\r
+ \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
+> _______________________________________________\r
+> notmuch mailing list\r
+> notmuch@notmuchmail.org\r
+> https://notmuchmail.org/mailman/listinfo/notmuch\r