Re: [PATCH] test: known broken test for top level .notmuch in split configs

2022-07-05 Thread David Bremner
David Bremner writes: > In split configurations there is no special significance to a top > level directory called .notmuch in the mail root. Users should > therefore be able to have mail stored underneath it. > --- applied this old patch t

Re: [PATCH] bindings/python-cffi: fix docstring

2022-07-05 Thread David Bremner
David Bremner writes: > the method Database.get_message does exist any more (if it ever > did). This makes the docstring unhelpful as an example. > --- applied to master ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send

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

2022-07-05 Thread David Bremner
David Bremner writes: > This corpus will be used to test a new --duplicate option for notmuch-show first 3 patches of this series applied to master. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch

[PATCH] CLI/git: replace most mentions of nmbug

2022-07-04 Thread David Bremner
Particularly in help messages, nmbug is confusing for users who may have never heard of it. --- notmuch-git.py | 40 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/notmuch-git.py b/notmuch-git.py index eac24a46..42de074e 100644 ---

Re: [PATCH v2] doc: replace symlink with copies for nmbug, notmuch-setup

2022-07-03 Thread David Bremner
David Bremner writes: > Previously only man page aliases were being added as symlinks. The > addition to man_pages in conf.py automatically propagates to the list > of generated info pages. > > Installation of the new pages is handled by existing recipes. appli

[PATCH] bindings/python-cffi: fix docstring

2022-07-03 Thread David Bremner
the method Database.get_message does exist any more (if it ever did). This makes the docstring unhelpful as an example. --- bindings/python-cffi/notmuch2/_message.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python-cffi/notmuch2/_message.py

Re: [PATCH] emacs: mark notmuch-query.el as obsolete

2022-07-03 Thread David Bremner
David Bremner writes: > The only functionality actually used by notmuch is the base function > notmuch-query-get-threads; the other functions in this file have > nothing to do with that (single) use. Move that function into > notmuch-lib.el and rename to reflect use. Depreca

[PATCH 4/4] CLI/git: replace calls to notmuch-search with database access

2022-07-03 Thread David Bremner
This introduces a dependency on the (new) python bindings, but since it also yields a 4x performance improvement on the large performance corpus, I think it is worth it. --- debian/control | 1 + notmuch-git.py | 18 +- test/T850-git.sh | 2 ++ 3 files changed, 12

[PATCH 1/4] debian: add git as a build-dependency, for the test suite

2022-07-03 Thread David Bremner
This is needed to run (and test) notmuch-git. --- debian/control | 1 + 1 file changed, 1 insertion(+) diff --git a/debian/control b/debian/control index 9706b0f7..0ffe958c 100644 --- a/debian/control +++ b/debian/control @@ -20,6 +20,7 @@ Build-Depends: dtach (>= 0.8) , emacs-nox |

[PATCH 3/4] CLI/git: current cache contents (file list) of index

2022-07-03 Thread David Bremner
Rather than shelling out once per message to get the list of files corresponding to tags, it is much faster (although potentially a bit memory intensive) to read them all at once. --- notmuch-git.py | 58 +- 1 file changed, 39 insertions(+), 19

[PATCH 2/4] perf-test: add tests for notmuch-git

2022-07-03 Thread David Bremner
The main focus of these initial tests is the (currently unacceptably slow) checkout performance. --- performance-test/T07-git.sh | 23 +++ 1 file changed, 23 insertions(+) create mode 100755 performance-test/T07-git.sh diff --git a/performance-test/T07-git.sh

performance improvements for notmuch git checkout

2022-07-03 Thread David Bremner
This series speeds up "notmuch git checkout" from "intolerably slow" to "OKish" on my mail. [PATCH 1/4] debian: add git as a build-dependency, for the test suite This is unrelated to the rest of the series, but needed to build the debian package [PATCH 2/4] perf-test: add tests for

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]: id:20220

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

2022-07-01 Thread David Bremner
IME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Sender: debian-science-maintainers-bounces+david=tethera@lists.alioth.debian.org +Errors-To: debian-science-maintainers-bounces+david=tethera@lists.alioth.debian.org +X-SA-Exim-C

[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 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 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. ---

[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 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 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 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

[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] 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

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. > --- >

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 > di

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. >

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 ___

[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

[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 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

[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

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 v2] doc: replace symlink with copies for nmbug, notmuch-setup

2022-06-30 Thread David Bremner
Previously only man page aliases were being added as symlinks. The addition to man_pages in conf.py automatically propagates to the list of generated info pages. Installation of the new pages is handled by existing recipes. --- doc/Makefile.local | 7 --- doc/conf.py| 8 2

[PATCH] doc: replace symlink with duplicate page for nmbug

2022-06-30 Thread David Bremner
This automatically propagates to the info version of the pages, which saves having maintain two sets of symlinks. --- What do you think about this as an alternative approach? It seems slightly more maintainable to me, although I am willing to be convinced otherwise. If it is an improvement we

[PATCH] emacs: mark notmuch-query.el as obsolete

2022-06-28 Thread David Bremner
The only functionality actually used by notmuch is the base function notmuch-query-get-threads; the other functions in this file have nothing to do with that (single) use. Move that function into notmuch-lib.el and rename to reflect use. Deprecate the other functions in notmuch-query.el. ---

[PATCH 2/5] emacs/show: optionally insert bodies of "deep messages" lazily

2022-06-27 Thread David Bremner
This leverages the machinery already there to insert buttons for attachments. A potential use-case is browsing the top layers of the tree to decide which of the lower subtrees to read. --- doc/notmuch-emacs.rst | 3 + emacs/notmuch-show.el | 21

[PATCH 4/5] emacs/show: introduce notmuch-show-height-limit

2022-06-27 Thread David Bremner
Analogous to notmuch-show-depth-limit, it requires a bit more calculation, but that cost seems dominated by the rendering cost. --- doc/notmuch-emacs.rst | 3 + emacs/notmuch-show.el | 32 +- test/T450-emacs-show.sh | 20

[PATCH 3/5] emacs/show: obey notmuch-show-max-text-part-size for part 0

2022-06-27 Thread David Bremner
This parameter was originally introduced to hide large attachements that happened to be text/plain. From a performance point of view, there is no reason not to also hide large message bodies. --- doc/notmuch-emacs.rst | 3 + emacs/notmuch-show.el |

[PATCH 5/5] doc/emacs: add discussion about notmuch-show-perfomance.

2022-06-27 Thread David Bremner
Most of the information is already in the docstrings, but hopefully by grouping it is more discoverable. --- doc/notmuch-emacs.rst | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst index

[PATCH 1/5] perf-test/emacs: test showing longish threads

2022-06-27 Thread David Bremner
This particular thread takes about 100 times longer to display in emacs than on the command line. The parameter notmuch-show-max-text-part-size exists, but is currently ineffective for this task because it only hides attachments, not part 0. In future commits, the parameter

provide various lazy-show options

2022-06-27 Thread David Bremner
It is a bit of an unfortunate profusion of options, but it isn't really clear to me yet if there is one best heuristic for all use-cases. The overall observation is that for most threads (even up to several hundred messages), the time to return the query from the notmuch CLI is much smaller than

Re: [PATCH 1/4] test/sexp: one sided range searches.

2022-06-25 Thread David Bremner
David Bremner writes: > The date range parsing machinery already knows how to do something > appropriate with an empty string, but the lastmod parsing blindly > tries to parse each atom as a number. Series applied to master. d ___ notmuc

Re: notmuch_message* error handling cleanup part II

2022-06-25 Thread David Bremner
David Bremner writes: > This is a continuation of the series [1]. It should in principle be > applicable to master, but I have not tried resolving the resulting > conflicts. > > The big picture change here is having > _notmuch_database_ensure_writable check for the dat

Re: incrementally improve error handling in notmuch_message*

2022-06-25 Thread David Bremner
David Bremner writes: > There is more that can be done, but this is a start. The series > introduces a new test primitive test_private_C, for directly unit > testing non-exported functions, and new macro NODISCARD to get the > compiler to help tracking down places a particular funct

[PATCH 2/2] CLI/git: add --format-version argument to init subcommand

2022-06-23 Thread David Bremner
This is primarily intended to support testing upward compatibility with legacy repos. --- doc/man1/notmuch-git.rst | 8 ++- notmuch-git.py | 43 ++--- test/T850-git.sh | 46 3 files changed, 84

[PATCH 1/2] CL/git: add format version 1

2022-06-23 Thread David Bremner
The original nmbug format (now called version 0) creates 1 subdirectory of 'tags/' per message. This causes problems for more than (roughly) 100k messages. Version 1 introduces 2 layers of hashed directories. This scheme was chose to balance the number of subdirectories with the number of extra

Add hashed directory structure to notmuch git

2022-06-23 Thread David Bremner
Old repos (in particular nmbug) should keep working transparently, but new ones will be created with a couple of layers of hashed directories to avoid problems with (at least) ext4 file systems and too many subdirectories in a given directory. There is no history preserving upgrade path in this

[RFC PATCH v2 1/2] perf-test/emacs: test showing longish threads

2022-06-21 Thread David Bremner
This particular thread takes about 100 times longer to display in emacs than on the command line. In a future commit, the parameter notmuch-show-depth-limit will trigger lazy display of message bodies, which should improve performance (at the expense of extra clicks to view a message). ---

[RFC PATCH v2 2/2] emacs/show: optionally insert bodies lazily

2022-06-21 Thread David Bremner
This leverages the machinery already there to insert buttons for attachments. --- doc/notmuch-emacs.rst | 3 + emacs/notmuch-show.el | 23 +++- test/T450-emacs-show.sh | 18 +++ .../notmuch-show-depth

v2 lazy body insertion

2022-06-21 Thread David Bremner
This obsoletes the series at [1]. Compared to that series, this does not introduce an extra layer of buttons, but just toggles more parts closed. It still seems to be a similar (maybe even better, which is suprising) performance improvement. While doing this revision I realized that

[RFC PATCH v2 4/7] CLI/show: WIP support --duplicate for raw output

2022-06-19 Thread David Bremner
--- notmuch-client.h | 1 + notmuch-show.c | 21 - test/T210-raw.sh | 11 +++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/notmuch-client.h b/notmuch-client.h index 9f57ac5e..f8f987e7 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -75,6

[RFC PATCH v2 6/7] WIP/emacs: replace message with different duplicate

2022-06-19 Thread David Bremner
--- devel/emacs-keybindings.org | 1 + emacs/notmuch-query.el | 4 +++- emacs/notmuch-show.el | 20 test/T450-emacs-show.sh | 12 4 files changed, 36 insertions(+), 1 deletion(-) diff --git a/devel/emacs-keybindings.org

[RFC PATCH v2 3/7] test: add new corpus of duplicate messages

2022-06-19 Thread David Bremner
IME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Sender: debian-science-maintainers-bounces+david=tethera@lists.alioth.debian.org +Errors-To: debian-science-maintainers-bounces+david=tethera@lists.alioth.debian.org +X-SA-Exim-C

[RFC PATCH v2 7/7] WIP/emacs: display count of duplicates in headerline

2022-06-19 Thread David Bremner
--- emacs/notmuch-show.el | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 156b..32d0edc5 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@ -493,7 +493,7 @@ Return unchanged ADDRESS if

[RFC PATCH v2 5/7] WIP: support show --duplicate for structured output

2022-06-19 Thread David Bremner
--- devel/schemata| 1 + mime-node.c | 32 +++- notmuch-client.h | 5 - notmuch-reply.c | 4 ++-- notmuch-show.c| 12 test/T160-json.sh | 4 +++- test/T170-sexp.sh | 2 +- test/T520-show.sh | 36

[RFC PATCH v2 2/7] test: define and use notmuch_sexp_*_sanitize functions

2022-06-19 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

[RFC PATCH v2 1/7] test: use notmuch_json_show_sanitize more places

2022-06-19 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

v2 WIP commands to choose duplicates in emacs interface

2022-06-19 Thread David Bremner
This is minimal, but I think usable. In notmuch-show mode % selects a different duplicate. Since all views (search / tree / unsorted) ultimately use notmuch-show to display a message, this works essentially everywhere. It needs better error handling, and one could imagine a nicer UI (completion

[PATCH] WIP/git: change internal directory layout

2022-06-18 Thread David Bremner
Add 4 layers of hashed directories in order to prevent large numbers of subdirectories in any one directory. Currently there is no migration strategy for old style notmuch-git / nmbug repositories. --- notmuch-git.py | 17 - test/T850-git.sh | 48

RFC: directory layout for notmuch git

2022-06-18 Thread David Bremner
It turns out that if you have more than about 150k messages _and_ your /tmp is on ext4, then the merge operation for notmuch-git can fail (either hash collisions in the directory indexing, or running out of inodes). There are few possible solutions. The simplest is just to make /tmp tmpfs. Another

Re: [PATCH v2] CLI: set NOTMUCH_CONFIG in hooks.

2022-06-18 Thread David Bremner
David Bremner writes: > This addresses a bug report / feature request of Uwe Kleine-K├Ânig. The > assumption is that we always load a config file in the CLI (i.e. we > never pass "" as the config file argument to > notmuch_database_open_with_config). se

Re: notmuch-git v3

2022-06-18 Thread David Bremner
David Bremner writes: > This series is against branch "next", which is currently ahead of > master by the following 7 commits Slightly updated version of this series applied to master. Interdiff follows. diff --git a/Makefile.local b/Makefile.local index 0fadfb26.

Re: [PATCH v3] emacs: use message-dont-reply-to-names when composing replies

2022-06-16 Thread David Bremner
jao writes: > notmuch-mua functions for replies now use the built-in customizable > variable message-dont-reply-to-names with the same semantics as > message-mode. applied to master ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe

[PATCH v2 1/2] test/sexp: add known broken tests for macro param inside rx/wildcard

2022-06-15 Thread David Bremner
These tests replicate the problem reported by Eric Colson [1] (for the regex case). [1]: id:87o7yxqxy6@code.pm --- test/T081-sexpr-search.sh | 50 +++ 1 file changed, 50 insertions(+) diff --git a/test/T081-sexpr-search.sh b/test/T081-sexpr-search.sh

[PATCH v2 2/2] lib/sexp: add parameter expansion for regex and wildcard

2022-06-15 Thread David Bremner
Fix the bug reported at [1]. The parameter expansion for regex and wildcard modifiers has to be done a bit differently, because their arguments are not s-expressions defining complete Xapian queries. [1]: id:87o7yxqxy6@code.pm --- lib/parse-sexp.cc | 91

v2 parameter expansion for regex and wildcard sexp queries

2022-06-15 Thread David Bremner
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 avoids a bug [2] with unknown

[PATCH 2/2] lib/sexp: add parameter expansion for regex and wildcard

2022-06-14 Thread David Bremner
Fix the bug reported at [1]. The parameter expansion for regex and wildcard modifiers has to be done a bit differently, because their arguments are not s-expressions defining complete Xapian queries. [1]: id:87o7yxqxy6@code.pm --- lib/parse-sexp.cc | 55

[PATCH 1/2] test/sexp: add known broken tests for macro param inside rx/wildcard

2022-06-14 Thread David Bremner
These tests replicate the problem reported by Eric Colson [1] (for the regex case). [1]: id:87o7yxqxy6@code.pm --- test/T081-sexpr-search.sh | 50 +++ 1 file changed, 50 insertions(+) diff --git a/test/T081-sexpr-search.sh b/test/T081-sexpr-search.sh

Re: Ignoring unknown messages for git.safe_fraction

2022-06-13 Thread David Bremner
Sean Whitton writes: > Hello, > > On one machine I have only some of my mail, and so 'notmuch git status' > will always have a lot of lines starting with "U". But then > git.safe_fraction will always be exceeded. How about ignoring > status['missing'] in check_safe_fraction, by default? > OK,

Re: [PATCH v4] emacs: Make notmuch-show-next-thread return nil on failure

2022-06-13 Thread David Bremner
David Bremner writes: > Leo Okawa Ericson writes: > >> Having notmuch-show-next-thread return non-nil on success and nil on >> failure makes it easier for users to interact with notmuch via elisp. >> >> This commit changes notmuch-search-show-thread too since the r

Re: sexp and strings

2022-06-13 Thread David Bremner
erik colson writes: > Hi, > > I would like to define a squery in my notmuch configuration which would > ease a query I often use. The query is > > tag:/d/ > > where d are decimal numbers. > Now I would like to shorten this to > > D d > > wherefor I was thinking of using a macro

Re: [PATCH v4] emacs: Make notmuch-show-next-thread return nil on failure

2022-06-13 Thread David Bremner
Leo Okawa Ericson writes: > Having notmuch-show-next-thread return non-nil on success and nil on > failure makes it easier for users to interact with notmuch via elisp. > > This commit changes notmuch-search-show-thread too since the return > value of notmuch-show-next-thread depends on

Re: [PATCH 1/3] test: initial tests for external commands

2022-06-13 Thread David Bremner
David Bremner writes: > The main goal is to test the setting of NOTMUCH_CONFIG, but also > include a basic sanity test for execing scripts. Series applied to master ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

Re: [PATCH 1/2] CLI: simplify help command

2022-06-13 Thread David Bremner
David Bremner writes: > This will allow "notmuch help" to work for arbitrary external commands > and for any added non-command topics (such as notmuch-sexp-queries). series applied to master ___ notmuch mailing list -- notmuch

[PATCH 1/4] test: add new corpus of duplicate messages

2022-06-12 Thread David Bremner
IME-Version: 1.0 +Content-Type: text/plain; charset="us-ascii" +Content-Transfer-Encoding: 7bit +Sender: debian-science-maintainers-bounces+david=tethera@lists.alioth.debian.org +Errors-To: debian-science-maintainers-bounces+david=tethera@lists.alioth.debian.org +X-SA-Exim-C

[PATCH 4/4] WIP/emacs: replace message with different duplicate

2022-06-12 Thread David Bremner
--- emacs/notmuch-query.el | 4 +++- emacs/notmuch-show.el | 11 +++ test/T450-emacs-show.sh | 12 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-query.el b/emacs/notmuch-query.el index 5c7f4f8d..865e3ccf 100644 --- a/emacs/notmuch-query.el

WIP: allow display of duplicate messages with notmuch show / notmuch-emacs

2022-06-12 Thread David Bremner
This is alpha quality, so in particular there is no key binding for the new function #'notmuch-show-replace-msg, which redraws with a different duplicate. On the other hand it's the first progress in a long time towards a better ui for duplicate messages, and it turns out not to be as hard as I

[PATCH 3/4] WIP: support show --duplicate for structured output

2022-06-12 Thread David Bremner
--- mime-node.c | 32 +++- notmuch-client.h | 4 +++- notmuch-reply.c | 2 +- notmuch-show.c| 2 +- test/T520-show.sh | 24 5 files changed, 52 insertions(+), 12 deletions(-) diff --git a/mime-node.c b/mime-node.c index

[PATCH 2/4] CLI/show: WIP support --duplicate for raw output

2022-06-12 Thread David Bremner
--- notmuch-client.h | 1 + notmuch-show.c | 21 - test/T210-raw.sh | 11 +++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/notmuch-client.h b/notmuch-client.h index 9f57ac5e..f8f987e7 100644 --- a/notmuch-client.h +++ b/notmuch-client.h @@ -75,6

Re: [PATCH v2] emacs: use message-dont-reply-to-names when composing replies

2022-06-08 Thread David Bremner
jao writes: > > > +(defun notmuch-mua--remove-dont-reply-to-names () > + (when-let ((nr (message-dont-reply-to-names))) Using when-let is fine with me, but I wonder if we should follow the advice in subr-x to do (eval-when-compile (require 'subr-x)) It's autoloaded, but maybe we can

Re: marking multiple messages to tag

2022-06-08 Thread David Bremner
erik colson writes: > Coming from mu4e I am missing a feature to mark several messages in a > search before applying a tag them. I know I can apply a tag to a region > of messages but in this case I would like to select messages while > skipping some messages. > Is this possible in

Re: [bug?] emacs interface - some mark read tag changes may have failed

2022-06-07 Thread David Bremner
Giovanni Biscuolo writes: > Now I restarted Tor (and it's not stuck anymore) and all is working fine > again. > > ...guess I should check why (apparently) my gpg is using Tor :-) > > Maybe gnupg/dirmngr uses Tor by default if it finds a Tor service on the > machine? There is some discussion

Re: [bug?] emacs interface - some mark read tag changes may have failed

2022-06-06 Thread David Bremner
Giovanni Biscuolo writes: > Hello David, > > thank you for your help! > > I found a pettern in how the problems affects me > > The message is S/MIME signed: > without checking all the details, sounds like you need the hint in https://nmbug.notmuchmail.org/n

Re: [bug?] emacs interface - some mark read tag changes may have failed

2022-06-06 Thread David Bremner
Giovanni Biscuolo writes: > after I press CTRL-g I get this text in the buffer: > [some mark read tag changes may have failed] This is essentially notmuch-emacs complaining that it was interrupted, so not really telling us about the underlying issue. > > I launched emacs with: > > emacs -Q

Re: debian 11 notmuch-emacs -> elpa-notmuch?

2022-06-06 Thread David Bremner
Ryan Tate writes: > > If so, should the aforementioned web page be updated to say > "(elpa-notmuch in Debian)" rather than "(notmuch-emacs in > Debian)"? Would you like (and is there a way) for me to submit a > patch to the pages? > That's correct. See

[PATCH 3/3] perf-test/emacs: lazily insert message bodies with notmuch-show

2022-06-05 Thread David Bremner
As expected / hoped, this is much faster for large threads than actually inserting the bodies. --- performance-test/T06-emacs.sh | 4 1 file changed, 4 insertions(+) diff --git a/performance-test/T06-emacs.sh b/performance-test/T06-emacs.sh index ce04ca17..7f6fdfbe 100755 ---

[PATCH 1/3] perf-test/emacs: test showing a longish thread

2022-06-05 Thread David Bremner
This particular thread takes about 100 times longer to display in emacs than on the command line. --- performance-test/T06-emacs.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/performance-test/T06-emacs.sh b/performance-test/T06-emacs.sh index 66f0be58..ce04ca17 100755 ---

[PATCH 2/3] emacs/show: optionally insert bodies lazily

2022-06-05 Thread David Bremner
Intially control lazy insertion by a depth limit. --- emacs/notmuch-show.el | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 203ca7f0..55c4e274 100644 --- a/emacs/notmuch-show.el +++

WIP/RFP: lazy body insertion for notmuch-show mode

2022-06-05 Thread David Bremner
Many people have observed that notmuch-show is slow to render large threads. This is pretty annoying when most of the thread is off screen. The usual trick of working asynchronously doesn't seem hopeful, since most of the work is in emacs proper, not externally. This series attempts to reduce the

[PATCH 3/4] lib/sexp: allow * as alias for "" in range searches.

2022-06-04 Thread David Bremner
It can be tedious to use "" inside of a string, e.g. in a shell script. --- lib/parse-sexp.cc | 5 + test/T081-sexpr-search.sh | 20 2 files changed, 25 insertions(+) diff --git a/lib/parse-sexp.cc b/lib/parse-sexp.cc index 6282a456..6814c9fc 100644 ---

[PATCH 2/4] lib/sexp: special case "" as an argument in lastmod ranges.

2022-06-04 Thread David Bremner
Support this syntax for constincy with (data from to) ranges. --- lib/parse-sexp.cc | 10 -- test/T081-sexpr-search.sh | 2 -- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/parse-sexp.cc b/lib/parse-sexp.cc index 08fd7037..6282a456 100644 ---

[PATCH 4/4] doc/sexp: document range queries.

2022-06-04 Thread David Bremner
Give examples for date fields, as these are commonly useful for user queries. --- doc/man7/notmuch-sexp-queries.rst | 18 ++ 1 file changed, 18 insertions(+) diff --git a/doc/man7/notmuch-sexp-queries.rst b/doc/man7/notmuch-sexp-queries.rst index 1d7e0ae9..be589f98 100644 ---

[PATCH 1/4] test/sexp: one sided range searches.

2022-06-04 Thread David Bremner
The date range parsing machinery already knows how to do something appropriate with an empty string, but the lastmod parsing blindly tries to parse each atom as a number. --- test/T081-sexpr-search.sh | 22 ++ 1 file changed, 22 insertions(+) diff --git

[no subject]

2022-06-04 Thread David Bremner
This series is against branch "next", which is currently ahead of master by the following 7 commits 9c1ed5ab CLI: document handling of --config for external commands 0d33392f CLI: pass --config to external commands via NOTMUCH_CONFIG. 163dae81 test: initial tests for external commands a5a3ed90

[PATCH v3 13/17] doc/notmuch-git: initial documentation

2022-06-04 Thread David Bremner
This is mainly derived from the various help outputs from the script, with some massaging of markup and addition of links. --- doc/conf.py | 4 + doc/index.rst| 1 + doc/man1/notmuch-git.rst | 271 +++ 3 files changed, 276

[PATCH v3 17/17] debian: install notmuch-git

2022-06-04 Thread David Bremner
Use a separate binary package to avoid dragging in dependencies on python and git for those that do not want them. --- debian/control | 16 debian/notmuch-git.install | 2 ++ debian/notmuch-git.manpages | 2 ++ 3 files changed, 20 insertions(+) create mode 100644

[PATCH v3 09/17] test/git: add known broken test for tag with quotes.

2022-06-04 Thread David Bremner
There is current insufficient sanitization and/or escaping of tag names internally in notmuch-git. --- test/T850-git.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/test/T850-git.sh b/test/T850-git.sh index 994950ed..2badc52d 100755 --- a/test/T850-git.sh +++ b/test/T850-git.sh

  1   2   3   4   5   6   7   8   9   10   >