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