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