]> git.cworth.org Git - obsolete/notmuch-old/blobdiff - emacs/notmuch-show.el
emacs: Use the header line to show the subject of the thread.
[obsolete/notmuch-old] / emacs / notmuch-show.el
index 9c5c3cc45509088f01592d89b4b415dd290204e8..0d3c4c2789d80043af36dac4dd598609ab898bde 100644 (file)
@@ -382,7 +382,7 @@ current buffer, if possible."
   (make-symbol (concat "notmuch-show-" type)))
 
 (defun notmuch-show-strip-re (string)
-  (replace-regexp-in-string "^\\([Rr]e: *\\)+" "" string))
+  (replace-regexp-in-string "\\([Rr]e: *\\)+" "" string))
 
 (defvar notmuch-show-previous-subject "")
 (make-variable-buffer-local 'notmuch-show-previous-subject)
@@ -550,6 +550,10 @@ function is used. "
     ;; Move straight to the first open message
     (if (not (notmuch-show-message-visible-p))
        (notmuch-show-next-open-message))
+
+    ;; Set the header line to the subject of the first open message.
+    (setq header-line-format (notmuch-show-strip-re (notmuch-show-get-subject)))
+
     (notmuch-show-mark-read)))
 
 (defvar notmuch-show-stash-map