From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by arlo.cworth.org (Postfix) with ESMTP id 6A2EA6DE0C45 for ; Sat, 3 Jun 2017 10:49:06 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at cworth.org X-Spam-Flag: NO X-Spam-Score: -0.001 X-Spam-Level: X-Spam-Status: No, score=-0.001 tagged_above=-999 required=5 tests=[AWL=0.010, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from arlo.cworth.org ([127.0.0.1]) by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id wgMMdSPKW1Mq for ; Sat, 3 Jun 2017 10:49:02 -0700 (PDT) Received: from fethera.tethera.net (fethera.tethera.net [198.245.60.197]) by arlo.cworth.org (Postfix) with ESMTPS id 472C76DE11C7 for ; Sat, 3 Jun 2017 10:48:30 -0700 (PDT) Received: from remotemail by fethera.tethera.net with local (Exim 4.84_2) (envelope-from ) id 1dHD99-0002T4-MR; Sat, 03 Jun 2017 13:47:31 -0400 Received: (nullmailer pid 17074 invoked by uid 1000); Sat, 03 Jun 2017 17:48:03 -0000 From: David Bremner To: notmuch@notmuchmail.org, notmuch@freelists.org Subject: [PATCH 01/23] emacs: convert to use format-version 3 Date: Sat, 3 Jun 2017 14:47:32 -0300 Message-Id: <20170603174754.16911-2-david@tethera.net> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170603174754.16911-1-david@tethera.net> References: <20170603174754.16911-1-david@tethera.net> X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jun 2017 17:49:06 -0000 Keeping the emacs interface running old format-versions makes it impossible to test new format-versions or deprecate old ones. --- emacs/notmuch-address.el | 2 +- emacs/notmuch-mua.el | 2 +- emacs/notmuch-query.el | 2 +- emacs/notmuch-show.el | 3 ++- emacs/notmuch-tree.el | 2 +- emacs/notmuch.el | 2 +- test/T310-emacs.sh | 2 +- test/T450-emacs-show.sh | 2 +- 8 files changed, 9 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index d504ff2d..74a4584f 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -317,7 +317,7 @@ execution, CALLBACK is called when harvesting finishes." (when config-query (format " and (%s)" config-query))) from-or-to-me-query)) - (args `("address" "--format=sexp" "--format-version=2" + (args `("address" "--format=sexp" "--format-version=3" ,(if sent "--output=recipients" "--output=sender") "--deduplicate=address" ,query))) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 93747b1c..ddfb9811 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -176,7 +176,7 @@ mutiple parts get a header." (unless (bolp) (insert "\n"))) (defun notmuch-mua-reply (query-string &optional sender reply-all) - (let ((args '("reply" "--format=sexp" "--format-version=1")) + (let ((args '("reply" "--format=sexp" "--format-version=3")) (process-crypto notmuch-show-process-crypto) reply original) diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el index 436ad160..48acb551 100644 --- a/emacs/notmuch-query.el +++ b/emacs/notmuch-query.el @@ -30,7 +30,7 @@ A thread is a forest or list of trees. A tree is a two element list where the first element is a message, and the second element is a possibly empty forest of replies. " - (let ((args '("show" "--format=sexp" "--format-version=1"))) + (let ((args '("show" "--format=sexp" "--format-version=3"))) (if notmuch-show-process-crypto (setq args (append args '("--decrypt")))) (setq args (append args search-terms)) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index e7c22da0..21fcc036 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -1660,9 +1660,10 @@ current thread." ;; dme: Would it make sense to use a macro for many of these? +;; XXX TODO figure out what to do about multiple filenames (defun notmuch-show-get-filename () "Return the filename of the current message." - (notmuch-show-get-prop :filename)) + (car (notmuch-show-get-prop :filename))) (defun notmuch-show-get-header (header &optional props) "Return the named header of the current message, if any." diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index d4d40761..6812d7e9 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -917,7 +917,7 @@ the same as for the function notmuch-tree." (notmuch-tag-clear-cache) (let ((proc (notmuch-start-notmuch "notmuch-tree" (current-buffer) #'notmuch-tree-process-sentinel - "show" "--body=false" "--format=sexp" "--format-version=2" + "show" "--body=false" "--format=sexp" "--format-version=3" message-arg search-args)) ;; Use a scratch buffer to accumulate partial output. ;; This buffer will be killed by the sentinel, which diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 40b9fabd..a4a7fd8b 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -990,7 +990,7 @@ the configured default sort order." (save-excursion (let ((proc (notmuch-start-notmuch "notmuch-search" buffer #'notmuch-search-process-sentinel - "search" "--format=sexp" "--format-version=2" + "search" "--format=sexp" "--format-version=3" (if oldest-first "--sort=oldest-first" "--sort=newest-first") diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index ef599849..8a881941 100755 --- a/test/T310-emacs.sh +++ b/test/T310-emacs.sh @@ -1014,7 +1014,7 @@ YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details) === ERROR === [XXX] YYY/notmuch_fail exited with status 1 -command: YYY/notmuch_fail search --format\=sexp --format-version\=2 --sort\=newest-first tag\:inbox +command: YYY/notmuch_fail search --format\=sexp --format-version\=3 --sort\=newest-first tag\:inbox exit status: 1" test_begin_subtest "Search handles subprocess warnings" diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh index 74d546bd..d302efb6 100755 --- a/test/T450-emacs-show.sh +++ b/test/T450-emacs-show.sh @@ -191,7 +191,7 @@ This is an error (see *Notmuch errors* for more details) === ERROR === [XXX] This is an error -command: YYY/notmuch_fail show --format\\=sexp --format-version\\=1 --exclude\\=false \\' \\* \\' +command: YYY/notmuch_fail show --format\\=sexp --format-version\\=3 --exclude\\=false \\' \\* \\' exit status: 1 stderr: This is an error -- 2.11.0