]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <david@tethera.net>
Thu, 15 Dec 2016 12:57:10 +0000 (21:57 +0900)
committerDavid Bremner <david@tethera.net>
Thu, 15 Dec 2016 12:57:10 +0000 (21:57 +0900)
Add back in no-display parameter by hand.

1  2 
emacs/notmuch.el

diff --combined emacs/notmuch.el
index 44519b7abc55449e3b00a5a63ef19cefc35cb7f6,46f14fea1dd0ff112a57e64154cc5e5eeb19ab37..d8d3afeb69b983312b637a20d05f145125c2f098
@@@ -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)
    :group 'notmuch-faces)
  
  (defface notmuch-search-flagged-face
 -  '((t
 +  '((((class color)
 +      (background dark))
 +     (:foreground "LightBlue1"))
 +    (((class color)
 +      (background light))
       (:foreground "blue")))
    "Face used in search mode face for flagged threads.
  
@@@ -566,15 -561,12 +566,15 @@@ Returns (TAG-CHANGES REGION-BEGIN REGIO
  See `notmuch-tag' for information on the format of TAG-CHANGES.
  When called interactively, this uses the region if the region is
  active.  When called directly, BEG and END provide the region.
 -If these are nil or not provided, this applies to the thread at
 -point.
 +If these are nil or not provided, then, if the region is active
 +this applied to all threads meeting the region, and if the region
 +is inactive this applies to the thread at point.
  
  If ONLY-MATCHED is non-nil, only tag matched messages."
    (interactive (notmuch-search-interactive-tag-changes))
 -  (unless (and beg end) (setq beg (point) end (point)))
 +  (unless (and beg end)
 +    (setq beg (car (notmuch-search-interactive-region))
 +        end (cadr (notmuch-search-interactive-region))))
    (let ((search-string (notmuch-search-find-stable-query-region
                        beg end only-matched)))
      (notmuch-tag search-string tag-changes)
@@@ -908,10 -900,9 +908,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))
    "Return the current query in this search buffer"
    notmuch-search-query-string)
  
- ;;;###autoload
  (put 'notmuch-search 'notmuch-doc "Search for messages.")
 -(defun notmuch-search (&optional query oldest-first target-thread target-line)
+ ;;;###autoload
 +(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.
@@@ -953,9 -944,6 +953,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 ()