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 507DE431FDB for ; Thu, 19 Dec 2013 11:17:03 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: 0.201 X-Spam-Level: X-Spam-Status: No, score=0.201 tagged_above=-999 required=5 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7] autolearn=disabled 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 0v3l629UZ757 for ; Thu, 19 Dec 2013 11:16:56 -0800 (PST) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by olra.theworths.org (Postfix) with ESMTPS id 64B33431FD8 for ; Thu, 19 Dec 2013 11:16:56 -0800 (PST) Received: by mail-wi0-f178.google.com with SMTP id bz8so2693816wib.5 for ; Thu, 19 Dec 2013 11:16:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=T03jD7nN31MmU9qwvgBWIDDaCZYoJY9ifzED5lfX29I=; b=cZHc+av3QpKaw0fOw11M85bMX83mA+y6gDEWmyH0FjimKwX/q6eTcfVD92zO4LwJzk 9OFSAUgGoqedEm2oaa+RR30Gki+RSZDBsiKkvWPp1CVwqk8GQrF2VJgQwOfhSfiH3x59 QwLMW9ewRpYLBSv/1c94jfhZyNylqGZg9A4Kazu18GcSRCgubHS9jGCTL+ZkX6Ut9D5V zbXLJBjmcF0BFMmmh41FYjskcPK3TRyq+vY19yGr67hTV3QON+BwR2z4yDDPlyAzJxck oJpN0XmChxpO5K8z2SrruuD1l67veuMyAEsvPs/siTBuzYEn9HtCD04Gk94M8c0xzQvi LtIQ== X-Received: by 10.194.86.70 with SMTP id n6mr3021866wjz.71.1387480615291; Thu, 19 Dec 2013 11:16:55 -0800 (PST) Received: from localhost (93-97-24-31.zone5.bethere.co.uk. [93.97.24.31]) by mx.google.com with ESMTPSA id x9sm726544wjf.11.2013.12.19.11.16.54 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Thu, 19 Dec 2013 11:16:54 -0800 (PST) From: Mark Walters To: notmuch@notmuchmail.org Subject: [PATCH] emacs: tree: bare-id in tree Date: Thu, 19 Dec 2013 19:16:51 +0000 Message-Id: <1387480611-15789-1-git-send-email-markwalters1009@gmail.com> X-Mailer: git-send-email 1.7.9.1 X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 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, 19 Dec 2013 19:17:04 -0000 Previously notmuch-tree-get-message-id always returned the id including the prefix "id:". Modify the function to take an optional `bare' argument saying to return the raw string. This will be useful later and brings the function in line with notmuch-show-get-message-id. --- This functionality will be useful later. I think it reasonable to put it in now as it does bring notmuch-tree-get-message-id in line with notmuch-show-get-message-id which already has this option. Best wishes Mark emacs/notmuch-tree.el | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 8d59e65..1dde9a7 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -319,11 +319,13 @@ correct message properties." "Return the tags of the current message." (notmuch-tree-get-prop :tags)) -(defun notmuch-tree-get-message-id () +(defun notmuch-tree-get-message-id (&optional bare) "Return the message id of the current message." (let ((id (notmuch-tree-get-prop :id))) (if id - (notmuch-id-to-query id) + (if bare + id + (notmuch-id-to-query id)) nil))) (defun notmuch-tree-get-match () -- 1.7.9.1