]> git.notmuchmail.org Git - notmuch/commitdiff
emacs: Eliminate warning of calling function with excess arguments.
authorCarl Worth <cworth@cworth.org>
Thu, 28 Oct 2010 01:04:38 +0000 (18:04 -0700)
committerCarl Worth <cworth@cworth.org>
Thu, 28 Oct 2010 01:04:38 +0000 (18:04 -0700)
Yet another case of "how could this have possibly worked before?!".

I guess we were just getting very lucky with the emacs lisp calling
conventions and what happens with extra arguments, but, ick! Much
better now.

emacs/notmuch.el

index ff9b519b2d6052cf52d68b825b48ed7946653f1a..a84852756d66366ef54be50924f210ea485821f5 100644 (file)
@@ -796,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)))