]> rtime.felk.cvut.cz Git - notmuch.git/blobdiff - emacs/notmuch-show.el
emacs: set default in notmuch-read-query
[notmuch.git] / emacs / notmuch-show.el
index b8e24bc7816f1b7c68926ea03bf2dc12b36d54d9..2c6c89e9ecdd3f64966c46e2155b4f1518f80d48 100644 (file)
@@ -1203,6 +1203,15 @@ This includes:
  - the current message."
   (list (notmuch-show-get-message-id) (notmuch-show-get-message-ids-for-open-messages)))
 
+(defun notmuch-show-get-query ()
+  "Return the current query in this show buffer"
+  (if notmuch-show-query-context
+      (concat notmuch-show-thread-id
+             " and ("
+             notmuch-show-query-context
+             ")")
+    notmuch-show-thread-id))
+
 (defun notmuch-show-apply-state (state)
   "Apply STATE to the current buffer.