]> git.notmuchmail.org Git - notmuch/blobdiff - emacs/notmuch.el
documentation: Add the "files" option to the synopsis of "search --output="
[notmuch] / emacs / notmuch.el
index 8d69fc8751082b12fedea6e042c066e33f9b77a2..a84852756d66366ef54be50924f210ea485821f5 100644 (file)
@@ -575,9 +575,10 @@ This function advances the next thread when finished."
                        (if (and atbob
                                 (not (string= notmuch-search-target-thread "found")))
                            (set 'never-found-target-thread t))))))
-             (if (and never-found-target-thread
+             (when (and never-found-target-thread
                       notmuch-search-target-line)
-                 (goto-line notmuch-search-target-line)))))))
+                 (goto-char (point-min))
+                 (forward-line (1- notmuch-search-target-line))))))))
 
 (defcustom notmuch-search-line-faces nil
   "Tag/face mapping for line highlighting in notmuch-search.
@@ -795,9 +796,12 @@ The optional parameters are used as follows:
       (goto-char (point-min))
       (save-excursion
        (let ((proc (start-process-shell-command
-                    "notmuch-search" buffer notmuch-command "search"
-                    (if oldest-first "--sort=oldest-first" "--sort=newest-first")
-                    (shell-quote-argument query))))
+                    "notmuch-search" buffer
+                    (concat notmuch-command " search "
+                            (if oldest-first
+                                "--sort=oldest-first "
+                              "--sort=newest-first ")
+                            (shell-quote-argument query)))))
          (set-process-sentinel proc 'notmuch-search-process-sentinel)
          (set-process-filter proc 'notmuch-search-process-filter))))
     (run-hooks 'notmuch-search-hook)))