[PATCH 2/3] doc: read notmuch-tree.rsti for rst_epilog
This is needed so that docstrings from notmuch-tree.el (in particular notmuch-tree-toggle-order) can be used in the emacs documentation. --- doc/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/conf.py b/doc/conf.py index 4a4a3421..3ec55a61 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -45,7 +45,7 @@ if tags.has('WITH_EMACS'): # Hacky reimplementation of include to workaround limitations of # sphinx-doc lines = ['.. include:: /../emacs/rstdoc.rsti\n\n'] # in the source tree -for file in ('notmuch.rsti', 'notmuch-lib.rsti', 'notmuch-show.rsti', 'notmuch-tag.rsti'): +for file in ('notmuch.rsti', 'notmuch-lib.rsti', 'notmuch-show.rsti', 'notmuch-tag.rsti', 'notmuch-tree.rsti'): lines.extend(open(rsti_dir+'/'+file)) rst_epilog = ''.join(lines) del lines -- 2.32.0 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[PATCH 3/3] doc/emacs: use :code: for some missing references
It's not obvious how to reference (non-notmuch) emacs variables and functions in a sphinx document. --- doc/notmuch-emacs.rst | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst index 36dcb116..12ee25e5 100644 --- a/doc/notmuch-emacs.rst +++ b/doc/notmuch-emacs.rst @@ -385,10 +385,10 @@ Sending Mail :index:`mail-user-agent` - Emacs consults the variable :ref:`mail-user-agent` to choose a mail - sending package for commands like :ref:`report-emacs-bug` and - :ref:`compose-mail`. To use ``notmuch`` for this, customize this - variable to the symbol :ref:`notmuch-user-agent`. + Emacs consults the variable :code:`mail-user-agent` to choose a mail + sending package for commands like :code:`report-emacs-bug` and + :code:`compose-mail`. To use ``notmuch`` for this, customize this + variable to the symbol :code:`notmuch-user-agent`. Init File - -- 2.32.0 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[PATCH 1/3] emacs/rstdoc: escape '*'
This is just a regular character in docstrings (as it is fairly often used in lisp identifiers and buffer names) but is the start of emphasis in rst. This change is needed to quell a noisy warning when including notmuch-tree.rsti --- emacs/rstdoc.el | 1 + 1 file changed, 1 insertion(+) diff --git a/emacs/rstdoc.el b/emacs/rstdoc.el index c7c13015..5b8a9d01 100644 --- a/emacs/rstdoc.el +++ b/emacs/rstdoc.el @@ -71,6 +71,7 @@ ("`" . "`") ("\001" . "'") ("\002" . "`") + ("[*]" . "*") ("^[[:space:]]*$" . "|br|") ("^[[:space:]]" . "|indent| ")) "list of (regex . replacement) pairs") -- 2.32.0 ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: [PATCH 1/7] test/expect_equal_file: whitespace cleanup
David Bremner writes: > No functional change, just reindent to Emacs defaults. All patches in this series are now applied to master d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
[PATCH] CLI: define and use format version 5
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. --- 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 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
Re: [PATCH 4/7] test/path-config: use test_expect_equal_file_nonempty
On Wed, Aug 04 2021, David Bremner wrote: > This is more robust against crashes when the expected output is also > generated by notmuch. In the case where the expected output is > explicit, it seems like overkill. 1,2,3 and 4 in this series look good to me Tomi (on mobile device) > --- > test/T055-path-config.sh | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh > index bb3bf665..8271579f 100755 > --- a/test/T055-path-config.sh > +++ b/test/T055-path-config.sh > @@ -141,13 +141,13 @@ EOF > notmuch tag -inbox '*' > notmuch restore < EXPECTED > notmuch dump > OUTPUT > -test_expect_equal_file EXPECTED OUTPUT > +test_expect_equal_file_nonempty EXPECTED OUTPUT > > test_begin_subtest "reindex ($config)" > notmuch search --output=messages '*' > EXPECTED > notmuch reindex '*' > notmuch search --output=messages '*' > OUTPUT > -test_expect_equal_file EXPECTED OUTPUT > +test_expect_equal_file_nonempty EXPECTED OUTPUT > > test_begin_subtest "use existing database ($config)" > output=$(notmuch new) > @@ -169,7 +169,7 @@ EOF > test_begin_subtest "Show a raw message ($config)" > add_message > notmuch show --format=raw id:$gen_msg_id > OUTPUT > -test_expect_equal_file $gen_msg_filename OUTPUT > +test_expect_equal_file_nonempty $gen_msg_filename OUTPUT > rm -f $gen_msg_filename > > test_begin_subtest "reply ($config)" > @@ -198,14 +198,13 @@ EOF > mkdir -p "$MAIL_DIR"/{cur,new,tmp} > notmuch insert < "$gen_msg_filename" > cur_msg_filename=$(notmuch search --output=files > "subject:insert-subject") > -test_expect_equal_file "$cur_msg_filename" "$gen_msg_filename" > - > +test_expect_equal_file_nonempty "$cur_msg_filename" "$gen_msg_filename" > > test_begin_subtest "compact+search ($config)" > notmuch search --output=messages '*' | sort > EXPECTED > notmuch compact > notmuch search --output=messages '*' | sort > OUTPUT > -test_expect_equal_file EXPECTED OUTPUT > +test_expect_equal_file_nonempty EXPECTED OUTPUT > > test_begin_subtest "upgrade backup ($config)" > features=$(xapian-metadata get $XAPIAN_PATH features | grep -v > "^relative directory paths") > -- > 2.30.2 > ___ > notmuch mailing list -- notmuch@notmuchmail.org > To unsubscribe send an email to notmuch-le...@notmuchmail.org ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: [PATCH 7/7] doc: document database search algorithm.
David Bremner writes: > Essentially a translation of the function _choose_database_path for > human consumption. As a bonus, document environment variable > NOTMUCH_DATABASE applied to master d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: performance in emacs displaying a huge thread
Alan Schmitt writes: > On 2021-08-20 09:55, David Bremner writes: > >> The commit I mentioned is not in 0.32.3. > > Ah, sorry, I thought a release included what was in master at that time. > I guess I should wait for 0.33? > Right, it should be just a few weeks. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org
Re: performance in emacs displaying a huge thread
On 2021-08-20 09:55, David Bremner writes: > The commit I mentioned is not in 0.32.3. Ah, sorry, I thought a release included what was in master at that time. I guess I should wait for 0.33? Best, Alan signature.asc Description: PGP signature ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org