;;
;; Authors: David Edmondson <dme@dme.org>
-(require 'json)
(require 'message)
(require 'mm-view)
(require 'format-spec)
(unless (bolp) (insert "\n")))
(defun notmuch-mua-reply (query-string &optional sender reply-all)
- (let ((args '("reply" "--format=json"))
+ (let ((args '("reply" "--format=sexp" "--format-version=1"))
reply
original)
(when notmuch-show-process-crypto
(setq args (append args '("--reply-to=sender"))))
(setq args (append args (list query-string)))
- ;; Get the reply object as JSON, and parse it into an elisp object.
- (with-temp-buffer
- (apply 'call-process (append (list notmuch-command nil (list t nil) nil) args))
- (goto-char (point-min))
- (let ((json-object-type 'plist)
- (json-array-type 'list)
- (json-false 'nil))
- (setq reply (json-read))))
+ ;; Get the reply object as SEXP, and parse it into an elisp object.
+ (setq reply (apply #'notmuch-call-notmuch-sexp args))
;; Extract the original message to simplify the following code.
(setq original (plist-get reply :original))