]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <david@tethera.net>
Wed, 26 Oct 2016 00:57:23 +0000 (21:57 -0300)
committerDavid Bremner <david@tethera.net>
Wed, 26 Oct 2016 00:57:23 +0000 (21:57 -0300)
merge interesting buffers bugfix from release

1  2 
emacs/notmuch.el

diff --combined emacs/notmuch.el
index bd08aa0c6841ce5f08dbface44e3fe6bf2b29385,68a4c0b16fcb1869264db76cbf120caf805e9ea8..2fc72b7eade9a19560389fbcb5e8f6dbba0b76cb
@@@ -169,7 -169,6 +169,7 @@@ there will be called at other points o
      (define-key map "t" 'notmuch-search-filter-by-tag)
      (define-key map "l" 'notmuch-search-filter)
      (define-key map [mouse-1] 'notmuch-search-show-thread)
 +    (define-key map "k" 'notmuch-tag-jump)
      (define-key map "*" 'notmuch-search-tag-all)
      (define-key map "a" 'notmuch-search-archive-thread)
      (define-key map "-" 'notmuch-search-remove-tag)
@@@ -901,10 -900,9 +901,10 @@@ PROMPT is the string to prompt with.
                  (process-lines notmuch-command "search" "--output=tags" "*")))
         (completions
         (append (list "folder:" "path:" "thread:" "id:" "date:" "from:" "to:"
 -                     "subject:" "attachment:" "mimetype:")
 +                     "subject:" "attachment:")
                 (mapcar (lambda (tag) (concat "tag:" tag)) all-tags)
 -               (mapcar (lambda (tag) (concat "is:" tag)) all-tags))))
 +               (mapcar (lambda (tag) (concat "is:" tag)) all-tags)
 +               (mapcar (lambda (mimetype) (concat "mimetype:" mimetype)) (mailcap-mime-types)))))
      (let ((keymap (copy-keymap minibuffer-local-map))
          (current-query (case major-mode
                           (notmuch-search-mode (notmuch-search-get-query))
  
  ;;;###autoload
  (put 'notmuch-search 'notmuch-doc "Search for messages.")
 -(defun notmuch-search (&optional query oldest-first target-thread target-line)
 +(defun notmuch-search (&optional query oldest-first target-thread target-line no-display)
    "Display threads matching QUERY in a notmuch-search buffer.
  
  If QUERY is nil, it is read interactively from the minibuffer.
@@@ -946,9 -944,6 +946,9 @@@ Other optional parameters are used as f
                   current if it appears in the search results.
    TARGET-LINE: The line number to move to if the target thread does not
                 appear in the search results.
 +  NO-DISPLAY: Do not try to foreground the search results buffer. If it is
 +              already foregrounded i.e. displayed in a window, this has no
 +              effect, meaning the buffer will remain visible.
  
  When called interactively, this will prompt for a query and use
  the configured default sort order."
  
    (let* ((query (or query (notmuch-read-query "Notmuch search: ")))
         (buffer (get-buffer-create (notmuch-search-buffer-title query))))
 -    (switch-to-buffer buffer)
 +    (if no-display
 +      (set-buffer buffer)
 +      (switch-to-buffer buffer))
      (notmuch-search-mode)
      ;; Don't track undo information for this buffer
      (set 'buffer-undo-list t)
  (defun notmuch-search-refresh-view ()
    "Refresh the current view.
  
 -Kills the current buffer and runs a new search with the same
 +Erases the current buffer and runs a new search with the same
  query string as the current search. If the current thread is in
  the new search results, then point will be placed on the same
  thread. Otherwise, point will be moved to attempt to be in the
  same relative position within the new buffer."
 +  (interactive)
    (let ((target-line (line-number-at-pos))
        (oldest-first notmuch-search-oldest-first)
        (target-thread (notmuch-search-find-thread-id 'bare))
        (query notmuch-search-query-string))
 -    (notmuch-bury-or-kill-this-buffer)
 -    (notmuch-search query oldest-first target-thread target-line)
 +    ;; notmuch-search erases the current buffer.
 +    (notmuch-search query oldest-first target-thread target-line t)
      (goto-char (point-min))))
  
  (defun notmuch-search-toggle-order ()
@@@ -1066,8 -1058,9 +1066,9 @@@ current search results AND that are tag
    (with-current-buffer b
      (memq major-mode '(notmuch-show-mode
                       notmuch-search-mode
+                      notmuch-tree-mode
                       notmuch-hello-mode
-                      message-mode))))
+                      notmuch-message-mode))))
  
  ;;;###autoload
  (defun notmuch-cycle-notmuch-buffers ()