aboutsummaryrefslogtreecommitdiffhomepage
path: root/emacs
diff options
context:
space:
mode:
authorGravatar Mark Walters <markwalters1009@gmail.com>2013-12-19 19:16:51 +0000
committerGravatar David Bremner <david@tethera.net>2014-01-03 07:12:28 -0400
commite36284d72df4a9f130bfd07290e068ff2550384b (patch)
tree702ace2dacb2ba2767863fa4350d1fdc8d34cba6 /emacs
parent191f41cfec03a39820239128cf7916b7c0169cf7 (diff)
emacs: tree: bare-id in tree
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.
Diffstat (limited to 'emacs')
-rw-r--r--emacs/notmuch-tree.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 8d59e65f..1dde9a7a 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 ()