]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch-lib.el
emacs: `notmuch-show-get-message-id': optionally return Message-Id sans prefix
[notmuch] / emacs / notmuch-lib.el
index 241fe8c445d2c96c07f3efc80262df022666e3f1..d315f7656e9bc4a004575faa14be386a858cdb83 100644 (file)
@@ -69,6 +69,9 @@
 
 ;;
 
+(defvar notmuch-search-history nil
+  "Variable to store notmuch searches history.")
+
 (defcustom notmuch-saved-searches nil
   "A list of saved searches to display."
   :type '(alist :key-type string :value-type string)
@@ -130,6 +133,15 @@ the user hasn't set this variable with the old or new value."
   (interactive)
   (kill-buffer (current-buffer)))
 
+(defun notmuch-prettify-subject (subject)
+  ;; This function is used by `notmuch-search-process-filter' which
+  ;; requires that we not disrupt its' matching state.
+  (save-match-data
+    (if (and subject
+            (string-match "^[ \t]*$" subject))
+       "[No Subject]"
+      subject)))
+
 ;;
 
 (defun notmuch-common-do-stash (text)