From: David Bremner Date: Wed, 30 Dec 2015 15:22:09 +0000 (+2000) Subject: Re: [PATCH v2] emacs: Improve notmuch-message-mode initialization X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5d901537cfef2a444c2926b9f415ec51351e8ff9;p=notmuch-archives.git Re: [PATCH v2] emacs: Improve notmuch-message-mode initialization --- diff --git a/98/c0025deb993fff668b75bbcdf31733423f805b b/98/c0025deb993fff668b75bbcdf31733423f805b new file mode 100644 index 000000000..106927d2c --- /dev/null +++ b/98/c0025deb993fff668b75bbcdf31733423f805b @@ -0,0 +1,76 @@ +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 129BC6DE1601 + for ; Wed, 30 Dec 2015 07:22:16 -0800 (PST) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.312 +X-Spam-Level: +X-Spam-Status: No, score=-0.312 tagged_above=-999 required=5 tests=[AWL=0.239, + RP_MATCHES_RCVD=-0.55, SPF_PASS=-0.001] 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 fqSVquFYDfIZ for ; + Wed, 30 Dec 2015 07:22:14 -0800 (PST) +Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) + by arlo.cworth.org (Postfix) with ESMTPS id 566B76DE14A8 + for ; Wed, 30 Dec 2015 07:22:14 -0800 (PST) +Received: from remotemail by fethera.tethera.net with local (Exim 4.84) + (envelope-from ) + id 1aEIZg-00074a-CV; Wed, 30 Dec 2015 10:22:04 -0500 +Received: (nullmailer pid 5772 invoked by uid 1000); + Wed, 30 Dec 2015 15:22:09 -0000 +From: David Bremner +To: Michal Sojka , notmuch@notmuchmail.org +Subject: Re: [PATCH v2] emacs: Improve notmuch-message-mode initialization +In-Reply-To: <1450690875-2111-2-git-send-email-sojkam1@fel.cvut.cz> +References: <1450690875-2111-1-git-send-email-sojkam1@fel.cvut.cz> + <1450690875-2111-2-git-send-email-sojkam1@fel.cvut.cz> +User-Agent: Notmuch/0.21+26~g9404723 (http://notmuchmail.org) Emacs/24.5.1 + (x86_64-pc-linux-gnu) +Date: Wed, 30 Dec 2015 11:22:09 -0400 +Message-ID: <87y4cc3qse.fsf@zancas.localnet> +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: Wed, 30 Dec 2015 15:22:16 -0000 + +Michal Sojka writes: + +> Recent addition of notmuch-message-mode introduced several problems: +> +> 1. When message-setup-hook is used to set buffer local variables, +> these settings are not effective, because all buffer local +> variables are immediately erased by notmuch-message-mode +> initialization. +> +> 2. message-mode-hook gets invoked twice - first when message-mail +> invokes message-mode and second when notmuch-mua-mail invokes +> notmuch-message-mode. +> +> This commit fixes these problems by replacing a call to message-mail +> with notmuch-specific code that is (hopefully) equivalent to +> message-mail functionality before introduction of +> notmuch-message-mode. +> +> We first initialize notmuch-message-mode with +> notmuch-mua-pop-to-buffer, which is a modified version of +> message-pop-to-buffer and then call message-setup-1, which is the only +> functionality of message-mail that is needed for notmuch. + +This doesn't break anything for me, and looks fairly sane. I'm not sure +if the indirectrion of notmuch-mua-get-switch-function is still needed, +but that can wait for an optional followup patch.