--- /dev/null
+Return-Path: <pieter@praet.org>\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 78812431FCF\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:52:48 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Spam-Flag: NO\r
+X-Spam-Score: -0.7\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=-0.7 tagged_above=-999 required=5\r
+ tests=[RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled\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 pZUZHLvKWsRy for <notmuch@notmuchmail.org>;\r
+ Sun, 19 Feb 2012 12:52:47 -0800 (PST)\r
+Received: from mail-we0-f181.google.com (mail-we0-f181.google.com\r
+ [74.125.82.181]) (using TLSv1 with cipher RC4-SHA (128/128 bits))\r
+ (No client certificate requested)\r
+ by olra.theworths.org (Postfix) with ESMTPS id 25D66431FAF\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:52:47 -0800 (PST)\r
+Received: by werp13 with SMTP id p13so3518419wer.26\r
+ for <notmuch@notmuchmail.org>; Sun, 19 Feb 2012 12:52:45 -0800 (PST)\r
+Received-SPF: pass (google.com: domain of pieter@praet.org designates\r
+ 10.216.134.157 as permitted sender) client-ip=10.216.134.157; \r
+Authentication-Results: mr.google.com;\r
+ spf=pass (google.com: domain of pieter@praet.org\r
+ designates 10.216.134.157 as permitted sender)\r
+ smtp.mail=pieter@praet.org\r
+Received: from mr.google.com ([10.216.134.157])\r
+ by 10.216.134.157 with SMTP id s29mr3143375wei.1.1329684765872\r
+ (num_hops = 1); Sun, 19 Feb 2012 12:52:45 -0800 (PST)\r
+X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;\r
+ d=google.com; s=gamma;\r
+ h=mime-version:from:to:cc:subject:date:message-id:x-mailer\r
+ :in-reply-to:references:x-gm-message-state;\r
+ bh=9S8DuL5mSSDlPJQAovbnpcyKJzu/vNDbN79bl7urdEs=;\r
+ b=qttsxHsLoBL9c2xajggAW2EIGCMnqwFGwGBDoKIG5xwnP2KUAFfSH6pILw+ccGoFaU\r
+ uNftMcFD3o6OOq9TazbItFoHzu5oTMr3vaOEkPho6+NwnY2cZX5VkYYdbzDPN0+1t7Xt\r
+ 6gelxtrePBtgHsNV7KBHhmLOf6wh1DvDgw1MQ=\r
+MIME-Version: 1.0\r
+Received: by 10.216.134.157 with SMTP id s29mr2627341wei.1.1329684765794;\r
+ Sun, 19 Feb 2012 12:52:45 -0800 (PST)\r
+Received: from localhost (104.218-242-81.adsl-dyn.isp.belgacom.be.\r
+ [81.242.218.104])\r
+ by mx.google.com with ESMTPS id ec3sm11466948wib.1.2012.02.19.12.52.45\r
+ (version=TLSv1/SSLv3 cipher=OTHER);\r
+ Sun, 19 Feb 2012 12:52:45 -0800 (PST)\r
+From: Pieter Praet <pieter@praet.org>\r
+To: David Edmondson <dme@dme.org>\r
+Subject: [PATCH v6 1/3] emacs: `notmuch-show-get-message-id': optionally\r
+ return Message-Id sans prefix\r
+Date: Sun, 19 Feb 2012 21:50:25 +0100\r
+Message-Id: <1329684627-10708-2-git-send-email-pieter@praet.org>\r
+X-Mailer: git-send-email 1.7.8.1\r
+In-Reply-To: <1329684627-10708-1-git-send-email-pieter@praet.org>\r
+References: <1327397873-20596-1-git-send-email-dme@dme.org>\r
+ <1329684627-10708-1-git-send-email-pieter@praet.org>\r
+X-Gm-Message-State:\r
+ ALoCoQkAMV4YiuoTNWaTDraCa82iDGdJ4aghgn2+1PFwSeSFHQWyqgmuENRCMMAARAydTunUYuiQ\r
+Cc: Notmuch Mail <notmuch@notmuchmail.org>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\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: Sun, 19 Feb 2012 20:52:48 -0000\r
+\r
+* emacs/notmuch-show.el\r
+\r
+ (notmuch-show-get-message-id):\r
+ Add optional arg BARE. When non-nil, return a Message-Id without\r
+ quotes and prefix, thus obviating the need to strip them off again\r
+ in various places.\r
+\r
+ (notmuch-show-stash-message-id-stripped):\r
+ Update wrt changes in `notmuch-show-get-message-id'.\r
+---\r
+ emacs/notmuch-show.el | 13 +++++++++----\r
+ 1 files changed, 9 insertions(+), 4 deletions(-)\r
+\r
+diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el\r
+index aa9ccee..cefad11 100644\r
+--- a/emacs/notmuch-show.el\r
++++ b/emacs/notmuch-show.el\r
+@@ -1329,9 +1329,14 @@ (defun notmuch-show-get-prop (prop &optional props)\r
+ (notmuch-show-get-message-properties))))\r
+ (plist-get props prop)))\r
+ \r
+-(defun notmuch-show-get-message-id ()\r
+- "Return the message id of the current message."\r
+- (concat "id:\"" (notmuch-show-get-prop :id) "\""))\r
++(defun notmuch-show-get-message-id (&optional bare)\r
++ "Return the Message-Id of the current message.\r
++\r
++If optional argument BARE is non-nil, return\r
++the Message-Id without prefix and quotes."\r
++ (if bare\r
++ (notmuch-show-get-prop :id)\r
++ (concat "id:\"" (notmuch-show-get-prop :id) "\"")))\r
+ \r
+ (defun notmuch-show-get-messages-ids ()\r
+ "Return all message ids of messages in the current thread."\r
+@@ -1789,7 +1794,7 @@ (defun notmuch-show-stash-message-id ()\r
+ (defun notmuch-show-stash-message-id-stripped ()\r
+ "Copy message ID of current message (sans `id:' prefix) to kill-ring."\r
+ (interactive)\r
+- (notmuch-common-do-stash (substring (notmuch-show-get-message-id) 4 -1)))\r
++ (notmuch-common-do-stash (notmuch-show-get-message-id t)))\r
+ \r
+ (defun notmuch-show-stash-subject ()\r
+ "Copy Subject field of current message to kill-ring."\r
+-- \r
+1.7.8.1\r
+\r