[PATCH] WIP: provide relative lastmod sexp queries

2022-08-08 Thread David Bremner
--- I haven't looked carefully at how much work it would be to add to the infix parser yet. I suspect it means adding a new RangeProcessor class modelled on ParseTimeRangeProcessor. Maybe some of the logic from _parse_sexp_range could be shared with the other parser. lib/parse-sexp.cc

Re: [PATCH 1/2] test/emacs: add known broken test for stashing duplicate filename

2022-08-07 Thread David Bremner
David Bremner writes: > This duplicates (no pun intended) one of the bugs reported by Gregor > in id:87edxw8jp4.fsf@no.workgroup applied all 5 patches in this thread to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscrib

Re: [PATCH] NEWS: initial set of NEWS for 0.37.

2022-08-06 Thread David Bremner
David Bremner writes: > There are one or two more changes to apply (and potentially document) > before release, but this covers most of my commits. applied to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

Re: [PATCH 1/3] doc/notmuch: merge two sections on external commands.

2022-08-06 Thread David Bremner
David Bremner writes: > When adding the description of the propagation of NOTMUCH_CONFIG, I > missed that there was already a section on external commands, with a > different title. This one patch applied to master ___ notmuch mailing list -

Re: [PATCH 1/6] tests: remove dead code from T055-path-config.sh

2022-08-06 Thread David Bremner
David Bremner writes: > This case statement does nothing. > --- > test/T055-path-config.sh | 3 --- > 1 file changed, 3 deletions(-) applied to master. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email t

Subjects for messages with multiple files

2022-08-06 Thread David Bremner
Gregor Zattler writes: > In my particular case the notmuch-search buffer shows two > lines for two matching threads one of which stands out > because its date is 1970-01-01 because I was too lazy to > provide Date: headers in the test case's messages. > > In my particular case the Subject: shown

Re: [bug]: notmuch-emacs: notmuch-show: "c F" shows same file name for different instances of duplicate messages

2022-08-04 Thread David Bremner
David Bremner writes: > Gregor Zattler writes: > >> Since the emails in this test case differ in Subjects they >> reveal another problem with showing different instances of >> seemingly same emails: While cycling through the three >> emails in notmuch show t

Re: [bug]: notmuch-emacs: notmuch-show: "c F" shows same file name for different instances of duplicate messages

2022-08-04 Thread David Bremner
Gregor Zattler writes: > Dear notmuch developers, > > the new feature of showing different instances of emails > with same Message-Id is great and very helpful. > > But in notmuch-emacs, when hitting "c F" in notmuch show > always stashes the very same filename, in my case the one > fitting the

[PATCH 3/3] emacs: add duplicate support to notmuch-show-view-raw-message

2022-08-04 Thread David Bremner
This fixes one of the bugs reported by Gregor in [1] [1]: id:87edxw8jp4.fsf@no.workgroup --- emacs/notmuch-show.el | 8 ++-- test/T450-emacs-show.sh | 1 - 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index e9a9ac2c..a6650678

[PATCH 2/3] emacs/show: provide a more friendly function to get duplicate num

2022-08-04 Thread David Bremner
There is not much code here, but at least we can fix the indexing as 1 based. --- emacs/notmuch-show.el | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 527db4bb..e9a9ac2c 100644 --- a/emacs/notmuch-show.el +++

[PATCH 1/3] test/emacs: add known broken test for viewing raw duplicate

2022-08-04 Thread David Bremner
This duplicates one of the bugs reported by Gregor in [1]. [1]: id:87edxw8jp4.fsf@no.workgroup --- test/T450-emacs-show.sh | 11 +++ 1 file changed, 11 insertions(+) diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh index ab611d56..83e902f1 100755 ---

[PATCH 2/2] emacs: update notmuch-show-get-filename to handle duplicates

2022-08-04 Thread David Bremner
This fixes one of the bugs reported by Gregor in [1]. [1]: id:87edxw8jp4.fsf@no.workgroup --- emacs/notmuch-show.el | 4 ++-- test/T450-emacs-show.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 1bc3b319..527db4bb

[PATCH 1/2] test/emacs: add known broken test for stashing duplicate filename

2022-08-04 Thread David Bremner
This duplicates (no pun intended) one of the bugs reported by Gregor in id:87edxw8jp4.fsf@no.workgroup --- test/T450-emacs-show.sh | 9 + 1 file changed, 9 insertions(+) diff --git a/test/T450-emacs-show.sh b/test/T450-emacs-show.sh index 37940c96..2cebd43d 100755 ---

[PATCH] NEWS: initial set of NEWS for 0.37.

2022-08-01 Thread David Bremner
There are one or two more changes to apply (and potentially document) before release, but this covers most of my commits. --- NEWS | 35 +++ 1 file changed, 35 insertions(+) diff --git a/NEWS b/NEWS index 44551b82..1e0b6a6c 100644 --- a/NEWS +++ b/NEWS @@ -1,12

[PATCH 2/2] emacs/show: restrict inlined mimetypes on refresh.

2022-08-01 Thread David Bremner
This fixes the bug reported by Al [1]. Essentially apply the same fix as [2] in a different place. [1]: id:877d41nmr1@gmail.com [2]: 90a7c1af368a527700dcde9b0dcbd760afc7bd92 --- emacs/notmuch-show.el | 1 + test/T450-emacs-show.sh | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff

[PATCH 1/2] test/emacs: add known broken test for inlining on refresh.

2022-08-01 Thread David Bremner
-show "id:874llc2bkp@curie.anarc.at") + (notmuch-show-refresh-view) + (test-visible-output "OUTPUT")' +cat < EXPECTED +Antoine Beaupré (2018-03-19) (attachment inbox) +Subject: Re: bug: "no top level messages" crash on Zen email loops +To: David Bremner , not

Re: lastmod based on date/time

2022-08-01 Thread David Bremner
Al Haji-Ali writes: > Would it be possible to search for lastmod messages based on time > rather than revision ID? Using revision ID is convenient for > tools/scripts, but not for actual everyday use. > The modification time is not saved in the database. > I sometimes find myself needing to

Re: [PATCH] notmuch.c: add missing trailing newlines in two error messages

2022-07-31 Thread David Bremner
Tomi Ollila writes: > Removed duplicate error check (and the message) in 3rd case where > the same error message (w/o trailing newline) was present. > > In case of test/T040-setup.sh, command substitution deletes > trailing newlines, so related test there cannot be changed > (and therefore could

Re: [PATCH] notmuch.c: add missing trailing newlines in two error messages

2022-07-31 Thread David Bremner
Tomi Ollila writes: > Removed duplicate error check (and the message) in 3rd case where > the same error message (w/o trailing newline) was present. > > In case of test/T040-setup.sh, command substitution deletes > trailing newlines, so related test there cannot be changed > (and therefore could

[PATCH v2] emacs: add docstring for notmuch-show-choose-duplicate

2022-07-31 Thread David Bremner
It should have one in any case, but in particular it is needed for the manual. --- I realized my first attempt at a docstring didn't work well in the manual. emacs/notmuch-show.el | 10 ++ 1 file changed, 10 insertions(+) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index

[PATCH 4/7] doc/emacs: split index category from label

2022-07-31 Thread David Bremner
A more verbose category is needed for the index, but not the description in the manual. --- doc/elisp.py | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/doc/elisp.py b/doc/elisp.py index b8b4931b..1b0392e6 100644 --- a/doc/elisp.py +++ b/doc/elisp.py @@ -110,6

[PATCH 7/7] doc/emacs: use define-key instead of hard-coding markup

2022-07-31 Thread David Bremner
Add keys to index. Allow indexing of both keys and commands. Use standard typesetting for multiple keybindings. --- doc/notmuch-emacs.rst | 180 ++ 1 file changed, 129 insertions(+), 51 deletions(-) diff --git a/doc/notmuch-emacs.rst

[PATCH 3/7] doc/emacs: drop domain label

2022-07-31 Thread David Bremner
This makes the generate info files somewhat less verbose, so that they say e.g. "Key Binding" instead of "Emacs Key Binding" --- doc/elisp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/elisp.py b/doc/elisp.py index 642ea9ae..b8b4931b 100644 --- a/doc/elisp.py +++

[PATCH 6/7] doc/emacs: replace use of emacsvar with el:defcustom

2022-07-31 Thread David Bremner
Mainly this allows dropping the ad-hoc directive emacsvar --- doc/conf.py | 4 --- doc/notmuch-emacs.rst | 74 +-- 2 files changed, 37 insertions(+), 41 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 0b7b8af5..e23cb7d7 100644 ---

[PATCH 1/7] doc: copy elisp.py from flycheck, make available

2022-07-31 Thread David Bremner
This corresponds to flycheck commit 1702d2db3d8ba9bcb9b2bf810e791e907fcc3adc, which is apparently the last time this file was modified (2018). Embedding seems defensible since the file is evidently not changing that much, and we need to change some labels to make it fit with the not-just-emacs

[PATCH 5/7] doc/emacs: replace emacscmd with el:define-key

2022-07-31 Thread David Bremner
This allows us to eliminate the ad-hoc emacscmd directive / role, and improve indexing. doc/emacs: convert remaining uses of emacscmd to define-key This allows us to remove the no-longer used object type. --- doc/conf.py | 5 - doc/notmuch-emacs.rst | 14 -- 2 files

[PATCH 2/7] doc/elisp: replace label for Emacs commands and key bindings.

2022-07-31 Thread David Bremner
In the notmuch doc index it is important to be clear which parts are Emacs related. --- doc/elisp.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/elisp.py b/doc/elisp.py index 1a96b12a..642ea9ae 100644 --- a/doc/elisp.py +++ b/doc/elisp.py @@ -215,7 +215,7 @@ class

Embed elisp.py from flycheck, use it in notmuch-emacs doc

2022-07-31 Thread David Bremner
After finding myself spending a while trying to re-create one of the features [0] of the el sphinx domain used in flycheck, I decided to try just converting the docs to use that sphinx extension. As I remarked in 2018 [1], there doesn't seem to be a distributed version of this sphinx extension.

[PATCH 3/3] doc: add some documentation about duplicate files.

2022-07-30 Thread David Bremner
This is mainly motivated by the new emacs-UI features to select duplicates, but hopefully it will help demystify things for users of the CLI as well. --- doc/man1/notmuch.rst | 17 + doc/notmuch-emacs.rst | 25 + 2 files changed, 42 insertions(+) diff

[PATCH 1/3] doc/notmuch: merge two sections on external commands.

2022-07-30 Thread David Bremner
When adding the description of the propagation of NOTMUCH_CONFIG, I missed that there was already a section on external commands, with a different title. --- doc/man1/notmuch.rst | 16 +--- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/doc/man1/notmuch.rst

[PATCH 2/3] emacs: add docstring for notmuch-show-choose-duplicate

2022-07-30 Thread David Bremner
It should have one in any case, but in particular it is needed for the manual. --- emacs/notmuch-show.el | 4 1 file changed, 4 insertions(+) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index 1bc3b319..a729ce77 100644 --- a/emacs/notmuch-show.el +++ b/emacs/notmuch-show.el @@

release 0.37 is immanent

2022-07-30 Thread David Bremner
It has been a while, and there have been quite a few changes since 0.36. I propose feature freeze for 0.37 August 13, with a release around a week after that. d signature.asc Description: PGP signature ___ notmuch mailing list --

Re: [PATCH] emacs: add new option notmuch-search-exclude

2022-07-30 Thread David Bremner
Mohsin Kaleem writes: > David Bremner writes: > > Hi, firstly sorry for taking so long to come back to this. I honestly > have tried to fix this multiple times since my last message but kept > getting confused or misdirected by how the tests are setup so I gave up > and de

Re: Multiple files per message in emacs

2022-07-30 Thread David Bremner
Rafael Ávila de Espíndola writes: > Hi, > > I got a few emails which all have the same Message-ID: > > $ notmuch search subject:'"MB WAY"' > thread:00089926 34 mins. ago [1/1(3)] MB WAY > > $ notmuch search --output=files subject:'"MB WAY"' | xargs grep -i Message-ID >

Re: a DoS vulnerability associated with conflated Message-IDs?

2022-07-30 Thread David Bremner
Daniel Kahn Gillmor writes: > On Fri 2017-08-04 16:42:54 -0400, David Bremner wrote: >> Peter Wang writes: >> >>> On Thu, 08 Mar 2012 11:37:09 -0500, Daniel Kahn Gillmor >>> wrote: >>>> notmuch currently treats all messages with the same

Re: [Emacs] Using notmuch-address with EUDC, and completion-at-point

2022-07-30 Thread David Bremner
Alexander Adolf writes: > As I wanted email address completion via completion-at-point in > message-mode too, I implemented a new EUDC function to go into > completion-at-point-functions [3]. > > [1] https://company-mode.github.io > [2] https://github.com/minad/corfu > [3]

Re: [PATCH 6/6] doc/emacs: add docstring for notmuch-unthreaded-result-format.

2022-07-30 Thread David Bremner
David Bremner writes: > The main change is actually updating cross references. series applied to master. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

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

2022-07-30 Thread David Bremner
David Bremner writes: > 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. remainder of series applie

[PATCH 2/6] test: add test for creating database in various configurations.

2022-07-29 Thread David Bremner
The existing database creation (via add_email_corpus) was always done in the traditional configuration. The use of xapian-metadata is just to portably ensure that there is a database created where we expect there to be. --- test/T055-path-config.sh | 6 ++ 1 file changed, 6 insertions(+)

[PATCH 6/6] lib/open: create database path in some cases

2022-07-29 Thread David Bremner
There is some duplication of code here, but not all of the locations valid to find a database make sense to create. Furthermore we nead two passes, so the control flow in _choose_database_path would get a bit convoluted. --- lib/open.cc | 53 ++--

[PATCH 3/6] test/path-config: set database.mail_root but not database.path

2022-07-29 Thread David Bremner
The failing "create database" test replicates a bug reported by Sean Whitton [1]. The other two failures also look related to the database being (re)created in the wrong place. [1]: id:87y1wqkw13@athena.silentflame.com. --- test/T055-path-config.sh | 30 -- 1 file

[PATCH 4/6] lib/open: refactor call to mkdir into function

2022-07-29 Thread David Bremner
This makes the error handling available for re-use. Using g_mkdir_with_parents also handles the case of a pre-existing directory. This introduces new functionality, namely creating the parent directories, which will be useful for creating directories like '.local/share/notmuch/default'. ---

[PATCH 1/6] tests: remove dead code from T055-path-config.sh

2022-07-29 Thread David Bremner
This case statement does nothing. --- test/T055-path-config.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/test/T055-path-config.sh b/test/T055-path-config.sh index 63dd90fd..58c824a2 100755 --- a/test/T055-path-config.sh +++ b/test/T055-path-config.sh @@ -359,9 +359,6 @@ EOF

[PATCH 5/6] lib/open: return non-SUCCESS on missing database path

2022-07-29 Thread David Bremner
This simplifies the logic of creating the directory path when it doesn't exist. --- lib/open.cc| 19 +++ test/T560-lib-error.sh | 4 ++-- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/open.cc b/lib/open.cc index 85e46dc7..bc450555 100644 ---

v1 Create database directory

2022-07-29 Thread David Bremner
In [1] Sean reported the database being created in the wrong location. In order to fix this, this database creates the parent directory for the database in more cases. [1]: id:87y1wqkw13@athena.silentflame.com ___ notmuch mailing list --

Re: Overriding mm-inline-override-types in notmuch-show

2022-07-27 Thread David Bremner
Al Haji-Ali writes: > The variable `mm-inline-override-types` is overridden in `notmuch-show` to > "stop application/* parts from being displayed". > > This works well, however it means in other places the part *is* expanded. For > example when `(notmuch-show-refresh-view)` is called (after

Re: Database location bug when database does not already exist

2022-07-27 Thread David Bremner
David Bremner writes: > Sean Whitton writes: > >> Hello, >> >> In the following situation: >> >> - only notmuch config is ~/.notmuch-config >> - database.mail_root is set >> - database.path is not set >> - notmuch database does not yet

Re: Sending mail succeeded but signaled failure

2022-07-26 Thread David Bremner
Justus Winter writes: > Hello, > > I just embarrassed myself a little by sending the same mail over and > over again. The reason for that is that notmuch-emacs signaled failure, > i.e. it displayed an error message in the status buffer and didn't close > the compose buffer, yet it did in fact

Re: Database location bug when database does not already exist

2022-07-25 Thread David Bremner
Sean Whitton writes: > Hello, > > In the following situation: > > - only notmuch config is ~/.notmuch-config > - database.mail_root is set > - database.path is not set > - notmuch database does not yet exist > > then notmuch wants to create its db under mail_root/.notmuch, contrary > to

Re: [PATCH v2] CLI/git: opportunistically use bindings to check for known messages

2022-07-16 Thread David Bremner
Tomi Ollila writes: > On Fri, Jul 15 2022, David Bremner wrote: > >> If the bindings are installed, use them to avoid one exec of notmuch >> search per message. > > tnx. continues to work for me where I have symlink to nmbug in ~/bin/. > some time in the future i'l

Re: Feature request: show destination in tree view when appropriate

2022-07-16 Thread David Bremner
Jon Hurst writes: > Many thanks David; just what I needed. > >> tested either, but I suppose you would need to write a function like >> author-or-to that decides for each message which of those to insert. > > For the record: > > > (defun -notmuch-authors-or-to (format-string result) > (let*

[PATCH 1/6] emacs: update defcustom for notmuch-search-result-format.

2022-07-16 Thread David Bremner
It seems redundant to have the previous example, since the default value is always show by describe variable. Enforce more restrictions on the keys in the alist, since arbitrary strings don't work as field names. Document that functions can be used in lieu of field names. --- emacs/notmuch.el |

[PATCH 6/6] doc/emacs: add docstring for notmuch-unthreaded-result-format.

2022-07-16 Thread David Bremner
The main change is actually updating cross references. --- doc/notmuch-emacs.rst | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst index 44dca384..e69bd23d 100644 --- a/doc/notmuch-emacs.rst +++

[PATCH 3/6] emacs: update defcustom for notmuch-search-result-format.

2022-07-16 Thread David Bremner
It seems redundant to have the previous example, since the default value is always show by describe variable. Enforce more restrictions on the keys in the alist, since arbitrary strings don't work as field names. Document that functions can be used in lieu of field names. ---

[PATCH 2/6] doc/emacs: add docstring and example for n-search-result-format

2022-07-16 Thread David Bremner
When the ability to use functions was added, this example was confined to a commit message, which is not user discoverable. --- doc/notmuch-emacs.rst | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/doc/notmuch-emacs.rst

[PATCH 4/6] doc/emacs: add docstring and example for n-tree-result-format

2022-07-16 Thread David Bremner
This example is based on one originally by Jon Hurst. --- doc/notmuch-emacs.rst | 35 +++ 1 file changed, 35 insertions(+) diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst index 49111d28..44dca384 100644 --- a/doc/notmuch-emacs.rst +++

[PATCH 5/6] emacs: update defcustom for notmuch-unthreaded-result-format

2022-07-16 Thread David Bremner
This is essentially a copy of that for notmuch-tree-result-format, aside from the default value. --- emacs/notmuch-tree.el | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 68614623..f63ac9a5 100644 ---

update documentation for notmuch-*-result-format

2022-07-16 Thread David Bremner
Jon Hurst asked a question [1], and the the answer turned out to be the existing, but previously undocumented feature of using functions in format specifiers. This series tries to improve both the customization and documentation for 3 related variables. [1]: id:87a699e6wn@hursts.org.uk

Re: Feature request: show destination in tree view when appropriate

2022-07-16 Thread David Bremner
Jon Hurst writes: > Hi, > > In the emacs front end, I can specify authors in the format for search > results and trees. This is great when looking at received mail, but when > looking at sent mail it is not optimal. I have used mutt in the past, > and this puts "To: xxx*.xxx" in this field

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

2022-07-15 Thread David Bremner
David Bremner writes: > 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. applied to master. d ___ notmuch mai

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

2022-07-15 Thread David Bremner
David Bremner writes: > This makes it easier to navigate the merged index of all of the > notmuch documentation. applied to master, after extending to cover the new docs from 5e17495a d ___ notmuch mailing list -- notmuch@notmuchma

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

2022-07-15 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. appli

Re: [PATCH 1/3] doc: reorganize sphinx toctree

2022-07-15 Thread David Bremner
David Bremner writes: > 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-se

[PATCH v2] CLI/git: opportunistically use bindings to check for known messages

2022-07-15 Thread David Bremner
If the bindings are installed, use them to avoid one exec of notmuch search per message. --- notmuch-git.py | 33 - 1 file changed, 28 insertions(+), 5 deletions(-) I decided to leave the old (slow) path in for now, since it is fast enough for use of nmbug to

Re: provide various lazy-show options

2022-07-14 Thread David Bremner
David Bremner writes: > 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 th

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

2022-07-07 Thread David Bremner
Tomi Ollila writes: > On Sun, Jul 03 2022, David Bremner wrote: > > I've trying to think if there were a way to somehow run only one notmuch > command instead of notmuch search on all maeby-deleted files -- or > alternatively attempt to load python bindings and in case

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

2022-07-07 Thread David Bremner
David Bremner writes: > This is needed to run (and test) notmuch-git. applied this one patch to master ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

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

2022-07-07 Thread David Bremner
David Bremner writes: > 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

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

2022-07-07 Thread David Bremner
Tomi Ollila writes: >> + >> + > > Is three empty lines a bit excessive...? > >> +time_done Fixed in git. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

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

2022-07-07 Thread David Bremner
Tomi Ollila writes: > On Mon, Jul 04 2022, David Bremner wrote: > >> Particularly in help messages, nmbug is confusing for users who may >> have never heard of it. > > Good Progress! LGTM! > applied to master. ___ notm

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
st/corpora/duplicate/msg-2-1:2, b/test/corpora/duplicate/msg-2-1:2, new file mode 100644 index 0000..e118d784 --- /dev/null +++ b/test/corpora/duplicate/msg-2-1:2, @@ -0,0 +1,43 @@ +From: David Bremner +To: Samuel Bronson , 695...@bugs.debian.org, Debian Bug Tracking System

[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

<    1   2   3   4   5   6   7   8   9   10   >