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 1187E6DE0188 for ; Thu, 12 May 2016 08:55:32 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.013 X-Spam-Level: X-Spam-Status: No, score=-0.013 tagged_above=-999 required=5 tests=[AWL=-0.002, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] 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 yiWSDONuOJeu for ; Thu, 12 May 2016 08:55:24 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id D41756DE00D3 for ; Thu, 12 May 2016 08:55:23 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84) (envelope-from ) id 1b0sxG-0006MK-FP; Thu, 12 May 2016 11:55:14 -0400 Received: (nullmailer pid 31223 invoked by uid 1000); Thu, 12 May 2016 15:55:19 -0000 From: David Bremner To: Sanjoy Mahajan , notmuch@notmuchmail.org Subject: Re: slight workaround needed to use gnus-alias In-Reply-To: <87lh3f1fb8.fsf@insight.mit.edu> References: <87lh3f1fb8.fsf@insight.mit.edu> User-Agent: Notmuch/0.22 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Thu, 12 May 2016 12:55:19 -0300 Message-ID: <87zirv2rvc.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: Thu, 12 May 2016 15:55:32 -0000 Sanjoy Mahajan writes: > > (require 'gnus-alias) > (gnus-alias-init) > ;;; upstream version checks just for message-mode, but notmuch uses > ;;; notmuch-message-mode, which is derived from message-mode > (defun gnus-alias-ensure-message-mode () > "Assert that the current buffer is a message buffer." > (when (not (derived-mode-p 'notmuch-message-mode)) > (gnus-alias-error "Must be in `message-mode' or mode derived from it. "))) > (add-hook 'message-setup-hook 'gnus-alias-determine-identity) Maybe upstream Emacs would accept something like that if it says "(derived-mode-p 'message-mode)". d