]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch.el
emacs: Fix typo in line-wrapping in documentation of notmuch-show.
[notmuch] / emacs / notmuch.el
index ee5448de3c79ebf04c9d8d87513f5add971da9b9..b32230e03672cd5bb6283e0469bf425d40f9861f 100644 (file)
@@ -268,6 +268,7 @@ For a mouse binding, return nil."
     (define-key map "-" 'notmuch-search-remove-tag)
     (define-key map "+" 'notmuch-search-add-tag)
     (define-key map (kbd "RET") 'notmuch-search-show-thread)
+    (define-key map "F" 'notmuch-folder)
     map)
   "Keymap for \"notmuch search\" buffers.")
 (fset 'notmuch-search-mode-map notmuch-search-mode-map)
@@ -410,9 +411,19 @@ Complete list of currently available key bindings:
 (defun notmuch-search-show-thread ()
   "Display the currently selected thread."
   (interactive)
-  (let ((thread-id (notmuch-search-find-thread-id)))
+  (let ((thread-id (notmuch-search-find-thread-id))
+       (subject (notmuch-search-find-subject))
+       buffer-name)
+    (when (string-match "^[ \t]*$" subject)
+      (setq subject "[No Subject]"))
+    (setq buffer-name (concat "*"
+                             (truncate-string-to-width subject 32 nil nil t)
+                             "*"))
     (if (> (length thread-id) 0)
-       (notmuch-show thread-id (current-buffer) notmuch-search-query-string)
+       (notmuch-show thread-id
+                     (current-buffer)
+                     notmuch-search-query-string
+                     buffer-name)
       (error "End of search results"))))
 
 (defun notmuch-search-reply-to-thread ()