X-Git-Url: https://git.notmuchmail.org/git?a=blobdiff_plain;f=emacs%2Fnotmuch.el;h=5a8c9570d80c6bab5b00d9c57771ead630a84b89;hb=5461c31d648f8ee6a8fb713c96ad10bc6d733c29;hp=b8d9c44475d0bd86c9ae56538799a3baa1baacee;hpb=08fde50bf3a4c54f6413aff4052e0d84392463f9;p=notmuch diff --git a/emacs/notmuch.el b/emacs/notmuch.el index b8d9c444..5a8c9570 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -58,6 +58,7 @@ (require 'notmuch-hello) (require 'notmuch-maildir-fcc) (require 'notmuch-message) +(require 'notmuch-parser) (defcustom notmuch-search-result-format `(("date" . "%12s ") @@ -809,13 +810,6 @@ non-authors is found, assume that all of the authors match." (setq notmuch-search-target-thread "found") (goto-char beg))))) -(defun notmuch-search-show-error (string &rest objects) - (save-excursion - (goto-char (point-max)) - (insert "Error: Unexpected output from notmuch search:\n") - (insert (apply #'format string objects)) - (insert "\n"))) - (defun notmuch-search-process-filter (proc string) "Process and filter the output of \"notmuch search\"" (let ((results-buf (process-buffer proc)) @@ -829,8 +823,7 @@ non-authors is found, assume that all of the authors match." (save-excursion (goto-char (point-max)) (insert string)) - (notmuch-json-parse-partial-list 'notmuch-search-show-result - 'notmuch-search-show-error + (notmuch-sexp-parse-partial-list 'notmuch-search-show-result results-buf))))) (defun notmuch-search-tag-all (&optional tag-changes) @@ -933,7 +926,7 @@ Other optional parameters are used as follows: (save-excursion (let ((proc (notmuch-start-notmuch "notmuch-search" buffer #'notmuch-search-process-sentinel - "search" "--format=json" "--format-version=1" + "search" "--format=sexp" "--format-version=1" (if oldest-first "--sort=oldest-first" "--sort=newest-first")