[PATCH] fix breakage in `notmuch-select-tag-with-completion' due to `tag:' prefix

Subject: [PATCH] fix breakage in `notmuch-select-tag-with-completion' due to `tag:' prefix

Date: Thu, 30 Jun 2011 10:36:27 +0200

To: notmuch@notmuchmail.org

Cc:

From: Pieter Praet


Even though all tests passed, a previous patch [1] seems to have broken
`notmuch-select-tag-with-completion', because the latter expects prefix-less tags.

This is a quick'n'dirty patch, thus probably not fit for consumption.
But it Works(TM).

[1] id:"1309422029-22924-1-git-send-email-pieter@praet.org"

Signed-off-by: Pieter Praet <pieter@praet.org>
---
 emacs/notmuch.el |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index f11ec24..af66510 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -77,7 +77,11 @@ For example:
 	 (with-output-to-string
 	   (with-current-buffer standard-output
 	     (apply 'call-process notmuch-command nil t nil "search-tags" search-terms)))))
-    (completing-read prompt (split-string tag-list "\n+" t) nil nil nil)))
+    (completing-read prompt
+		     (mapcar (lambda (tag)
+			       (substring tag 4))
+			     (split-string tag-list "\n+" t))
+		     nil nil nil)))
 
 (defun notmuch-foreach-mime-part (function mm-handle)
   (cond ((stringp (car mm-handle))
-- 
1.7.4.1


Thread: