X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=428ae6c4742158800d8693eb4d81a12dcd09c71c;hb=98cf886120066c20d0f6a69c6dcfc50741badca5;hp=378c004bfa69ddbbe6c8354667c5a912422fa32b;hpb=45ad21fba18730cdf76725b8a132fc52ba4190a7;p=notmuch diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 378c004b..428ae6c4 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -54,6 +54,7 @@ (require 'notmuch-lib) (require 'notmuch-show) (require 'notmuch-mua) +(require 'notmuch-hello) (defcustom notmuch-search-result-format `(("date" . "%s ") @@ -221,8 +222,6 @@ For a mouse binding, return nil." (defvar notmuch-search-query-string) (defvar notmuch-search-target-thread) (defvar notmuch-search-target-line) -(defvar notmuch-search-oldest-first t - "Show the oldest mail first in the search-mode") (defvar notmuch-search-continuation) (defvar notmuch-search-disjunctive-regexp "\\<[oO][rR]\\>") @@ -582,11 +581,13 @@ matching will be applied." ((string-equal field "count") (insert (format (cdr (assoc field notmuch-search-result-format)) count))) ((string-equal field "authors") - (insert (let ((sample (format (cdr (assoc field notmuch-search-result-format)) ""))) - (if (> (length authors) - (length sample)) - (concat (substring authors 0 (- (length sample) 4)) "... ") - (format (cdr (assoc field notmuch-search-result-format)) authors))))) + (insert (let* ((format-string (cdr (assoc field notmuch-search-result-format))) + (formatted-sample (format format-string "")) + (formatted-authors (format format-string authors))) + (if (> (length formatted-authors) + (length formatted-sample)) + (concat (substring authors 0 (- (length formatted-sample) 4)) "... ") + formatted-authors)))) ((string-equal field "subject") (insert (format (cdr (assoc field notmuch-search-result-format)) subject))) ((string-equal field "tags") @@ -809,9 +810,9 @@ current search results AND that are tagged with the given tag." ;;;###autoload (defun notmuch () - "Run notmuch to display all mail with tag of 'inbox'" + "Run notmuch and display saved searches, known tags, etc." (interactive) - (notmuch-search "tag:inbox" notmuch-search-oldest-first)) + (notmuch-hello)) (setq mail-user-agent 'notmuch-user-agent)