Re: [BUG] notmuch_message_tags_to_maildir_flags does not always invalidate filenames_list

2022-05-24 Thread David Bremner
Eliza Velasquez writes: > Hello notmuch, > > As the subject says, it seems like the filename cache for a message is > not reliably invalidated when notmuch_message_tags_to_maildir_flags is > called, causing the following series of function calls to behave > unexpectedly. > > -

Re: moving mail to another maildir based on tags and renaming files

2022-05-24 Thread David Bremner
erik colson writes: > With notmuch my idea is to bundle the subfolders in the mainfolder so > that would roughly divide the mailboxes by at least 5. With notmuch the > subfolders are definitely to be tags. I want to keep the folder for > every project to at least have some kind of fallback in

[PATCH 2/8] lib/message: catch exceptions in _n_m_add_term

2022-05-23 Thread David Bremner
Some code movement is needed to make sure the cache is only invalidated when the Xapian operation succeeds. --- lib/message.cc | 27 +-- test/T566-lib-message.sh | 17 + 2 files changed, 34 insertions(+), 10 deletions(-) diff --git

[PATCH 1/8] test: define test_private_C

2022-05-23 Thread David Bremner
When testing error handling, it is sometimes difficult to cover a particular error path deterministically. Introduce a test function to allow calling lower level functions directly. --- configure| 16 test/test-lib.sh | 13 + 2 files changed, 29 insertions(+)

[PATCH 3/8] test: _notmuch_message_remove_term catches exceptions.

2022-05-23 Thread David Bremner
Unfortunately we can't differentiate between the two distinct error conditions for Document::remove_term. --- test/T566-lib-message.sh | 18 ++ 1 file changed, 18 insertions(+) diff --git a/test/T566-lib-message.sh b/test/T566-lib-message.sh index 08ab2765..5b6c937e 100755 ---

[PATCH 5/8] lib: define macro NODISCARD

2022-05-23 Thread David Bremner
In either C++17 (or later) mode, or when running cppcheck, this can be used to selectively generate warnings about discarded return values. --- lib/notmuch-private.h | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/notmuch-private.h b/lib/notmuch-private.h index c63cfe5e..1c2290b2

[PATCH 7/8] lib/message: check return status from _n_m_add_{path,folder}_terms

2022-05-23 Thread David Bremner
Mainly to propagate information about Xapian exceptions. --- lib/message.cc | 23 +-- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index 94be0f76..ae152df7 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -791,7 +791,7 @@

[PATCH 8/8] test: error handling in _n_message_{add,remove}_filename

2022-05-23 Thread David Bremner
Use a closed database to force throwing a Xapian exception. Leave the check vague to accomodate a potential explicit check for open database. --- test/T566-lib-message.sh | 32 1 file changed, 32 insertions(+) diff --git a/test/T566-lib-message.sh

[PATCH 6/8] lib/message: check return status of _n_m_{add,remove}_term

2022-05-23 Thread David Bremner
Xapian exceptions are not something that can be ignored, in general. --- lib/message.cc | 43 ++- 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index 09e5660b..94be0f76 100644 --- a/lib/message.cc +++

[PATCH 4/8] lib/message: drop _notmuch_message_get_thread_id_only

2022-05-23 Thread David Bremner
This function has been unused since commit 4083fd8. --- lib/message.cc| 17 - lib/notmuch-private.h | 3 --- 2 files changed, 20 deletions(-) diff --git a/lib/message.cc b/lib/message.cc index bf3a3419..09e5660b 100644 --- a/lib/message.cc +++ b/lib/message.cc @@ -340,23

incrementally improve error handling in notmuch_message*

2022-05-23 Thread David Bremner
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 function's return value is discarded. As a bonus,

RFC: drop notmuch_private_status_t, or use it better?

2022-05-23 Thread David Bremner
This is probably mostly my fault, but we have not really taken advantage of having a private set of status values, and defined only one private status value since 2010. Currently they are mainly a source of extra code (to coerce return values) and potential for error (if / when they get out of

[PATCH 3/3] test: replace deprecated use of notmuch_database_create

2022-05-21 Thread David Bremner
Like notmuch_database_open, we need to conditionally print the error message. --- test/T560-lib-error.sh | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/test/T560-lib-error.sh b/test/T560-lib-error.sh index 470537cc..80527afd 100755 ---

[PATCH 2/3] test: replace deprecated use of notmuch_database_open

2022-05-21 Thread David Bremner
This is a bit more involved than replacing the use of notmuch_database_open_verbose, as we have to effectively inline the definition of notmuch_database_open. --- test/T560-lib-error.sh | 28 +++- test/T570-revision-tracking.sh | 7 ++-

[PATCH 1/3] test: replace deprecated use of notmuch_database_open_verbose

2022-05-21 Thread David Bremner
We need to do it some day, and it is a bit annoying to read deprecation messages in broken tests. --- test/T560-lib-error.sh | 4 +++- test/T562-lib-database.sh | 4 +++- test/T563-lib-directory.sh | 4 +++- test/T564-lib-query.sh | 4 +++- test/T566-lib-message.sh | 4 +++-

Re: [PATCH] doc: define and use semantic markup for configuration items

2022-05-20 Thread David Bremner
David Bremner writes: > This makes sure each configuration item is cross referenceable without > extra markup, and also adds index entries. applied to master d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

Re: [PATCH] emacs: document/defcustom notmuch-multipart/alternative-discouraged

2022-05-20 Thread David Bremner
David Bremner writes: > This variable is important for people who want to change the default > behaviour when displaying multipart/alternative messages. Previously > it was undocumented. Add a defcustom to help users and copy some > documentation from the wiki. The usual machinery

Re: [BUG] notmuch_message_tags_to_maildir_flags does not always invalidate filenames_list

2022-05-20 Thread David Bremner
Eliza Velasquez writes: > Hello notmuch, > > As the subject says, it seems like the filename cache for a message is > not reliably invalidated when notmuch_message_tags_to_maildir_flags is > called, causing the following series of function calls to behave > unexpectedly. > > -

Re: [bug] possible condition depending on uninitialized value in _notmuch_message_sync

2022-05-20 Thread David Bremner
Eliza Velasquez writes: > On Mon, May 16 2022 at 06:47 -03, David Bremner wrote: > >> Ideally of course I'd like a reproducer in C. It would help to have >> line numbers in the valgrind output. It might be enough you install the >> notmuch debug symbols? > >

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

2022-05-18 Thread David Bremner
Alexander Adolf writes: > > Ok, I have added the line as you suggest. I was wondering though, as in > principle the secret key of test_su...@notmuchmail.org could be > available (it's in the key-ring at least)? Yes, it's added to the test suite's temporary keyring. One of the messages in

Re: [PATCH v2 1/1] emacs: notmuch-show-header-line: allow format strings and functions

2022-05-18 Thread David Bremner
Jose A Ortega Ruiz writes: > On Tue, May 17 2022, Tomi Ollila wrote: > > > [...] > >> To me it looks like some lines are indented with tabs and some spaces >> (noticed as indentation looked weird to me and then started moving cursor >> at the beginning of line -- there is probably a way to

Re: [bug] possible condition depending on uninitialized value in _notmuch_message_sync

2022-05-16 Thread David Bremner
Eliza Velasquez writes: > It becomes very clear why this error only happens when removing a > non-existent tag if you look at at message.cc:1570... > > --8<---cut here---start->8--- > try { > message->doc.remove_term (term); >

Re: Help with sending mail from notmuch-emacs

2022-05-16 Thread David Bremner
hgv writes: > > I'm still struggling with the Content-Transfer-Encoding header and the > "charset=utf-8" half of the Content-Type header, both of which I > cannot get set in my emails, if anyone has any thoughts! My only (not so helpful) thought is that this almost certainly an issue outside

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

2022-05-16 Thread David Bremner
A user asked about the thousands separator on IRC, and I had to check the source. --- I realized the docstring was getting mangled when auto-translated to rst, so I did the manual translation. doc/conf.py | 2 +- doc/notmuch-emacs.rst | 41 - 2

Re: do not inline application/* in replies

2022-05-16 Thread David Bremner
David Bremner writes: > 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.

Re: [bug] possible condition depending on uninitialized value in _notmuch_message_sync

2022-05-16 Thread David Bremner
Eliza Velasquez writes: > Is it possible then that there's a potential memory error with removing > a non-existent tag on a message? I wanted to ask about this on the > mailing list before diving in deeper, since this isn't quite the latest > version of notmuch and I wasn't sure if it had been

Re: [PATCH] doc/emacs: document notmuch-show-toggle-toggle-elide-non-matching

2022-05-15 Thread David Bremner
David Bremner writes: > Recently there was a question on the mailing list about the existence > of this function, so let us try to make it more discoverable. applied to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscrib

[PATCH 14/17] CLI/git: change defaults for repo and prefix

2022-05-15 Thread David Bremner
The previous defaults were not suitable for personal (i.e. not bugtracking for notmuch development) use. Provide two ways for the user to select nmbug compatible defaults; command line argument and checking the name of the script. --- Makefile.local | 5 +- doc/Makefile.local |

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

2022-05-15 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

[PATCH 15/17] CLI/git: support configuration for repo location / prefix

2022-05-15 Thread David Bremner
This is probably more convenient than always passing a command line argument. Use notmuch-config for consistency with other notmuch CLI tools. --- doc/man1/notmuch-config.rst | 8 + doc/man1/notmuch-git.rst| 4 +++ notmuch-git.in | 6 ++-- test/T850-git.sh| 67

[PATCH 06/17] test: initial tests for notmuch-git

2022-05-15 Thread David Bremner
Exercise the main functionality of notmuch-git. add_git_repos() will hopefully be simplifed when an init subcommand is added. --- notmuch-git.in | 4 +++ test/T850-git.sh | 93 2 files changed, 97 insertions(+) create mode 100755

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

2022-05-15 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

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

2022-05-15 Thread David Bremner
This is mainly derived from the various help outputs from the script, with some massaging of markup and addition of links. Define notmuch-git as a known external command. This will allow "notmuch help git" to invoke man notmuch-git, rather than erroring out. --- doc/conf.py | 4 +

[PATCH 08/17] CLI/git: suppress warnings about initial branch name

2022-05-15 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 f27591c9..78e4b140 100755 ---

[PATCH 12/17] CLI/git: cache git indices

2022-05-15 Thread David Bremner
If the private 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. The "git-read-tree

[PATCH 16/17] CLI/git: add safety checks for checkout and commit

2022-05-15 Thread David Bremner
Commits or checkouts that modify a large fraction of the messages in the database should be relatively rare (and in some automated process, probably non-existent). For initial setup, where such operations are expected, the user can pass --force. --- doc/man1/notmuch-config.rst | 7 ++

[PATCH 07/17] CLI/git: rename environment variables.

2022-05-15 Thread David Bremner
Although the code required to support both new and old environment variables is small, it complicates the semantics of configuration, and make the documentation harder to follow. --- notmuch-git.in | 35 ++- test/T850-git.sh | 6 +++--- 2 files changed, 17

[PATCH 03/17] notmuch-git: add --git-dir, --tag-prefix arguments

2022-05-15 Thread David Bremner
It is often more convenient to use command line arguments than environment variables. --- notmuch-git.in | 31 +-- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/notmuch-git.in b/notmuch-git.in index 5d6e29f0..4b94046d 100755 --- a/notmuch-git.in +++

[PATCH 02/17] CLI/git: drop support for python < 3.2

2022-05-15 Thread David Bremner
Debian stable had python 3.4.2 3 releases ago (approximately 6 years ago), so attempting to keep track of the changes in python is probably no longer worthwhile. We already require python 3.5 for the python-cffi bindings (although those are not yet used in notmuch-git). --- notmuch-git.in | 34

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

2022-05-15 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 10/17] CLI/git: replace enumeration of tags with sexp query.

2022-05-15 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 | 26

[PATCH 05/17] CLI/git: Add an 'init' command

2022-05-15 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 that closing stdin is m

[PATCH 04/17] CLI/git: make existance of config branch optional on clone

2022-05-15 Thread David Bremner
This branch is actually only used by an associated utility (notmuch-report), and notmuch-git works fine without it. --- notmuch-git.in | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/notmuch-git.in b/notmuch-git.in index 4b94046d..57b5a0ec 100755 --- a/notmuch-git.in

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

2022-05-15 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

notmuch-git

2022-05-15 Thread David Bremner
This series obsolates the WIP series at [1]. The rather long interdiff is given below [2]. At this point I think the tool is feature complete, at least enough for initial release. The main changes since the last series are the addition of configuration variables and a "safe_fraction" check that

[PATCH] emacs: document/defcustom notmuch-multipart/alternative-discouraged

2022-05-14 Thread David Bremner
This variable is important for people who want to change the default behaviour when displaying multipart/alternative messages. Previously it was undocumented. Add a defcustom to help users and copy some documentation from the wiki. The usual machinery of re-using docstrings is a bit tricky to

[PATCH] doc: define and use semantic markup for configuration items

2022-05-13 Thread David Bremner
This makes sure each configuration item is cross referenceable without extra markup, and also adds index entries. --- doc/conf.py | 7 + doc/man1/notmuch-config.rst | 60 +++-- doc/man1/notmuch-insert.rst | 15 +-

Re: Help with sending mail from notmuch-emacs

2022-05-12 Thread David Bremner
hgv writes: > 1. Mail gets sent but doesn't save in the correct directory via FCC. I > use msmtpq as my sending program. Upon sending, I receive this > message: "message-send-mail-with-sendmail: Sending...failed to mail > for [ -oi -f h...@fastmail.com -t ] : send was successful;" The mail is >

[PATCH] doc/emacs: document notmuch-show-toggle-toggle-elide-non-matching

2022-05-12 Thread David Bremner
Recently there was a question on the mailing list about the existence of this function, so let us try to make it more discoverable. --- doc/notmuch-emacs.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/notmuch-emacs.rst b/doc/notmuch-emacs.rst index 41f62390..67dbfc2b 100644 ---

Re: Change notmuch-show-elide-non-matching-messages on the fly

2022-05-12 Thread David Bremner
alan.schm...@polytechnique.org writes: > Hello, > > I often do searches in long threads with > notmuch-show-elide-non-matching-messages locally set to t. Sometimes I > need to show the whole thread. Is there a function to do that, or > should I write my own? > There is

Re: Introducing mujmap, a notmuch/JMAP bridge

2022-05-10 Thread David Bremner
Eliza Velasquez writes: > Hello notmuch, > > I hope this is an appropriate place to announce this! Apologies if not. > > I have just released a tool to synchronize notmuch mail with a JMAP > server, i.e. synchronizing tags with keywords and mailboxes. It's very > similar to lieer, which is a

Re: Help with sending mail from notmuch-emacs

2022-05-09 Thread David Bremner
hgv writes: > 1. Mail gets sent but doesn't save in the correct directory via FCC. I > use msmtpq as my sending program. Upon sending, I receive this > message: "message-send-mail-with-sendmail: Sending...failed to mail > for [ -oi -f h...@fastmail.com -t ] : send was successful;" The mail is >

Re: public-inbox, nmbug or Debbugs and notmuch sync?

2022-05-09 Thread David Bremner
zimoun writes: > > Somehow, I would like to have a bridge: keep Emacs+Notmuch but index > emails with another format (backend) than maildir as > public-inbox-v2-format. It would avoid data duplication and/or > conversion. > > 1: > I talked

Re: public-inbox, nmbug or Debbugs and notmuch sync?

2022-05-09 Thread David Bremner
zimoun writes: > > Currently, I synchronize my various Notmuch database using ’muchsync’ > [1] which works well enough for my needs. Although I am not completely > satisfied. > > Well, I have read this thread, starting at [2]: > > WIP: promote nmbug to user sync tool >

Re: WIP: promote nmbug to user sync tool

2022-05-07 Thread David Bremner
Sean Whitton writes: > [please keep me CCed] > > Hello David, > > On Sat 23 Apr 2022 at 10:38am -03, David Bremner wrote: > > Just looking at my current usage, there are two cases where I've wrapped > nmbug in some additional myrepos scripting. The first is a status &

Re: BUG: ruby segfault in notmuch_rb_tags_each

2022-05-05 Thread David Bremner
arcnmx writes: > Hi, I've been running into rare crashes via notmuch-vim for a while now and > finally got around to tracking down the problem. I apologize for the size > of the reproduction case, but at least it can be reproduced! Pinging Felipe to see if he has any ideas. d

Re: [PATCH 1/2] doc/sexp-queries: fix example

2022-05-05 Thread David Bremner
David Bremner writes: > Update the explanatory text to match the query. series applied to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: Forcing a sync of maildir flags?

2022-05-03 Thread David Bremner
Sean Whitton writes: > Hello David, >> # next line is a no-op, because it already doesn't have the unread tag >> notmuch tag -unread folder:sent > > Seems also worth noting that to my mind it ultimately shouldn't be > necessary to run that command -- notmuch should notice that one copy of > the

Re: Forcing a sync of maildir flags?

2022-05-01 Thread David Bremner
Sean Whitton writes: > > Thanks. Let me record in this thread what I will believe it will take a > reproduce this in a test: > > 1) inbox and sent are Maildirs > > 1) Compose mail to a mailing list which will return copies of >submissions, with `Fcc: sent -unread` Since you mention Fcc, are

[PATCH 2/2] doc/sexp-queries: be more consistent about ending example text

2022-04-30 Thread David Bremner
Most, but not all of the the explanatory texts already end in '.'. This makes the remainder match. --- doc/man7/notmuch-sexp-queries.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/man7/notmuch-sexp-queries.rst b/doc/man7/notmuch-sexp-queries.rst index

[PATCH 1/2] doc/sexp-queries: fix example

2022-04-30 Thread David Bremner
Update the explanatory text to match the query. --- doc/man7/notmuch-sexp-queries.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/man7/notmuch-sexp-queries.rst b/doc/man7/notmuch-sexp-queries.rst index 0eb86734..a20943c6 100644 ---

Re: [PATCH] doc/sexp-queries: escape @ in non-verbatim text

2022-04-30 Thread David Bremner
David Bremner writes: > This prevents sphinx-doc from creating spurious mailto: links. Thanks > to Jakub Wilk for telling me about the fix. applied to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

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

2022-04-30 Thread David Bremner
Leo writes: > From: Leo Okawa Ericson > > 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. You talk about notmuch-show-next-thread, but you seem to be modifying notmuch-search-show-thread. That actually

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

2022-04-30 Thread David Bremner
Leo Okawa Ericson writes: > Tomi Ollila writes: > >> >> I don't see why this indentation change is happening... >> > > I thought the indentation was inconsistent with the rest of the file. I > tried running the auto-indenter on a other more complex functions which > changed nothing, but it did

[PATCH] doc/sexp-queries: escape @ in non-verbatim text

2022-04-28 Thread David Bremner
This prevents sphinx-doc from creating spurious mailto: links. Thanks to Jakub Wilk for telling me about the fix. --- doc/man7/notmuch-sexp-queries.rst | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/man7/notmuch-sexp-queries.rst

notmuch release 0.36 now available

2022-04-25 Thread David Bremner
PGP SIGNATURE- https://notmuchmail.org/releases/notmuch-0.36.tar.xz.asc (signed by David Bremner) What's new in notmuch 0.36 = Library --- Add the `sexp` prefix to the infix (traditional) query parser. This allows specific subqueries to be parsed by the sexp

Re: WIP: promote nmbug to user sync tool

2022-04-23 Thread David Bremner
David Bremner writes: > - the (new) man page is inadequate > - notmuch git doesn't understand the common arguments to notmuch (--config > and friends) > - the defaults for prefix and git repo are wrong for most users. I was > thinking about either a > --nmbug argument to se

[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

[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 that closing stdin is m

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

[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

[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

[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

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

[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

[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

[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

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

[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

[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

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

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`,

[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

[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

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

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

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

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

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

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
lease (); 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 mode 100644 index ..ed26f6e

  1   2   3   4   5   6   7   8   9   10   >