[notmuch] [PATCH] New function notmuch-show-kill-message-id, puts current message...
authorJed Brown <jed@59A2.org>
Tue, 24 Nov 2009 18:35:12 +0000 (19:35 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:35:42 +0000 (09:35 -0800)
9a/92a207dcefb1477f6e63e69d7cee9e2f2a524d [new file with mode: 0644]

diff --git a/9a/92a207dcefb1477f6e63e69d7cee9e2f2a524d b/9a/92a207dcefb1477f6e63e69d7cee9e2f2a524d
new file mode 100644 (file)
index 0000000..3d29cfa
--- /dev/null
@@ -0,0 +1,101 @@
+Return-Path: <five9a2@gmail.com>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id C7753431FBC\r
+       for <notmuch@notmuchmail.org>; Tue, 24 Nov 2009 10:34:55 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id vso6kOf9yguM for <notmuch@notmuchmail.org>;\r
+       Tue, 24 Nov 2009 10:34:55 -0800 (PST)\r
+Received: from mail-bw0-f224.google.com (mail-bw0-f224.google.com\r
+       [209.85.218.224])\r
+       by olra.theworths.org (Postfix) with ESMTP id C450C431FAE\r
+       for <notmuch@notmuchmail.org>; Tue, 24 Nov 2009 10:34:54 -0800 (PST)\r
+Received: by bwz24 with SMTP id 24so5235563bwz.30\r
+       for <notmuch@notmuchmail.org>; Tue, 24 Nov 2009 10:34:53 -0800 (PST)\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma;\r
+       h=domainkey-signature:received:received:sender:from:to:cc:subject\r
+       :date:message-id:x-mailer;\r
+       bh=6NkH322v57aWLmiyxTjO9/1kX0t8Wq2zNS6vDTFr9QM=;\r
+       b=L0Qr49GN17icR4PAFjnBaI7XlgGZZGjyLFbNij+vrjluRMjc4XxiV2uHu3+ZhN7tHE\r
+       I6IAFHz3DCQPCIwGu7DBBaGTtm6ia2tjojW5IRt5oppPeogwXzMq9Ch6YdKWBpTxzD8z\r
+       Sdi1cfZzWw2L+Ld1sP3UiBN15x/VP6DVyXY/Y=\r
+DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;\r
+       h=sender:from:to:cc:subject:date:message-id:x-mailer;\r
+       b=pkCcqP+Nk3Zps5tnL2zD2UePRmuUc3mM3LNs4fcfcj93fBw8k57iVPWSCY8y5zws27\r
+       kimGv23QYk1TsyDFjGbJC0YdrihaulWgrurWgiuQEC3doMvnRWNabgnRFMvfIBC9DIPL\r
+       2PuXcFtLB1MmyM+GxXUeQCf7J1/oCLBIxxtdc=\r
+Received: by 10.204.19.146 with SMTP id a18mr2417636bkb.135.1259087693650;\r
+       Tue, 24 Nov 2009 10:34:53 -0800 (PST)\r
+Received: from localhost.localdomain (vawpc43.ethz.ch [129.132.59.11])\r
+       by mx.google.com with ESMTPS id f31sm7557240fkf.12.2009.11.24.10.34.52\r
+       (version=TLSv1/SSLv3 cipher=RC4-MD5);\r
+       Tue, 24 Nov 2009 10:34:52 -0800 (PST)\r
+Sender: Jed Brown <five9a2@gmail.com>\r
+From: Jed Brown <jed@59A2.org>\r
+To: notmuch@notmuchmail.org\r
+Date: Tue, 24 Nov 2009 19:35:12 +0100\r
+Message-Id: <1259087712-18844-1-git-send-email-jed@59A2.org>\r
+X-Mailer: git-send-email 1.6.5.3\r
+Subject: [notmuch] [PATCH] New function notmuch-show-kill-message-id,\r
+       puts current message ID in the kill ring.\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.12\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://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: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Tue, 24 Nov 2009 18:34:55 -0000\r
+\r
+This is useful any time you want to explicitly refer to the message,\r
+such as in the body of another message, through git format-patch, or on\r
+IRC.\r
+\r
+It is bound to "C-c i".\r
+\r
+Signed-off-by: Jed Brown <jed@59A2.org>\r
+---\r
+ notmuch.el |   12 ++++++++++++\r
+ 1 files changed, 12 insertions(+), 0 deletions(-)\r
+\r
+diff --git a/notmuch.el b/notmuch.el\r
+index fa6e7de..071ee5a 100644\r
+--- a/notmuch.el\r
++++ b/notmuch.el\r
+@@ -84,6 +84,7 @@\r
+     (define-key map "?" 'describe-mode)\r
+     (define-key map (kbd "TAB") 'notmuch-show-next-button)\r
+     (define-key map (kbd "M-TAB") 'notmuch-show-previous-button)\r
++    (define-key map (kbd "C-c i") 'notmuch-show-kill-ring-save-message-id)\r
+     map)\r
+   "Keymap for \"notmuch show\" buffers.")\r
+ (fset 'notmuch-show-mode-map notmuch-show-mode-map)\r
+@@ -698,6 +699,17 @@ which this thread was originally shown."\r
+   (force-window-update)\r
+   (redisplay t))\r
\r
++(defun notmuch-show-kill-ring-save-message-id ()\r
++  "Put the current message id in the kill ring.\r
++\r
++This is useful for referencing messages or running external\r
++queries."\r
++  (interactive)\r
++  (let ((message-id (notmuch-show-get-message-id)))\r
++    (kill-new message-id)\r
++    (when (called-interactively-p 'interactive)\r
++      (message "Saved message ID: \"%s\"" message-id))))\r
++\r
+ ;;;###autoload\r
+ (defun notmuch-show-mode ()\r
+   "Major mode for viewing a thread with notmuch.\r
+-- \r
+1.6.5.3\r
+\r