Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 6959C6DE1104 for ; Mon, 9 Nov 2015 04:51:01 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -1.135 X-Spam-Level: X-Spam-Status: No, score=-1.135 tagged_above=-999 required=5 tests=[AWL=1.715, RCVD_IN_DNSWL_MED=-2.3, RP_MATCHES_RCVD=-0.55] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id f1grokkLq803 for ; Mon, 9 Nov 2015 04:50:59 -0800 (PST) Received: from max.feld.cvut.cz (max.feld.cvut.cz [147.32.192.36]) by arlo.cworth.org (Postfix) with ESMTP id 136D96DE020B for ; Mon, 9 Nov 2015 04:50:58 -0800 (PST) Received: from localhost (unknown [192.168.200.7]) by max.feld.cvut.cz (Postfix) with ESMTP id 49CA319F4575; Mon, 9 Nov 2015 13:50:56 +0100 (CET) X-Virus-Scanned: IMAP STYX AMAVIS Received: from max.feld.cvut.cz ([192.168.200.1]) by localhost (styx.feld.cvut.cz [192.168.200.7]) (amavisd-new, port 10044) with ESMTP id aIIAG29-imuF; Mon, 9 Nov 2015 13:50:54 +0100 (CET) Received: from imap.feld.cvut.cz (imap.feld.cvut.cz [147.32.192.34]) by max.feld.cvut.cz (Postfix) with ESMTP id 8C1DB19F41ED; Mon, 9 Nov 2015 13:50:53 +0100 (CET) Received: from wsh by steelpick.2x.cz with local (Exim 4.86) (envelope-from ) id 1ZvluO-0000vu-Fs; Mon, 09 Nov 2015 13:50:52 +0100 From: Michal Sojka To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] emacs: Fix regression in (notmuch-)message-mode initialization In-Reply-To: <87d1vj4b9z.fsf@zancas.localnet> References: <1446573161-28068-1-git-send-email-sojkam1@fel.cvut.cz> <87d1vj4b9z.fsf@zancas.localnet> User-Agent: Notmuch/0.21+9~ga3f5262 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Mon, 09 Nov 2015 13:50:52 +0100 Message-ID: <87bnb38hg3.fsf@steelpick.2x.cz> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Nov 2015 12:51:01 -0000 On Mon, Nov 09 2015, David Bremner wrote: > Michal Sojka 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. OK. I'll try implement notmuch-message-mail as a simpler alternative to message-mail. Let's see how it will look like. > >> 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. Hopefully, advises won't be needed then. Thanks, -Michal