[PATCH 5/5] doc: document database.autocommit variable

2021-05-21 Thread David Bremner
This exposes some database internals that most users will probably not understand. --- doc/man1/notmuch-config.rst | 10 ++ 1 file changed, 10 insertions(+) diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst index 75c59ff9..7d709bfb 100644 ---

[PATCH 3/5] test: add known broken test for closing with open transaction

2021-05-21 Thread David Bremner
The expected output may need adjusting, but what is clear is that saving none of the changes is not desirable. --- test/T385-transactions.sh | 36 1 file changed, 36 insertions(+) create mode 100755 test/T385-transactions.sh diff --git

[PATCH 2/5] lib/config: add NOTMUCH_CONFIG_AUTOCOMMIT

2021-05-21 Thread David Bremner
This will be used to control how often atomic transactions are committed. --- lib/config.cc| 4 lib/notmuch.h| 1 + test/T030-config.sh | 1 + test/T055-path-config.sh | 1 + test/T590-libconfig.sh | 4 5 files changed, 11 insertions(+) diff --git

[PATCH 4/5] lib: autocommit after some number of completed transactions

2021-05-21 Thread David Bremner
This change addresses two known issues with large sets of changes to the database. The first is that as reported by Steven Allen [1], notmuch commits are not "flushed" when they complete, which means that if there is an open transaction when the database closes (or e.g. the program crashes) then

Commit after some number of transactions

2021-05-21 Thread David Bremner
The main rational is explained in the commit message to [PATCH 4/5] lib: autocommit after some number of completed I'm not super-happy with the documentation in [5/5], as it explains things in terms of database concepts the user shouldn't really need to understand. [PATCH 5/5] doc: document

[PATCH 1/5] database/close: remove misleading code / comment

2021-05-21 Thread David Bremner
Unfortunately, it doesn't make a difference if we call cancel_transaction or not, all uncommited changes are discarded if there is an open (unflushed) transaction. --- lib/database.cc | 12 ++-- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/lib/database.cc

[PATCH] configure: $(CC) -o /dev/null when output not run

2021-05-21 Thread Tomi Ollila
When C compilation is used just to see whether compilation succeeds, there is no need to write any output file. Some compilations in configure already did this. Now also rm -f lines are used more consistently. While at it reformatted code that prints LIBNOTMUCH_{MAJOR,MINOR,MICRO}_VERSION). ---

[PATCH 4/5] doc: use program and option directives to document options

2021-05-21 Thread Jani Nikula
Use the program and option directives to document the subcommand options. This unifies a lot of option documentation throughout. This also makes it possible to reference options with :option:`--foo` (within .. program::) or :option:`subcommand --foo` (globally). This is left for later work. See

[PATCH 5/5] doc: example command-line option reference

2021-05-21 Thread Jani Nikula
Example reference to a command-line option using the option role reference. This creates a hyperlink in html, and the usual boldface style in man page. This could be used throughout the man pages. --- doc/man1/notmuch-config.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 3/5] doc: use envvar directive and role for environment variables

2021-05-21 Thread Jani Nikula
Make man1/notmuch.rst the single point of truth for describing notmuch environment variables. Use the envvar directive for that, and reference them with the envvar role. Drive-by cleanup configuration file and hook directory search order documentation. --- doc/man1/notmuch-compact.rst | 10

[PATCH 2/5] doc: cross-reference notmuch man pages with actual links

2021-05-21 Thread Jani Nikula
Add internal hyperlink targets for man pages and cross-reference them using the any role reference. There are a number of alternatives to accomplish this, but this seems like the combination that retains the man page section number and the same boldface style in the man pages. As a bonus, we get

[PATCH 1/5] doc: use manpage role references to external man pages

2021-05-21 Thread Jani Nikula
Using manpage role references generates helpful links in html documentation, while retaining the same boldface style in the man pages. The external man page site is configurable. The Debian manpage site seems like a good fit for Notmuch. --- doc/conf.py | 5 +

[PATCH 0/5] doc: man page cleanup

2021-05-21 Thread Jani Nikula
I saw [1] and decided to give it some love. :) Mostly this is all about adding html cross-references all over the place while trying to keep the roff man pages roughly the same. Also updating the man page rst becomes easier by setting a clean example. BR, Jani. [1]

Re: [PATCH v3] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize()

2021-05-21 Thread Tomi Ollila
On Fri, May 21 2021, Felipe Contreras wrote: > On Thu, May 20, 2021 at 2:43 AM Tomi Ollila wrote: >> >> On Wed, May 19 2021, Felipe Contreras wrote: >> >> > On Wed, May 19, 2021 at 12:34 PM Tomi Ollila wrote: >> > >> >> Haha, as we do _libconfig_sanitize < OUTPUT > OUTPUT.clean >> >> reading

[PATCH] emacs: use new face for notmuch-jump and related

2021-05-21 Thread Protesilaos Stavrou
The minibuffer-prompt face that was used before made it impossible to differentiate between two distinct UI elements: (i) the prompt's text which itself cannot be acted upon, (ii) the actionable keys used to jump to searches/tags. The use of a named face, notmuch-jump-key, makes it possible for

[PATCH] emacs: update default mailing list archives for stashing links

2021-05-21 Thread Jani Nikula
Gmane web interface is long gone, remove it. Make MARC the new default. Update LKML to Lore, where it already redirects anyway. Also add Notmuch web archive. --- Note: I observed M-x customize-variable RET notmuch-show-stash-mlarchive-link-default RET does not take user customized

Re: [PATCH v3] test: replace notmuch_passwd_sanitize() with _libconfig_sanitize()

2021-05-21 Thread Felipe Contreras
On Thu, May 20, 2021 at 2:43 AM Tomi Ollila wrote: > > On Wed, May 19 2021, Felipe Contreras wrote: > > > On Wed, May 19, 2021 at 12:34 PM Tomi Ollila wrote: > > > >> Haha, as we do _libconfig_sanitize < OUTPUT > OUTPUT.clean > >> reading python script from stdin don't work (perl has __DATA__