[PATCH 02/16] notmuch-git: add --git-dir argument

2022-04-23 Thread David Bremner
The intent is to change the names of the environment variables before releasing this code, so avoid relying on environment variables in the test framework. --- notmuch-git.in | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/notmuch-git.in b/notmuch-git.in ind

[PATCH 05/16] nmbug: Add an 'init' command

2022-04-23 Thread David Bremner
for 'tags/...' fatal: git-write-tree: error building trees 'git HASH(0x9ef3eb8) write-tree' exited with nonzero value David Bremner suggested [1]: $ git hash-object -w /dev/null instead of my Python version of: $ git hash-object -w --stdin <&- but I expect tha

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

2022-04-23 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 417692d4..408a6337 100755 --- a/test/T850-git.sh +++ b/test/T850-git.sh

[PATCH 14/16] CLI/git: create CachedIndex class

2022-04-23 Thread David Bremner
The "git-read-tree HEAD" is a bottleneck, but unfortunately sometimes is needed. Cache the index checksum and hash to reduce the number of times the operation is run. The overall design is a simplified version of the PrivateIndex class, which is partially refactored to support the new class. --- n

[PATCH 01/16] nmbug: promote to user tool "notmuch-git"

2022-04-23 Thread David Bremner
So far this is just a rename. Documentation and tests to follow. --- Makefile.local | 7 +-- devel/nmbug/nmbug => notmuch-git.in | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) rename devel/nmbug/nmbug => notmuch-git.in (99%) diff --git a/Makefile.local b/Makefi

[PATCH 03/16] notmuch-git: add --tag-prefix argument

2022-04-23 Thread David Bremner
The test suite will require setting the tag prefix (at least initially), and this commit will enable doing that without relying on environment variables (whose names are planned to change). --- notmuch-git.in | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/notmuch

[PATCH 13/16] CLI/git: create PrivateIndex class

2022-04-23 Thread David Bremner
If the index file matches a previously known revision of the database, we can update the index incrementally using the recorded lastmod counter. This is typically much faster than a full update, although it could be slower in the case of large changes to the database. --- notmuch-git.in | 220 ++

[PATCH 15/16] debian: install notmuch-git

2022-04-23 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 | 1 + 2 files changed, 17 insertions(+) create mode 100644 debian/notmuch-git.install diff --git a

[PATCH 06/16] CLI/git: suppress warnings about initial branch name

2022-04-23 Thread David Bremner
The canonical nmbug repository still uses "master" as the main branch name, so defer any potential switch away from that name. --- notmuch-git.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/notmuch-git.in b/notmuch-git.in index d574f19e..3a58fd28 100755 --- a/notmuch-git.

[PATCH 11/16] CLI/git: add @timed decorator, time a few functions

2022-04-23 Thread David Bremner
Perf will show which binaries are using the CPU cycles, and standard python profilers will show which python functions, but neither is great at finding which call to an external binary is taking time, or locating I/O hotspots. --- notmuch-git.in | 19 ++- 1 file changed, 18 inserti

[PATCH 04/16] test: initial tests for notmuch-git

2022-04-23 Thread David Bremner
Exercise the main functionality of notmuch-git. add_git_repos() will hopefully be simplifed when an init subcommand is added. --- test/T850-git.sh | 95 1 file changed, 95 insertions(+) create mode 100755 test/T850-git.sh diff --git a/test/T850-g

[PATCH 07/16] test: use "notmuch git init" for tests.

2022-04-23 Thread David Bremner
Stick with the test-suite specific clone script for now, until clone no longer insists on the config branch (or init creates a config branch). --- test/T850-git.sh | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/test/T850-git.sh b/test/T850-git.sh index f52dd60d..d682141

[PATCH 12/16] CLI/git: rename private index file.

2022-04-23 Thread David Bremner
All files created by notmuch-git should be in a private directory to avoid collisions. --- notmuch-git.in | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/notmuch-git.in b/notmuch-git.in index 0d9f50a1..b69d57e7 100755 --- a/notmuch-git.in +++ b/notmuch-git.in @@ -63

[PATCH 08/16] CLI/git: make existance of config branch optional on clone

2022-04-23 Thread David Bremner
This branch is actually only used by an associated utility (notmuch-report), and notmuch-git works fine without it. With this change we can use "notmuch git clone" in the setup for the tests in T850-git.sh --- notmuch-git.in | 8 +++- test/T850-git.sh | 9 + 2 files changed, 8 inser

[PATCH 10/16] CLI/git: replace enumeration of tags with sexp query.

2022-04-23 Thread David Bremner
Unlike the (current) infix query parser provided by Xapian, the notmuch specific sexp query parser supports prefixed wildcard queries, so use those. In addition to being somewhat faster, this avoids needing to escape all of the user's tags to pass via the shell. --- notmuch-git.in | 23 +

[PATCH 16/16] WIP: start manual page for notmuch-git

2022-04-23 Thread David Bremner
--- doc/conf.py | 4 ++ doc/index.rst| 1 + doc/man1/notmuch-git.rst | 106 +++ 3 files changed, 111 insertions(+) create mode 100644 doc/man1/notmuch-git.rst diff --git a/doc/conf.py b/doc/conf.py index e46e1d4e..da0635bb 100644 -

WIP: promote nmbug to user sync tool

2022-04-23 Thread David Bremner
One of the things that new (and old) users of notmuch often miss is a way to sync tags between hosts. muchsync exists, but it's a third party tool, and (if I understand correctly) it directly modifies the notmuch database. Meanwhile we ship a moderately complex python script called 'nmbug' which ca

Re: [PATCH 2/2] NEWS: user visible changes for 0.36

2022-04-22 Thread David Bremner
Series applied to master and release. Unless I hear of blockers, I'll probably cut a release this weekend. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: Autorefresh buffer at set interval

2022-04-21 Thread David Bremner
Ishe Chinyoka writes: > I am sorry if this is in the documentation, but I am failing to pick > the right spot. Anyway, which variable can I set to have notmuch-poll > triggered at a set interval? I don't think this currently exists. You could define your own timer [1]. > BTW, I am on Arch and a

Re: [PATCH] configure: avoid warning with -Wall

2022-04-19 Thread David Bremner
Tomi Ollila writes: > On Mon, Apr 18 2022, michaeljgruber wrote: > >> From: Michael J Gruber >> >> 7228fe68 ("configure: restructure gmime cert validity checker code", >> 2022-04-09) restructured generated C code to repurpose it later on. This >> put usage of `validity` within an `#if`, resultin

[Wishlist] Add equivalent of lastmod:nnn.. to sexp query parser

2022-04-18 Thread David Bremner
This is mainly a reminder to myself, but also an opportunity for query language bikeshedding. Currently the sexp query parser parses '(lastmod 1234)' as equivalent to lastmod:1234..1234. This is reasonable enough, but leaves no easy way to do the equivalent to lastmod:1234.. (the other one sided

[PATCH 2/2] NEWS: user visible changes for 0.36

2022-04-16 Thread David Bremner
--- NEWS | 42 ++ 1 file changed, 42 insertions(+) diff --git a/NEWS b/NEWS index f2a2df0d..63e63f4b 100644 --- a/NEWS +++ b/NEWS @@ -1,6 +1,48 @@ Notmuch 0.36 (UNRELEASED) = +Library +--- + +Add the `sexp` prefix to the infi

[PATCH 1/2] NEWS: fix location for notmuch-web

2022-04-16 Thread David Bremner
It actually lives under 'devel/', not 'contrib/`. --- NEWS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NEWS b/NEWS index 23be75de..f2a2df0d 100644 --- a/NEWS +++ b/NEWS @@ -4,7 +4,7 @@ Notmuch 0.36 (UNRELEASED) New add-on tool: notmuch-web -

Re: release process for notmuch 0.36

2022-04-16 Thread David Bremner
David Bremner writes: > David Bremner writes: > >> I plan to feature freeze in mid April, and release 0.36 sometime before >> the end of April. > > As promised I have tagged and uploaded the first release candidate for > 0.36. I will watch for bug reports for a

Re: [PATCH] fix build without sfsexp

2022-04-15 Thread David Bremner
michaeljgruber+grubix+...@gmail.com writes: > From: Michael J Gruber > > a1d139de ("lib: add sexp: prefix to Xapian (infix) query parser.", > 2022-04-09) introduced sfsexp infix queries. This requires the infix > preprocessor to be built in in a way which does not require sfsexp when > notmuch is

[PATCH] lib: don't compile sexp: prefix if no sfsexp library

2022-04-15 Thread David Bremner
As Michael Gruber pointed out, the build is otherwise broken on systems without libsfsexp. --- lib/prefix.cc | 4 lib/sexp-fp.cc | 3 +++ lib/sexp-fp.h | 2 ++ 3 files changed, 9 insertions(+) diff --git a/lib/prefix.cc b/lib/prefix.cc index 06e2333a..538a2dd1 100644 --- a/lib/prefix.cc ++

Re: release process for notmuch 0.36

2022-04-15 Thread David Bremner
David Bremner writes: > I plan to feature freeze in mid April, and release 0.36 sometime before > the end of April. As promised I have tagged and uploaded the first release candidate for 0.36. I will watch for bug reports for a week or so before doing the final release. d signatu

Re: [PATCH v2 2/2] lib: add sexp: prefix to Xapian (infix) query parser.

2022-04-15 Thread David Bremner
David Bremner writes: > This is analogous to the "infix" prefix provided by the s-expression > based query parser. series applied to master. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an ema

Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show

2022-04-13 Thread David Bremner
Alexander Adolf writes: > Hello David, > > David Bremner writes: > >> [...] >> I'm not sure it's less effort, >> [...] > > Neither am I... ;-)) > > It might perhaps seem easier to run the tests I have added to the > attached, updated pat

Re: [PATCH v2 2/2] test/smime: fix signature verification test with newer gmime.

2022-04-13 Thread David Bremner
Daniel Kahn Gillmor writes: > Thanks, Michael-- > > This LGTM. > > It is more narrowly-targeted at permitting this specific variation than > Bremner's earlier version of the patch (and it doesn't have any tests > marked BROKEN), which is nice. > > It might be marginally cleaner to swap out the LE

Re: Display tags on separate lines on notmuch-hello screen

2022-04-12 Thread David Bremner
Ishe Chinyoka writes: > Hi list, > > Is it possible to have my tags---whether under saved searches or all > tagss---displayed as a literal list, that is each tag along with its > uncounted number on its own line? Currently I see them all listed on a > single line. > Try setting the variable not

Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show

2022-04-11 Thread David Bremner
Alexander Adolf writes: > David Bremner writes: > >> [...] >> You could also run T355-smime with --debug and inspect >> tmp.T355-smime/mail afterwards, there should be some signed and >> encrypted mails. >> [...] > > $ ./T355-smime.sh --debug >

[PATCH v2 2/2] lib: add sexp: prefix to Xapian (infix) query parser.

2022-04-09 Thread David Bremner
new SexpFieldProcessor (notmuch))->release (); else fp = (new RegexpFieldProcessor (prefix->name, prefix->flags, *notmuch->query_parser, notmuch))->release (); diff --git a/lib/sexp-fp.cc b/lib/sexp-fp.cc new file mo

[PATCH v2 1/2] test/sexp: add test for and of stemmed terms.

2022-04-09 Thread David Bremner
Previously only singled stemmed terms were tested. --- test/T081-sexpr-search.sh | 7 +++ 1 file changed, 7 insertions(+) diff --git a/test/T081-sexpr-search.sh b/test/T081-sexpr-search.sh index e2936cd7..07b12619 100755 --- a/test/T081-sexpr-search.sh +++ b/test/T081-sexpr-search.sh @@ -31,6

v2 allow sexp queries in infix parser

2022-04-09 Thread David Bremner
This is a pretty useful feature, so I want to include it 0.36. That means you have a bit less than a week to give me feedback. Speaking of feedback, I have no idea why the "and of stemmed terms" test was included in the first version of this patch. I have split it out to it's own patch.

[PATCH 2/2] test/smime: fix signature verification test with newer gmime.

2022-04-09 Thread David Bremner
The extra machinery to check for the actual output format is justified by the possibility that distros may patch this newere output format into older versions of gmime. --- configure | 17 + test/T355-smime.sh | 7 +-- 2 files changed, 22 insertions(+), 2 deletions(-)

[PATCH 1/2] configure: restructure gmime cert validity checker code

2022-04-09 Thread David Bremner
The goal is to generalize this to also check the output format of g_mime_certificate_get_email. --- configure | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/configure b/configure index 36f3f606..d6e1200e 100755 --- a/configure +++ b/configure @@ -552,11 +552,7

[PATCH] doc/emacs: document a few notmuch-hello customizable variables.

2022-04-08 Thread David Bremner
A user asked about the thousands separator on IRC, and I had to check the source. --- doc/conf.py | 2 +- doc/notmuch-emacs.rst | 12 +++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index e46e1d4e..fee52b64 100644 --- a/doc/conf.py

Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show

2022-04-07 Thread David Bremner
Alexander Adolf writes: > > Where can I find the S/MIME test key? test/smime directory? test/smime/0xE0972A47.p12 > Is there a better way for generating the test messages than importing > the test key into my "production" keychain? Look to T355-smime for > inspiration? The former is probably t

Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show

2022-04-07 Thread David Bremner
sible-output))' test_expect_equal_file $EXPECTED/notmuch-show-process-crypto-mime-parts-on OUTPUT you would also need to create a file with a "screen display" in $EXPECTED, and add that as part of your patch. I hope that helps, David ___

Re: [PATCH] emacs: Add more front ends for address completion

2022-04-06 Thread David Bremner
Utkarsh Singh writes: >> >> Can you be more precise about what you are asking / proposing here? >> Assume I only skimmed the thread. > > Currently, notmuch-address.el, the library used to generate completion > candidates for recipient's addresses in Notmuch's message compostion > mode uses non-st

Re: [PATCH] emacs/smime: render decrypted MIME entities in notmuch-show

2022-03-29 Thread David Bremner
macs-show, but it might be easier to add to T355-smime. Eventually we'll also need a short update to doc/notmuch-emacs.rst. I hope that helps move review forward, David ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

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

2022-03-25 Thread David Bremner
Mohsin Kaleem writes: > David Bremner writes: > >> Try adding a line >> "unset XDG_DATA_HOME" >> >> after >> >> unset XDG_CONFIG_HOME >> >> on line 108 of test/test-lib.sh > > Doesn't seem to be such a line in tes

[PATCH] test: unset XDG_DATA_HOME and MAILDIR for tests.

2022-03-25 Thread David Bremner
The some of the tests (and the library functions they exercise) that rely on XDG_CONFIG_HOME also check XDG_DATA_HOME and MAILDIR. --- test/test-vars.sh | 4 1 file changed, 4 insertions(+) this obsoletes the version that only unset XDG_DATA_HOME diff --git a/test/test-vars.sh b/test/test-v

[PATCH] test: unset XDG_DATA_HOME for tests.

2022-03-25 Thread David Bremner
The some of the the tests that rely on XDG_CONFIG_HOME also check XDG_DATA_HOME. --- test/test-vars.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/test/test-vars.sh b/test/test-vars.sh index 812bcf81..cfd3905b 100644 --- a/test/test-vars.sh +++ b/test/test-vars.sh @@ -43,6 +43,7 @@ unset G

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

2022-03-22 Thread David Bremner
Mohsin Kaleem writes: > David Bremner writes: > >> It's just a guess, but do you by chance override XDG_DATA_HOME? I can >> imagine that causing problems for the test suite. > > I do export an environment variable $XDG_DATA_HOME, but it points to the > defaul

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

2022-03-22 Thread David Bremner
Mohsin Kaleem writes: > David Bremner writes: > >> Can you be more specific about what tests are failing? > > Pretty much all of them, although I'm beginning to suspect it may be an > environment issue on my part. > > I've attached the output of running `ma

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

2022-03-22 Thread David Bremner
Mohsin Kaleem writes: > > I'm more than happy to add some new tests but at least for me the test > suite appears to be failing on the master branch. I think it'd be easier > to wait until the existing tests are fixed before adding or changing new > ones. > Can you be more specific about what test

Re: Failing notmuch/SMIME test

2022-03-22 Thread David Bremner
Daniel Kahn Gillmor writes: > I suppose the right way to fix this generically is a test which > abstracts out whether gmime reports an angle-addr or a addr-spec for > x.509 certs, and then adjust the tests to match. > > I can try to send a patch for this, but it'll take me a while to swap > it al

release process for notmuch 0.36

2022-03-20 Thread David Bremner
I plan to feature freeze in mid April, and release 0.36 sometime before the end of April. d signature.asc Description: PGP signature ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: [PATCH] emacs: Add more front ends for address completion

2022-03-20 Thread David Bremner
Utkarsh Singh writes: > Thank you for working on this issue. But from now, its up to Notmuch > maintainers to decide whether or not they want any improvements in > `notmuch-address.el'. Can you be more precise about what you are asking / proposing here? Assume I only skimmed the thread. d

[PATCH] lib: add sexp: prefix to Xapian (infix) query parser.

2022-03-19 Thread David Bremner
fp = (new SexpFieldProcessor (notmuch))->release (); else fp = (new RegexpFieldProcessor (prefix->name, prefix->flags, *notmuch->query_parser, notmuch))->release (); diff --git a/lib/sexp-fp.cc b/lib/sexp-fp.cc new

Re: WIP: asynchronous notmuch-poll in emacs client

2022-03-19 Thread David Bremner
Preston Miller Firestone <0x504...@disroot.org> writes: > I think that the first two problems can be solved by a more > sophisticated sentinel than the one I'm using here, but I'd love to hear > other people's thoughts. Is there a reason that notmuch-poll is > synchronous? For whatever reason (h

Re: [PATCH 1/2] test: known broken tests for bracketed terms in subject

2022-03-19 Thread David Bremner
David Bremner writes: > The heuristics in the field processor currently incorrectly trigger > phrase parsing. I have applied this series to master d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notm

[PATCH 4/5] emacs: factor out calculation of mm-inline-override-types

2022-03-19 Thread David Bremner
The intended use case of this new function is to make reply behaviour track that of show with respect to attachments. Also fix the glob (which worked by fluke) into the documented regexp. --- emacs/notmuch-lib.el | 8 emacs/notmuch-show.el | 10 ++ 2 files changed, 10 insertion

[PATCH 1/5] test: start corpus for attachments

2022-03-19 Thread David Bremner
+From: =?utf-8?Q?Antoine_Beaupr=C3=A9?= +To: David Bremner , notmuch@notmuchmail.org +Subject: Re: bug: "no top level messages" crash on Zen email loops +In-Reply-To: <87a7v42bv9@curie.anarc.at> +References: <87d10042pu@curie.anarc.at> <87woy8vx7i@tessera

[PATCH 2/5] test/emacs: add regression test for display of tar attachments

2022-03-19 Thread David Bremner
ed by default" +test_emacs '(notmuch-show "id:874llc2bkp@curie.anarc.at") + (test-visible-output "OUTPUT")' +cat < EXPECTED +Antoine Beaupré (2018-03-19) (attachment inbox) +Subject: Re: bug: "no top level messages" crash on Zen em

[PATCH 3/5] test: add known broken test for inlining in emacs/reply

2022-03-19 Thread David Bremner
The same mitigation already applied for show should also be applied for reply --- test/T453-emacs-reply.sh | 35 +++ 1 file changed, 35 insertions(+) create mode 100755 test/T453-emacs-reply.sh diff --git a/test/T453-emacs-reply.sh b/test/T453-emacs-reply.sh new f

[PATCH 5/5] emacs/reply: restrict what mime types are inlined by default

2022-03-19 Thread David Bremner
Apply the previously factored-out function used by notmuch-show. --- emacs/notmuch-mua.el | 4 +++- test/T453-emacs-reply.sh | 1 - 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index c679373b..60801f4b 100644 --- a/emacs/notmuch-mua

do not inline application/* in replies

2022-03-19 Thread David Bremner
Since notmuch 0.24, notmuch-emacs has overriden the Gnus defaults for inlining attachements with type "application/*" when showing messages. This series adds some tests and applies the same override for reply. ___ notmuch mailing list -- notmuch@notmuch

Failing notmuch/SMIME test

2022-03-18 Thread David Bremner
One of the SMIME tests is failing for me. T355-smime: Testing S/MIME signature verification and decryption FAIL signature verification (notmuch CLI) --- T355-smime.4.expected 2022-03-18 10:31:31.877258855 + +++ T355-smime.4.output 2022-03-18 10:31:31.877258855 +

Re: Confusing message from notmuch-maildir-fcc-with-notmuch-insert

2022-03-04 Thread David Bremner
Carl Worth writes: > > Certainly if the code had just created the directory for me, everything > would have been fine. But I guess I can understand why the code doesn't > do that if we're trying to support a case where users are manually > typing random strings in for the Fcc header and might typ

Re: Emacs: UI problems with messages excluded by several tags

2022-03-03 Thread David Bremner
Teemu Likonen writes: > David Bremner [2019-07-19T09:19:13-03] wrote: > >> I'm not sure I follow you. It seems like this should be the behaviour >> also if the message is tagged with one exclude tag; i.e. it sounds >> like it is working as I expect. Can you explain

Re: [BUG] Custom headers in `notmuch-message-headers` are broken

2022-03-03 Thread David Bremner
Jan Malakhovski writes: > # What I did > > I added "X-Github-Sender" to `notmuch-message-headers`. > Looked at a message sent via github with `notmuch-show`. > > # What I expected > > To see "X-Github-Sender" header displayed in `notmuch-show`. > > # What I got > > No such header was displayed. >

Re: Bug in notmuch-emacs: inconsistent rendering for messages with multiple From: headers

2022-02-26 Thread David Bremner
David Bremner writes: >> But the first message in notmuch-show doesn't show Bob at all: >> --- >> Alice (8 mins. ago) () >> Subject: a test from alice and bob >> To: Daniel Kahn Gillmor >> Date: Mon, 23 Oct 2017 01:37:56 -0400 &g

Re: Bug in notmuch-emacs: inconsistent rendering for messages with multiple From: headers

2022-02-26 Thread David Bremner
Daniel Kahn Gillmor writes: > All three messags below are "From:" both alice and bob, and alice is > always listed first. the difference in how notmuch-emacs displays them > is in how the sending address shows up. In notmuch-search, it only > shows the first address: > > ---

Re: v4 undo tagging

2022-02-26 Thread David Bremner
David Bremner writes: > David Bremner writes: > >> This obsoletes the series at id:20220203143254.3344753-1-da...@tethera.net. >> >> This revision includes a few commit message cleanups, and drops one >> patch to the emacs test-lib (it turns out it was unneeded f

Re: v4 undo tagging

2022-02-25 Thread David Bremner
David Bremner writes: > This obsoletes the series at id:20220203143254.3344753-1-da...@tethera.net. > > This revision includes a few commit message cleanups, and drops one > patch to the emacs test-lib (it turns out it was unneeded for this > simplified approach). I have appl

Re: [PATCH] contrib/notmuch-web: single user web front end using python-cffi

2022-02-25 Thread David Bremner
David Bremner writes: > Originally contributed by Brian Sniffen. Quite a few unpublished fixes > from Daniel Kahn Gilmour. We've been running it a few years now as the > "official" archive of the notmuch mailing list. There also a few fixes > from myself and Austin Ray

[PATCH 2/2] lib: do not phrase parse prefixed bracketed subexpressions

2022-02-24 Thread David Bremner
Since Xapian does not preserve quotes when passing the subquery to a field processor, we have to make a guess as to what the user intended. Here the added assumption is that a string surrounded by parens is not intended to be a phrase. --- doc/man7/notmuch-search-terms.rst | 6 -- lib/regexp-

[PATCH 1/2] test: known broken tests for bracketed terms in subject

2022-02-24 Thread David Bremner
The heuristics in the field processor currently incorrectly trigger phrase parsing. --- test/T650-regexp-query.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/test/T650-regexp-query.sh b/test/T650-regexp-query.sh index 55dc6c88..4ee6b171 100755 --- a/test/T650-regexp-que

fix for parsing bracketed expression

2022-02-24 Thread David Bremner
This is not a complete fix, which is hard because of the way we implement regular expressions. Sean's original examples still won't work, but hopefully the tests in the second patch show how to make something similar work. This is probably a good time to mention that this kind of thing is easier in

Re: [PATCH v3] removed use of 'echo -n' (and echo -n -e ...)

2022-02-21 Thread David Bremner
Tomi Ollila writes: > In most cases used printf %s ... instead. > > echo -n > file lines to create empty / truncate files were > changed to : > file lines, like done in in test-lib-emacs.sh > > And one echo -n " " replaced with use of sed "s/^/ /" in next line. applied to master. d _

Re: allow disabling the check for multi-message mboxes

2022-02-20 Thread David Bremner
David Bremner writes: > Notmuch tries to prevent users from shooting themselves in the foot by > indexing mboxes containing multiple messages. On the other hand some > MTAs (notably common configurations of postfix) like to deliver mail > to file the looks like mboxes. This can occas

Re: [PATCH 2/4] test: due not pass T380.1 for the wrong reasons

2022-02-20 Thread David Bremner
Michael J Gruber writes: > Alternatively, require GNU coreutils and use /usr/bin/echo. > Right, we're try to avoid a hard dependency on coreutils in the test suite. Note that the test suite requires bash >= 4, so portability of the builtins is less of a practical issue. d __

Re: [PATCH 4/4] CLI/insert: escape envelope from

2022-02-19 Thread David Bremner
Tomi Ollila writes: > > spaces > Thanks, I caught one more formatting change in a previous patch, and applied the series to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: [PATCH 2/4] test: due not pass T380.1 for the wrong reasons

2022-02-19 Thread David Bremner
Tomi Ollila writes: > > Wat? afaik echo is builtin in every modern bourne shell derivative... > > (I tested: > $ bash -c 'builtin echo foo' > foo > $ bash -c 'export PATH=/tmp; echo foo; ls' > foo > bash: ls: command not found > ) Oops. That's what I get for believing "which". Which is anot

Re: [PATCH v2 2/2] python-cffi: use config_pairs API in ConfigIterator

2022-02-17 Thread David Bremner
Floris Bruynooghe writes: > lgtm i think :) Applied to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: [PATCH] test: allow to use --full-sync

2022-02-17 Thread David Bremner
Michael J Gruber writes: > I don't mind carrying this locally and retrying without for the next > round of notmuch updates. Having the patch here on-list may help > someone else in the future in any case. OK, I suggest you do that for now. I'm not categorically opposed to (some version of) the c

[no subject]

2022-02-16 Thread David Bremner
Floris wrote: > FWIW having spaces between the function name and parentheses is rather >uncommon for python style. Though of course complaining about style >without using an auto-formatter is pretty meh these days :) > Yeah fair enough, it's the default in the C code, but we pretty clearly have

[PATCH v2 1/2] test: known broken test for list(db.config) in python-cffi bindings

2022-02-16 Thread David Bremner
As of notmuch 0.34.2 [1], the python-cffi bindings make available the configuration from both a config file and the database when accessing Database.config like a dictionary. It is therefore confusing that the iterator operations only work on the configuration information stored in the database.

[PATCH v2 2/2] python-cffi: use config_pairs API in ConfigIterator

2022-02-16 Thread David Bremner
This returns all of the config keys with non-empty values, not just those that happen to be stored in the database. --- bindings/python-cffi/notmuch2/_build.py | 16 - bindings/python-cffi/notmuch2/_config.py | 40 +++ bindings/python-cffi/tests/test_config.py | 24 +

Re: [PATCH] emacs: escape quote in notmuch-search-result-format docstring

2022-02-16 Thread David Bremner
Tomi Ollila writes: > On Wed, Feb 16 2022, David Bremner wrote: > > LGTM, now I remeber this syntax... > > Tomi > OK, the docstring is fixed in commit 6286b76a, which should be in the next major release (0.36). Thanks for the report, d _

Re: [PATCH] test: allow to use --full-sync

2022-02-16 Thread David Bremner
Michael J Gruber writes: > Some build infrastructure appears to habe problems with mtime/stat, have > leading to spurious failures (noticed on s390x and aarch64 with epel8). > Allow the test suite to be run with --full-sync so that release builds > can use the test suite while avoiding spurious

[PATCH] emacs: escape quote in notmuch-search-result-format docstring

2022-02-16 Thread David Bremner
Prevent Emacs' mangling of quotes, which breaks the code sample. --- emacs/notmuch.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 6abb17ff..c9cf80dc 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -93,7 +93,7 @@ Supported f

Re: WIP: filter out envelope headers in notmuch-insert.

2022-02-14 Thread David Bremner
NeilBrown writes: > And on digging into postfix a bit, it seem that when forwarding to a > program, it *doesn't* quote other "From " lines in the email, so > splitting up the input would break things. I wonder if that is a bug... > the documentation is clear on the details of delivering to a pro

Re: WIP: filter out envelope headers in notmuch-insert.

2022-02-14 Thread David Bremner
"NeilBrown" writes: > On Mon, 14 Feb 2022, David Bremner wrote: > > If notmuch-insert is given an 'mbox', shouldn't it either reject it, or > split it up into individual messages and insert each one individually > (discarding the "From" line b

Re: Test suite timing issues?

2022-02-14 Thread David Bremner
Tomi Ollila writes: > > Looked notmuch-new.c -- time_t (seconds since epoch) is used as timestamp > comparisons (which would indicate the subsecond resolution most fs' provide > is not used)... > > ... and if so, I wonder why some of our tests are not failing all the time > for everyone...? Not

Re: WIP: filter out envelope headers in notmuch-insert.

2022-02-14 Thread David Bremner
"NeilBrown" writes: > On Sat, 12 Feb 2022, David Bremner wrote: >> This is a bit rough and ready, but before I fine tune it, I want to >> make sure the overall idea of stripping envelope headers in >> notmuch-insert makes sense. > > I think that it would

[PATCH 2/4] test: add known broken test for insert with mbox as input

2022-02-13 Thread David Bremner
It seems reasonable that notmuch should try to avoid delivering messages in formats it cannot index. --- test/T070-insert.sh | 6 ++ 1 file changed, 6 insertions(+) diff --git a/test/T070-insert.sh b/test/T070-insert.sh index ec170b30..a297fa73 100755 --- a/test/T070-insert.sh +++ b/test/T070

[PATCH 3/4] CLI/insert: split copy_fd

2022-02-13 Thread David Bremner
This helps maintainability and enables code-reuse of our home-brewed buffered-write code. This commit is mostly code movement. --- notmuch-insert.c | 37 + 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/notmuch-insert.c b/notmuch-insert.c index

[PATCH 1/4] test: start new corpus of test messages for indexing code

2022-02-13 Thread David Bremner
exing/mbox-attachment.eml @@ -0,0 +1,83 @@ +From da...@tethera.net Sat Feb 5 09:19:10 2022 +From: David Bremner +To: David Bremner +Subject: Re: [RFC PATCH v2 12/12] emacs: whitespace cleanup for keybindings +Date: Sat, 05 Feb 2022 10:19:09 -0400 +Message-ID: <87k0e9o0pu@tethera.net> +M

[PATCH 4/4] CLI/insert: escape envelope from

2022-02-13 Thread David Bremner
The idea is to do as little parsing and modification of the delivered message as possible. Luckily the position of the "envelope header" lets us escape it by replacing the first 5 characters of the stream with a regular header name (with ':'). --- notmuch-insert.c| 15 ++- test/T07

Escape mbox "From " header in notmuch-insert

2022-02-13 Thread David Bremner
This obsoletes the WIP patches at [1]. I've settled on this being a reasonable thing to do; this series tries to do it in a more maintainable way. Compared to the WIP series, it is also more careful about writing out the inserted head name. It again repeats the patch adding a test message in mbox

[RFC PATCH] CLI/insert: convert copy_fd to use stdio

2022-02-13 Thread David Bremner
Rather than doing our own buffer management, use stdio, and line based I/O. This will simplify doing some simple header filtering. --- As hinted in id:87pmnqx3mk@tethera.net , this looks like a dead end to me at the moment, but perhaps of interest to someone looking at a larger rewrite of notm

Re: WIP: filter out envelope headers in notmuch-insert.

2022-02-13 Thread David Bremner
David Bremner writes: > David Bremner writes: > >> I thought about a more ambitious version that would replace any >> existing "Return-Path" headers, but it seems like significantly more >> work (the current code is not line based), and not obviously >>

Re: [PATCH] emacs: remove png logo

2022-02-12 Thread David Bremner
David Bremner writes: > Reduce chance of downstream packagers packing the wrong file. > --- I have applied this master. People automatically packaging master will need up update their packaging rules to take the svg logo instead of the png. In fact such packaging was already broken sin

Re: Test suite timing issues?

2022-02-12 Thread David Bremner
Tomi Ollila writes: > > Does such a change hide "buggy" functionality ? We mostly don't use add_message, call notmuch new via NOTMUCH_NEW in T050-new.sh. So I think it would mostly not hide bugs in notmuch new. OTOH, I'm surprised the same issues with timestamps don't show up there, if that is r

Re: [PATCH 2/4] test: due not pass T380.1 for the wrong reasons

2022-02-12 Thread David Bremner
Michael J Gruber writes: > When analysing this, I was confused by the way > test_require_external_prereq works and the "if" in T380 (as opposed to how > test_require_external_prereq is used in other tests). Over at git.git, > we have test setup code in functions which don't get executed if > pre

[PATCH v4 10/11] emacs: Document undo binding.

2022-02-12 Thread David Bremner
This messes up whitespace, which will require a global change to fix. --- devel/emacs-keybindings.org | 1 + doc/notmuch-emacs.rst | 2 ++ 2 files changed, 3 insertions(+) diff --git a/devel/emacs-keybindings.org b/devel/emacs-keybindings.org index 2f73a198..7f0d26bb 100644 --- a/devel/emac

<    4   5   6   7   8   9   10   11   12   13   >