[PATCH 2/3] doc: retitle notmuch-emacs manual

2022-07-01 Thread David Bremner
This makes the HTML TOC read more naturally. Add a label to make cross referencing easier. --- doc/notmuch-emacs.rst | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst index 970cd7b7..f486db6d 100644 ---

[PATCH 1/3] doc: reorganize sphinx toctree

2022-07-01 Thread David Bremner
This mainly affects the html output (although users generating epub or pdf would also notice a change). The goal is twofold: make the TOC a bit friendler and easier to navigate by introducing some hierarchy, and allow links for nmbug and notmuch-setup. --- doc/command-line.rst | 36

Re: v2 parameter expansion for regex and wildcard sexp queries

2022-07-01 Thread David Bremner
David Bremner writes: > This obsoletes the series at [1]. > > Compared to the previous series, this refactors environment search to > avoid code duplication (and remove slightly confusing 'break'). There > is a slight adjustment to error messages via this unification. > > More importantly, this

blacklisting a contact

2022-07-01 Thread erik colson
Hello, I use notmuch from emacs and would like to automatically add senders email adresses to a blacklist list. The wanted behavior is as follows: - I add a tag 'blacklist' to mails received from undesired persons - somehow add mail senders in 'blacklist' tagged mails to a database of

improve html docs

2022-07-01 Thread David Bremner
The main difference between the html docs and the man/info pages is the existence of an index page (this might be possible to control for the info pages as well, if someone was motivated). This series makes a few small improvements in the index page, most notably tricking sphinx-doc into adding

[PATCH 3/3] doc: drop module index from ToC

2022-07-01 Thread David Bremner
There is only one module listed, so the index is not useful. --- doc/index.rst | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/index.rst b/doc/index.rst index 6b84a15f..fec3e6c2 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -13,9 +13,8 @@ Content notmuch-emacs

Re: blacklisting a contact

2022-07-01 Thread inwit
On Fri Jul 1, 2022 at 10:05 AM CEST, erik colson wrote: > Has somebody already coded something like this? Indeed: https://gist.github.com/vedang/26a94c459c46e45bc3a9ec935457c80f See the comments for some improvements over the original. ___ notmuch

[PATCH 4/4] doc: do not generate python module index

2022-07-01 Thread David Bremner
This currently seems unhelpful, and not generating it removes if from the navigation bar, which prevents mis-clicking. --- doc/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/conf.py b/doc/conf.py index 7f94cbed..4da38fed 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -67,6 +67,8

[PATCH] doc: improve config item labels in info output

2022-07-01 Thread David Bremner
Commit 306b7028d added the nmconfig role / directive. Unfortunately the default of using the directive name in texinfo output is pretty ugly, so attempt to make it more human readable by passing `objname` to add_object_type invocation. --- doc/conf.py | 3 ++- 1 file changed, 2 insertions(+), 1

Re: [PATCH] make git ignore new build products

2022-07-01 Thread David Bremner
michaeljgruber+grubix+...@gmail.com writes: > From: Michael J Gruber > > nmbug and notmuch-git are new build products. Make git ignore them just > like other build products. > > Signed-off-by: Michael J Gruber Applied to master, thanks! d ___

Re: sexp and strings

2022-07-01 Thread David Bremner
David Bremner writes: > > Although you have one too many sets of (), there is still a bug here. > > $ notmuch config set squery.D '(macro (dossier) (tag (regex > ,dossier))' > > also doesn't work. Apparently both for regex and wildcard expansion I > did not do macro parameter

Re: [PATCH] doc: improve config item labels in info output

2022-07-01 Thread David Bremner
David Bremner writes: > Commit 306b7028d added the nmconfig role / directive. Unfortunately > the default of using the directive name in texinfo output is pretty > ugly, so attempt to make it more human readable by passing `objname` > to add_object_type invocation. > --- > doc/conf.py | 3 ++- >

[PATCH] doc/emacs: define and use emacsvar and emacscmd markup

2022-07-01 Thread David Bremner
This makes it easier to navigate the merged index of all of the notmuch documentation. --- doc/conf.py | 9 + doc/notmuch-emacs.rst | 78 ++- 2 files changed, 56 insertions(+), 31 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index

[PATCH] doc/emacs: add notmuch-show-empty-saved-searches to manual

2022-07-01 Thread David Bremner
Answering a user question, I had to dig for this variable, but I think it is a reasonably common customization wish, particularly for users with custom count-functions. --- doc/notmuch-emacs.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst

[PATCH 7/9] emacs/show: display count of duplicates in headerline

2022-07-01 Thread David Bremner
There is no real cost here, except screen real estate. Some people might prefer hiding the duplicate count, but we leave that for a future commit. --- emacs/notmuch-show.el | 15 +++--- test/T450-emacs-show.sh | 8 +++-

[PATCH 8/9] CLI/reply: support --duplicate argument

2022-07-01 Thread David Bremner
We want the reply used to match that shown e.g. in the emacs interface. As a first step provide that functionality on the command line. Schema does not need updating as the duplicate key was already present (with a constant value of 1). --- doc/man1/notmuch-reply.rst | 6 ++

Display duplicate messages in emacs front-end

2022-07-01 Thread David Bremner
This obsoletes the WIP series [1]. Compared to that series, this one includes somewhat improved documentation, better error handling, and implements the --duplicate argument for notmuch-reply, and uses it in the emacs front end. [1]: id:20220619232152.846823-1-da...@tethera.net

Re: Display duplicate messages in emacs front-end

2022-07-01 Thread David Bremner
David Bremner writes: > This obsoletes the WIP series [1]. Compared to that series, this one > includes somewhat improved documentation, better error handling, and > implements the --duplicate argument for notmuch-reply, and uses it in > the emacs front end. > > [1]:

[PATCH 3/9] test: add new corpus of duplicate messages

2022-07-01 Thread David Bremner
This corpus will be used to test a new --duplicate option for notmuch-show --- test/corpora/duplicate/msg-1-1:2, | 85 ++ test/corpora/duplicate/msg-1-2:2, | 113 ++ test/corpora/duplicate/msg-2-1:2, | 43 +++ test/corpora/duplicate/msg-2-2:2, | 140

[PATCH 1/9] test: use notmuch_json_show_sanitize more places

2022-07-01 Thread David Bremner
This makes the tests more robust against changing output formats, by allowing us to centralize fixes in the sanitization function. It is not appropriate for all cases, in particular it is unneeded when using test_json_nodes, and unhelpful when testing filenames. --- test/T070-insert.sh| 6

[PATCH 5/9] CLI/show: support --duplicate for structured output

2022-07-01 Thread David Bremner
This introduces a new mandatory key for message structures, namely "duplicate". Per convention in devel/schemata this does _not_ increase the format version. This means that clients are responsible for checking that it exists, and not crashing if it does not. The main functional change is

[PATCH 2/9] test: define and use notmuch_sexp_*_sanitize functions

2022-07-01 Thread David Bremner
These are based on the equivalent functions for json. Like those, these are pretty simple-minded, and don't really understand the syntax. --- test/T170-sexp.sh | 29 ++--- test/test-lib.sh | 14 ++ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git

[PATCH 9/9] emacs/reply: reply to correct duplicate

2022-07-01 Thread David Bremner
Essentially we just need to arrange to pass the right --duplicate argument to notmuch reply. As a side-effect, correct the previously unused value of EXPECTED in T453-emacs-reply.sh. --- emacs/notmuch-mua.el | 18 + emacs/notmuch-show.el |

[PATCH 6/9] emacs/show: provide notmuch-show-choose-duplicate

2022-07-01 Thread David Bremner
This new command allows the user to interactively choose a different duplicate (file) to display for a given message in notmuch-show-mode. Since both tree and unthreaded view use notmuch-show-mode, this provides the same facility there. --- devel/emacs-keybindings.org | 1 +

[PATCH 4/9] CLI/show: initial support for --duplicate for (raw output only)

2022-07-01 Thread David Bremner
Add command line argument --duplicate, analogous with that already supported for notmuch-search. Use of a seperate function for _get_filename is mainly a form of documentation at this point. md5sum is of course a weak hash, but it is good enough for this (non-adversarial) test suite use. ---