From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yNlEMtj8IWGDGQEAgWs5BA (envelope-from ) for ; Sun, 22 Aug 2021 09:29:28 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id eEvrLdj8IWELSgAAB5/wlQ (envelope-from ) for ; Sun, 22 Aug 2021 07:29:28 +0000 Received: from mail.notmuchmail.org (nmbug.tethera.net [144.217.243.247]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D49C112D7C for ; Sun, 22 Aug 2021 09:29:27 +0200 (CEST) Received: from nmbug.tethera.net (localhost [127.0.0.1]) by mail.notmuchmail.org (Postfix) with ESMTP id 09D65203A7; Sun, 22 Aug 2021 03:29:24 -0400 (EDT) Received: from lahtoruutu.iki.fi (lahtoruutu.iki.fi [185.185.170.37]) by mail.notmuchmail.org (Postfix) with ESMTPS id ED01A1FE97 for ; Sun, 22 Aug 2021 03:29:21 -0400 (EDT) Received: from guru.guru-group.fi (unknown [IPv6:2a02:2380:1:9:5054:ff:feb7:a4bc]) (using TLSv1.2 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) (Authenticated sender: too) by lahtoruutu.iki.fi (Postfix) with ESMTPSA id C1C341B000FB; Sun, 22 Aug 2021 10:29:20 +0300 (EEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1629617360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bINdD2FWat+5NFuUSg7NC5ytsmUmit6T7iRlAHKPmrA=; b=NtqzWeTnc9cC7vz6y0EjBeI3WG7xbzlZpyT4g8qtaZ9etX6KR/tSS+VjaiQ71mmgZ9OaVE bermdQB29AIWLowtNH9UH5h61S9JjoNzeBKsQ2GnQc/E+KzYXLY0xdlkRpIshVZqAEYBpu p9GR0bbTvAjcb/Hj8L9q6utci9TdKkXnTgRMy3IWhjP/YsxcZZ2WOSZj+41gRV/Vdp/rCf JoP5PAxaXIMq1QQ4HH6CUI0tqXjUO/awzQlv+eXpBLsQd02Qm1+57NSFGDxLw46JtFRUip +5oWuvP4xc90Ao2GuSdmSdLiNFBUVc0SIy9f6QxZTNHulaW32PiguabloKJGWA== From: Tomi Ollila To: David Bremner , notmuch@notmuchmail.org Subject: Re: [PATCH] CLI: define and use format version 5 In-Reply-To: <20210822000011.211950-1-david@tethera.net> References: <87r1ev96mh.fsf@tethera.net> <20210822000011.211950-1-david@tethera.net> User-Agent: Notmuch/0.32+21~gfdddd4c (https://notmuchmail.org) Emacs/27.1 X-Face: HhBM'cA~ MIME-Version: 1.0 ARC-Authentication-Results: i=1; ORIGINATING; auth=pass smtp.auth=too smtp.mailfrom=tomi.ollila@iki.fi ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=iki.fi; s=lahtoruutu; t=1629617360; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=bINdD2FWat+5NFuUSg7NC5ytsmUmit6T7iRlAHKPmrA=; b=WvkagshnCH/dP1FidvYo8GygEyxVPGaFus6MKk2CnDBPnYd0A1j2vRCNvgvLhpUlNokNDR U7gOnihCOJvggGx8RHgbT7zPbtdBzeTc3XZMjH1BdZk/aFO/oL4jEeqiHmLLS9+q5u9Fmv rjc0/2QxStjQO6XJ4bLKfAS+AtnLXerCIHOZtM0LLX4RHINkeFyINlVOZZ3Gi1MjE7Ykz8 eugN52QMD2yD/42Qp8dOLhZrWKOys5+3IVyzRLZOzsbIwzUNk3rZ1Vb6wUg4qjpLhxL5Zs ii/V0wkliPEeGFk7+dZwxuWlzMs4vHyUvIx9nckSmgLeiZBhwtKMwF5NcaOy2g== ARC-Seal: i=1; s=lahtoruutu; d=iki.fi; t=1629617360; a=rsa-sha256; cv=none; b=tC6hRi+gpn4qEzfZ47iVE0fa8F0x4lbzNwSMu8UY7lMu//L2BWf5YurMpEU8O8fz910Vo1 74yt+lrX8dT/bv4Ov8X9z+qbEycAB8d14hC8AYcT8P/jXL0QeNLvuuJNS0TsMw9FOqG4HG hTZLVqHDlH/G7UosUhyTaC117HGpddr2NoXWbx/TYVZ23f5Oihqmj8i2m7p66cU9VCBYIG IeXBNTWoo/OTmN5MOyt6IxaLXJsuHcbZX/+f1tw4YcVVEBX7fGpGT6zJ2ORgQxfNwBiec/ 1qSx6nEFtuX/zEXc/N8Ajsd1qt08+FWpmHFQ3BksRWYkSF6G9nk3ioSjCw87Pw== Message-ID-Hash: 5WOOG6ZS4FMPLP2CLJNMOYGOSDJZ4OL2 X-Message-ID-Hash: 5WOOG6ZS4FMPLP2CLJNMOYGOSDJZ4OL2 X-MailFrom: tomi.ollila@iki.fi X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-notmuch.notmuchmail.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.1 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Help: List-Post: List-Subscribe: List-Unsubscribe: Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1629617368; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=s2eBG9Tw9KTOih6BG6lXMLfND1JyGe+8sxuBsrvQyz8=; b=a134tPXXcqbZCgJ+MbEwdpflF5UUZwTArjoEBu38RiANNM3LnYp7nUlci46b7a/c277x8G 2F8vJ7hRLCiNmCM+Fr9G+PcDLvQ34d35H87sqmHJB/G9IoVeVgzCbxUIHUIuHGCmI31t9N bkw44AGiKLueuTg5bRyvnxun+kMUTxlGXqYjhtq09u35D2Cj8oRudluhANifgcCZUHcswF At5gMfZWS/NS9tYebJGt0wJvPnLaV7wQl2nZ+DR6PMq3UXl/Iac/+QtIO2q3R+P3TUyzff za8aIkHMctem6jTq92uooXXJCVjh3Dq4gq1ZSfHdzuO3jFP1iT4JgMk88bgwKg== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1629617368; a=rsa-sha256; cv=fail; b=o/yxwbOe9f9VWvNOBbosJ/yn8tdertXVRTVOP/S2XR6bVX3vXJs7YF7CRdEauzaBz7Y5wg 4T5HaJ5pPmVddaWan7hVzEhRiH8CoajPoNdPypXuR+2Ti8D06n09G7r1rQDH1CvhvkOj/v RWord44Y84qaKbRI0Bx+Kk7bjlkhWPE4FdqSG32OEmQEHiNlqnA1l/nYh4ZOLV4VrgfmyR E4qrzKaOPI+kMEof7sCUyvUhQqwfuiGruQMl4i6iE4zXN07690TH60kY7M+4ScQiBJ/aO+ wfjx+xi63oR6KHccWvo9j7ALP1Ei2VtzVjxq8W8X6d5VVVRmRApnrEcZg4WEtw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=NtqzWeTn; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Spam-Score: 2.50 Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=iki.fi header.s=lahtoruutu header.b=NtqzWeTn; arc=reject ("signature check failed: fail, {[1] = sig:iki.fi:reject}"); dmarc=none; spf=pass (aspmx1.migadu.com: domain of notmuch-bounces@notmuchmail.org designates 144.217.243.247 as permitted sender) smtp.mailfrom=notmuch-bounces@notmuchmail.org X-Migadu-Queue-Id: D49C112D7C X-Spam-Score: 2.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: 3E5ausxCb1j3 On Sat, Aug 21 2021, David Bremner wrote: > This is a bit of a cheat, since the format does not actually > change. On the other hand it is fairly common to do something like > this to shared libary SONAMEs when the ABI changes in some subtle way. > It does rely on the format-version argument being early enough on the > command line to generate a sensible error message. looks 0.33 to me. Tomi > --- > devel/schemata | 6 +++++- > emacs/notmuch-address.el | 2 +- > emacs/notmuch-mua.el | 2 +- > emacs/notmuch-query.el | 2 +- > emacs/notmuch-tree.el | 2 +- > emacs/notmuch.el | 2 +- > notmuch-client.h | 2 +- > test/T310-emacs.sh | 2 +- > test/T450-emacs-show.sh | 2 +- > 9 files changed, 13 insertions(+), 9 deletions(-) > > diff --git a/devel/schemata b/devel/schemata > index ae84a528..01e3a3df 100644 > --- a/devel/schemata > +++ b/devel/schemata > @@ -14,7 +14,7 @@ are interleaved. Keys are printed as keywords (symbols preceded by a > colon), e.g. (:id "123" :time 54321 :from "foobar"). Null is printed as > nil, true as t and false as nil. > > -This is version 4 of the structured output format. > +This is version 5 of the structured output format. > > Version history > --------------- > @@ -36,6 +36,10 @@ v4 > - (notmuch 0.29) added message.crypto to identify overall message > cryptographic state > > +v5 > +- sorting support for notmuch show (no change to actual schema, > + just new command line argument) > + > Common non-terminals > -------------------- > > diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el > index f0af6667..9fc13bc5 100644 > --- a/emacs/notmuch-address.el > +++ b/emacs/notmuch-address.el > @@ -308,7 +308,7 @@ execution, CALLBACK is called when harvesting finishes." > (and config-query > (format " and (%s)" config-query))) > from-or-to-me-query)) > - (args `("address" "--format=sexp" "--format-version=4" > + (args `("address" "--format=sexp" "--format-version=5" > ,(if sent "--output=recipients" "--output=sender") > "--deduplicate=address" > ,query))) > diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el > index 17954fb3..f510c043 100644 > --- a/emacs/notmuch-mua.el > +++ b/emacs/notmuch-mua.el > @@ -235,7 +235,7 @@ Typically this is added to `notmuch-mua-send-hook'." > ;;; Mua reply > > (defun notmuch-mua-reply (query-string &optional sender reply-all) > - (let ((args '("reply" "--format=sexp" "--format-version=4")) > + (let ((args '("reply" "--format=sexp" "--format-version=5")) > (process-crypto notmuch-show-process-crypto) > reply > original) > diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el > index d7349b77..5c7f4f8d 100644 > --- a/emacs/notmuch-query.el > +++ b/emacs/notmuch-query.el > @@ -31,7 +31,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=4"))) > + (let ((args '("show" "--format=sexp" "--format-version=5"))) > (when notmuch-show-process-crypto > (setq args (append args '("--decrypt=true")))) > (setq args (append args search-terms)) > diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el > index ef1ca4c5..ec803294 100644 > --- a/emacs/notmuch-tree.el > +++ b/emacs/notmuch-tree.el > @@ -1101,7 +1101,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=4" > + "show" "--body=false" "--format=sexp" "--format-version=5" > sort-arg 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 351334aa..739cb93b 100644 > --- a/emacs/notmuch.el > +++ b/emacs/notmuch.el > @@ -1020,7 +1020,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=4" > + "search" "--format=sexp" "--format-version=5" > (if oldest-first > "--sort=oldest-first" > "--sort=newest-first") > diff --git a/notmuch-client.h b/notmuch-client.h > index 8227fea4..8643a63f 100644 > --- a/notmuch-client.h > +++ b/notmuch-client.h > @@ -137,7 +137,7 @@ chomp_newline (char *str) > * this. New (required) map fields can be added without increasing > * this. > */ > -#define NOTMUCH_FORMAT_CUR 4 > +#define NOTMUCH_FORMAT_CUR 5 > /* The minimum supported structured output format version. Requests > * for format versions below this will return an error. */ > #define NOTMUCH_FORMAT_MIN 1 > diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh > index 7b70175b..d69d94a3 100755 > --- a/test/T310-emacs.sh > +++ b/test/T310-emacs.sh > @@ -1060,7 +1060,7 @@ End of search results. > YYY/notmuch_fail exited with status 1 (see *Notmuch errors* for more details) > === ERROR === > YYY/notmuch_fail exited with status 1 > -command: YYY/notmuch_fail search --format\=sexp --format-version\=4 --sort\=newest-first tag\:inbox > +command: YYY/notmuch_fail search --format\=sexp --format-version\=5 --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 9d08d2cc..a750cc4d 100755 > --- a/test/T450-emacs-show.sh > +++ b/test/T450-emacs-show.sh > @@ -192,7 +192,7 @@ test_expect_equal "$(notmuch_emacs_error_sanitize notmuch_fail OUTPUT MESSAGES E > This is an error (see *Notmuch errors* for more details) > === ERROR === > This is an error > -command: YYY/notmuch_fail show --format\\=sexp --format-version\\=4 --decrypt\\=true --exclude\\=false \\' \\* \\' > +command: YYY/notmuch_fail show --format\\=sexp --format-version\\=5 --decrypt\\=true --exclude\\=false \\' \\* \\' > exit status: 1 > stderr: > This is an error > -- > 2.32.0 > _______________________________________________ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-leave@notmuchmail.org