Re: [PATCH v2 10/10] ruby: new notmuch_rb_object_destroy() helper

2021-05-12 Thread David Bremner
Felipe Contreras writes: > +static inline notmuch_status_t > +notmuch_rb_object_destroy (VALUE rb_object, const rb_data_type_t *type) > +{ > +void *nm_object; > +notmuch_status_t ret; > + > +Data_Get_Notmuch_Object (rb_object, type, nm_object); > + > +ret = ((notmuch_status_t

Re: [PATCH v2 08/10] ruby: move towards more modern RTypedData

2021-05-12 Thread David Bremner
Here I would also like a bit more back story in the commit message ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to notmuch-le...@notmuchmail.org

Re: [PATCH v2 04/10] ruby: simplify data get helper

2021-05-12 Thread David Bremner
Felipe Contreras writes: > The type is not actually needed. > > Signed-off-by: Felipe Contreras > --- > bindings/ruby/defs.h | 22 +++--- > 1 file changed, 11 insertions(+), 11 deletions(-) > > diff --git a/bindings/ruby/defs.h b/bindings/ruby/defs.h > index 46e2caf8..8fb47b4c

Re: [PATCH] test: change database from within pre-new hook

2021-05-12 Thread David Bremner
Michael J Gruber writes: > > I was wondering if it's worthwhile to test also: > - that the change from pre hook is persistent (test for that msg) I added this to the version of test that I just pushed. > - test the same for post (even though the db is closed before) > It wouldn't hurt, but I

Re: [PATCH] test: change database from within pre-new hook

2021-05-11 Thread David Bremner
Michael J Gruber writes: > Due to the change in the config system, notmuch keeps a notmuch database > open when it would not do so before. Consequently, it can miss changes > to the database which are done from a hook (while notmuch holds the > databse in read only mode). When notmuch itself

Re: Restore relative path handling for database.path

2021-05-10 Thread David Bremner
David Bremner writes: > Release 0.32 broke (at least) `notmuch new` if database.path has a > relative value. > > Although support for relative paths was undocumented, it was > introduced as an easier (to implement) alternative to ~ > expansion. Restore the pre-0.32 functionali

Re: Is there a reason why the trashed flag is not synced?

2021-05-10 Thread David Bremner
Felipe Contreras writes: > > It makes sense that by default synchronize_flags=true doesn't sync the > trash flag, but what's wrong with a new configuration > synchronize_flags=all that does? > That seems plausible to me, but I'd like more input in case I missed something. d

Re: Breakage after updating to 0.32 (database and path issues)

2021-05-10 Thread David Bremner
Jack Kamm writes: > Update: I was able to fix my problems by explicitly setting "database.path" > to "$HOME/mail" in my .notmuch-config. Then, notmuch was able to find my > emails in my "$HOME/mail" as well as my database at "$HOME/mail/.notmuch". > > Confusingly, if "database.path" wasn't

[PATCH] lib/open: restore default database path of $HOME/mail

2021-05-10 Thread David Bremner
Although this default worked for "notmuch config get", it didn't work most other places. Restore the previous functionality, with the wrinkle that XDG locations will shadow $HOME/mail if they exist. This fixes a bug reported by Jack Kamm in id:87eeefdc8b@gmail.com --- lib/open.cc

Re: Breakage after updating to 0.32 (database and path issues)

2021-05-09 Thread David Bremner
Jack Kamm writes: > Updating to 0.32 broke my notmuch setup. notmuch could no longer find my > database; after I changed some paths in my config, notmuch appeared to > be able to find the database again, but wound up rebuilding it anyways, > and could no longer find any of my emails. > > Any

Re: Is there a reason why the trashed flag is not synced?

2021-05-09 Thread David Bremner
Felipe Contreras writes: > I just noticed that a message I untagged in Gmail was not deleted nor > tagged as deleted locally. > > I understand deleting files is complex, but what's wrong with simply > tagging the T (trashed) messages as 'deleted'? > > I'm using synchronize_flags=true. > The

[PATCH] CLI/new: check status of notmuch_message_maildir_flags_to_tags

2021-05-08 Thread David Bremner
This improves error reporting since it prints the specifics of the exception. --- notmuch-new.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/notmuch-new.c b/notmuch-new.c index 1169184f..119aea20 100644 --- a/notmuch-new.c +++ b/notmuch-new.c @@ -404,8 +404,11 @@

[PATCH] perf-test/T00-new: fix backup creation.

2021-05-08 Thread David Bremner
"xargs tar cf backup.tar < $manifest" recreates the tar file with each "batch" execed by xargs. In general this results in only a fraction of the desired files being backed up. --- I'm not sure if this is worth including in the point release: both the risk and the benefit are relatively low since

[PATCH 1/3] test: add known broken tests for notuch-{before,after}-tag-hook

2021-05-08 Thread David Bremner
These tests illustrate the bug reported in id:87v97ytd2s@fastmail.fm --- test/T310-emacs.sh | 24 test/test-lib.el | 3 +++ 2 files changed, 27 insertions(+) diff --git a/test/T310-emacs.sh b/test/T310-emacs.sh index 78ac19a8..5ebc8e66 100755 ---

[PATCH 3/3] NEWS: add NEWS for notmuch-{before,after}-tag-hook fixes

2021-05-08 Thread David Bremner
--- NEWS | 9 + 1 file changed, 9 insertions(+) diff --git a/NEWS b/NEWS index 44a18951..a3e59da4 100644 --- a/NEWS +++ b/NEWS @@ -1,10 +1,19 @@ Notmuch 0.32.1 (UNRELEASED) === +General +--- + Restore handling of relative values for `database.path` that

Updated fix for notmuch-{before,after}-tag-hook

2021-05-08 Thread David Bremner
The gist is the same, I just added some tests and a minimal NEWS item, Jonas, I somehow failed at my last attempt to ask you about Kyle's patch, so here it is again. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email to

[PATCH 2/3] emacs: restore tag-changes and query bindings for tag hooks

2021-05-08 Thread David Bremner
From: Kyle Meyer notmuch-before-tag-hook and notmuch-after-tag-hook are supposed to have access to two dynamic variables, tag-changes and query, but these were lost with the switch to lexical binding in fc4cda07 (emacs: use lexical-bindings in all libraries, 2021-01-13). Add a variant of

[PATCH 8/9] doc: document database.backup_dir

2021-05-07 Thread David Bremner
Most users will not need to change this, but documenting it helps preserve the interface. --- doc/man1/notmuch-config.rst | 8 1 file changed, 8 insertions(+) diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst index 5cb6e203..a6cfeb41 100644 ---

[PATCH 4/9] lib/config: expand relative paths when reading from database

2021-05-07 Thread David Bremner
This makes the treatment of relative paths consistent between the database and config files. --- lib/config.cc| 8 +--- test/T050-new.sh | 1 - 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/config.cc b/lib/config.cc index e08c6bf7..74339694 100644 --- a/lib/config.cc

[PATCH 3/9] test: add known broken test for relative setting of mail_root

2021-05-07 Thread David Bremner
The behaviour should not change depending on where the configuration is stored. --- test/T050-new.sh | 13 + 1 file changed, 13 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index 33ad7f5a..f28497bf 100755 --- a/test/T050-new.sh +++ b/test/T050-new.sh @@ -406,6

[PATCH 5/9] test: test relative paths for database.hook_dir

2021-05-07 Thread David Bremner
--- test/T400-hooks.sh | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/T400-hooks.sh b/test/T400-hooks.sh index 3a2df2f4..00c99337 100755 --- a/test/T400-hooks.sh +++ b/test/T400-hooks.sh @@ -43,7 +43,7 @@ add_message # create maildir structure for notmuch-insert

[PATCH 6/9] test: test explicit configuration of backup directory

2021-05-07 Thread David Bremner
Including the relative path that was broken until a recent commit. --- test/T530-upgrade.sh | 19 +++ 1 file changed, 19 insertions(+) diff --git a/test/T530-upgrade.sh b/test/T530-upgrade.sh index cce29f45..5f0de2ed 100755 --- a/test/T530-upgrade.sh +++ b/test/T530-upgrade.sh @@

[PATCH 9/9] NEWS: start NEWS for 0.32.1

2021-05-07 Thread David Bremner
--- NEWS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS b/NEWS index 8cb9b345..44a18951 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,10 @@ +Notmuch 0.32.1 (UNRELEASED) +=== + +Restore handling of relative values for `database.path` that was +broken by 0.32.

[PATCH 2/9] lib/config: canonicalize paths relative to $HOME.

2021-05-07 Thread David Bremner
Prior to 0.32, notmuch had the (undocumented) behaviour that it expanded a relative value of database.path with respect to $HOME. In 0.32 this was special cased for database.path but broken for database.mail_root, which causes problems for at least notmuch-new when database.path is set to a

[PATCH 7/9] doc: document (tersely) the intended behaviour of relative paths.

2021-05-07 Thread David Bremner
--- doc/man1/notmuch-config.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/man1/notmuch-config.rst b/doc/man1/notmuch-config.rst index 32290a38..5cb6e203 100644 --- a/doc/man1/notmuch-config.rst +++ b/doc/man1/notmuch-config.rst @@ -44,7 +44,9 @@ configuration file

[PATCH 1/9] test: add known broken test for relative database path in new

2021-05-07 Thread David Bremner
This test highlights a bug introduced in 0.32. The new split between path and mail_root does not properly canonicalize relative paths in the latter. --- test/T050-new.sh | 13 + 1 file changed, 13 insertions(+) diff --git a/test/T050-new.sh b/test/T050-new.sh index 2985e24c..5faf6839

Restore relative path handling for database.path

2021-05-07 Thread David Bremner
Release 0.32 broke (at least) `notmuch new` if database.path has a relative value. Although support for relative paths was undocumented, it was introduced as an easier (to implement) alternative to ~ expansion. Restore the pre-0.32 functionality, and treat path config items introduced in 0.32

Re: [PATCH 7/9] test: ruby: use much more standard Ruby idioms

2021-05-05 Thread David Bremner
Tomi Ollila writes: > > I am convinced that this is good change (like all the other changes > in this series). > > Every now and then I encounter ruby code, and have seen syntax like > `@q.search_threads.each do |t|` been used, so more exposure to that > syntax is good thing (for everyone (IMO))

Re: [PATCH] emacs: restore tag-changes and query bindings for tag hooks

2021-05-05 Thread David Bremner
Kyle Meyer writes: > +;; `dlet' isn't available until Emacs 28.1. Below is a copy, with the > +;; addition of `with-no-warnings'. > +(defmacro notmuch-dlet (binders body) > + "Like `let*' but using dynamic scoping." > + (declare (indent 1) (debug let)) > + `(let (_) > +

Re: Possible threading issues in nm 0.32

2021-05-05 Thread David Bremner
Michael J Gruber writes: > After updating to notmuch 0.32 I noticed a few strange threadings that > went away after downgrading to 0.31.3 and reindexing. I can't pin-point > that yet but wanted to give an early warning so you can look out for > that, too. I'm not aware of any threading relevant

Re: [PATCH] cli: handle bash completion of all shared options

2021-05-02 Thread David Bremner
Tobias Backer Dirks writes: > A slight rework of base bash completion to handle all shared options. > This simplifies the handling of base commands and adds creature comforts > such as directory completion for --config, and removing trailing spaces > from options ending in an `=`. Also fixes a

Re: macOS globals.py issue

2021-05-02 Thread David Bremner
Dominyk Tiller writes: > Hi there, > > I believe there's potentially a bug in the handling of signposting the > notmuch dynamic library when installed in non-standard prefixes. For > example, Homebrew moved their standard prefix on macOS from /usr/local > to /opt/homebrew for machines running

notmuch release 0.32 now available

2021-05-02 Thread David Bremner
://notmuchmail.org/releases/notmuch-0.32.tar.xz.asc (signed by David Bremner) What's new in notmuch 0.32 = General --- This release includes a significant overhaul of the configuration management facilities for notmuch. The previous distinction between configuration items

Re: [PATCH 00/13] test: several fixes and improvements

2021-05-01 Thread David Bremner
Felipe Contreras writes: > The current tests fail on my machine due to my configuration, mainly because > I didn't have dtach > installed, but also other stuff. > > The following patches fix all the issues I found, and also do plenty of > cleanups. I have applied 1,2,4,5,6,7 to master. 10,

Re: Release process for 0.32

2021-04-28 Thread David Bremner
Michael J Gruber writes: > David Bremner venit, vidit, dixit 2021-04-28 12:35:53: >> David Bremner writes: >> >> > David Bremner writes: >> >> I have pushed 0.32~rc2 to >>- git (tag 0.32_rc2) >>- https://notmuchmail.org/releases/

Re: [PATCH] perf-test: add option to run perf

2021-04-28 Thread David Bremner
David Bremner writes: > Although the generation of perf data is not as slow as valgrind, it > seems simplest to re-use the machinery already there to save the logs > in a timestamped subdirectory. > --- applied a version updated with Tomi's suggestions and an extra option for sett

Re: Release process for 0.32

2021-04-28 Thread David Bremner
David Bremner writes: > David Bremner writes: I have pushed 0.32~rc2 to - git (tag 0.32_rc2) - https://notmuchmail.org/releases/ - debian experimental ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an em

Re: [PATCH 1/2] Vim: Respect excluded tags when showing a thread

2021-04-28 Thread David Bremner
Felipe Contreras writes: > On Tue, Apr 27, 2021 at 3:09 PM David Bremner wrote: >> >> Felipe Contreras writes: >> >> OK, let me know if I should revert the second patch. > > Yes please. > > -- > Felipe Contreras re

Re: [PATCH 1/2] NEWS: mention file deletion speedups

2021-04-28 Thread David Bremner
David Bremner writes: > It seems a bit silly to have two NEWS entries for one commit, but > there are two potiential audiences. Applied, along with one spelling fix. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

Re: [PATCH 2/2] NEWS: summarize changes to emacs interface.

2021-04-28 Thread David Bremner
Jonas Bernoulli writes: > David Bremner writes: > > I couldn't wait until tonight. ;) > Thanks, I have applied an updated version of this patch with your suggestions. ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe s

Re: Two perceived query language imbalances

2021-04-28 Thread David Bremner
Alexander Adolf writes: > Is there a "wish list" of sorts, and if so, could it perhaps seem > worthwhile adding this to the wish list? Yes, there is a list at https://nmbug.notmuchmail.org/status/#Wish-list Your message is now on that list. ___

Re: Two perceived query language imbalances

2021-04-28 Thread David Bremner
Michael J Gruber writes: > > In that case, I suggest that `notmuch search --output=messages` outputs > message ids in the form `mid:...`, as well. Users can discover > `--output=messages` from command completion and could learn the "right" > search prefix from the command output. > In fact

Re: [PATCH 1/2] Vim: Respect excluded tags when showing a thread

2021-04-27 Thread David Bremner
Felipe Contreras writes: > On Mon, Apr 26, 2021 at 6:39 PM David Bremner wrote: >> >> Felipe Contreras writes: >> > >> > I don't need to test it, the patch is obviously correct. >> > >> > Reviewed-by: Felipe Contreras >> >> F

Re: setting NOTMUCH_CONFIG in hooks

2021-04-27 Thread David Bremner
Uwe Kleine-König writes: > Hello, > > when I run > > notmuch --config=$HOME/.notmuch-config-work new > > NOTMUCH_CONFIG isn't set when the hooks are running. This would however > be quite useful such that e.g. afew uses the right database. Of course I > could do > >

[PATCH 2/2] NEWS: summarize changes to emacs interface.

2021-04-26 Thread David Bremner
This my attempt at a summary based on git log. --- NEWS | 18 ++ 1 file changed, 18 insertions(+) diff --git a/NEWS b/NEWS index 6a708d64..75a2a982 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,24 @@ specify that the database should be updated, rather than a config file. The speed

[PATCH 1/2] NEWS: mention file deletion speedups

2021-04-26 Thread David Bremner
It seems a bit silly to have two NEWS entries for one commit, but there are two potiential audiences. --- NEWS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/NEWS b/NEWS index a699b48e..6a708d64 100644 --- a/NEWS +++ b/NEWS @@ -30,6 +30,10 @@ constants have been added to the notmuch

Re: [PATCH 1/2] Vim: Respect excluded tags when showing a thread

2021-04-26 Thread David Bremner
Felipe Contreras writes: > > I don't need to test it, the patch is obviously correct. > > Reviewed-by: Felipe Contreras Famous last words ;). But OK, applied to master. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

Re: [PATCH] test: hide message from moreutils parallel.

2021-04-26 Thread David Bremner
David Bremner writes: > The argument --version confuses moreutils parallel, but this is OK, > because its confusing does not include printing "GNU" applied, d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

Re: [PATCH 01/13] vim: fix Mail 2.8.0 warning

2021-04-26 Thread David Bremner
Felipe Contreras writes: > Passing an unparsed header field to Mail::Field.new is deprecated and will > be removed in Mail 2.8.0. Use Mail::Field.parse instead. applied. d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an

[PATCH] test: hide message from moreutils parallel.

2021-04-26 Thread David Bremner
The argument --version confuses moreutils parallel, but this is OK, because its confusing does not include printing "GNU" --- This doesn't hide the message about citation from GNU parallel, but that's between you and the author of GNU parallel. test/notmuch-test | 2 +- 1 file changed, 1

[PATCH] perf-test: add option to run perf

2021-04-25 Thread David Bremner
Although the generation of perf data is not as slow as valgrind, it seems simplest to re-use the machinery already there to save the logs in a timestamped subdirectory. --- I'm not sure about the use of --call-graph=lbr here. On the one hand, the documentation mentions it depends on recent intel

Re: [PATCH] test: check for GNU parallel with --version options

2021-04-24 Thread David Bremner
Tobias Backer Dirks writes: > The lastest versions of GNU parallel no longer make mention of GNU > within their help output. This causes the test script to mistakenly use > the moreutils parallel execution. In order to fix this, while > maintaining compatibility with previous versions of GNU

[PATCH] test: add regression test for large number of deletions

2021-04-24 Thread David Bremner
Prior to 9ad19e4454f there was an unhandled Xapian exception when reindexing after a large number of deletes. This test was used for bisection, and will subsequently serve as a regression test. --- It turns out my original assessment of the situation was correct. Whatever the problem was, the

Re: [PATCH] perf-test: add test for reindexing after removal/renaming msgs

2021-04-24 Thread David Bremner
David Bremner writes: > At this point it is a bit tricky to measure the performance increase > from the new message deletion code, since the same commit (9ad19e4) > that improved the performance also seems to have fixed a bug with an > uncaught Xapian exception triggered by this tes

[PATCH] perf-test: add test for reindexing after removal/renaming msgs

2021-04-24 Thread David Bremner
At this point it is a bit tricky to measure the performance increase from the new message deletion code, since the same commit (9ad19e4) that improved the performance also seems to have fixed a bug with an uncaught Xapian exception triggered by this test. --- performance-test/T03-reindex.sh | 28

Re: Release process for 0.32

2021-04-24 Thread David Bremner
David Bremner writes: > Now that the config changes have landed, it is time to consider a > release. I have the following schedule in mind: > > April 24: Feature Freeze. > > May 1: Release. > I have pushed 0.32~rc1 [0] to - git (tag 0.32_rc1) - ht

Re: Regex negative lookahead failed

2021-04-24 Thread David Bremner
Michael J Gruber writes: > But, assertions are really for the case where you want to base a match > result (true/false) on parts of the expression that you do not want to > be part of the match itself. As far as I understand, matching in xapian > is solely about the true/false result, so I'm

Re: [PATCH v4] compat: rename {,notmuch_}canonicalize_file_name

2021-04-24 Thread David Bremner
Đoàn Trần Công Danh writes: > > Let's move our implementation into a util library. > > Helped-by: Tomi Ollila > Signed-off-by: Đoàn Trần Công Danh I have applied this version to master. It looks a bit odd to have SPDX-License-Identifiers in just these two files, but I guess it is harmless. I

Re: Regex negative lookahead failed

2021-04-24 Thread David Bremner
Erwan Hingant writes: > Hello, > >  I have some troubles with regex negative lookahead. When searching > in > all directories but one (say inbox), I do the following query: > > > notmuch search folder:"/^(?!inbox)/" > As far as I know, lookaheads are not supported by POSIX regex, which is

nmbug update

2021-04-23 Thread David Bremner
I have updated nmbug [1] to link to nmweb [2] instead of mail-archive.com (that latter seemed not to work at all for me) Originally we were hesitant to rely too much on nmweb as it was (and is) experimental code. At the moment it seems like the best option. Currently nmweb is not a good source

Re: [PATCH] compat: expose canonicalize_file_name to C++

2021-04-23 Thread David Bremner
Đoàn Trần Công Danh writes: > > Yes, inline function are always better than macro. > I feel embarassed that I couldn't think about that earlier. > > Here is a revised patch: This version still has some issues on a glibc system. , | In file included from notmuch-client.h:31, |

Re: [PATCH 1/2] Vim: Respect excluded tags when showing a thread

2021-04-23 Thread David Bremner
Jules Aguillon writes: > Other queries have exclude_tags taken into account but this one. > This is annoying when using an excluded tag to ignore past messages from a > thread (for example the 'deleted' tag), the entire thread is shown all the Hi; The two of you are the most recent submitters

Re: Two perceived query language imbalances

2021-04-23 Thread David Bremner
Alexander Adolf writes: > > Any technical reason for "from" having a regex search, but "to" not? Yes, it is purely technical. The regex support relies on the existence of a Xapian value slot for the field in question. It isn't clear what the time / space impact of adding another value slot

Re: [PATCH 00/13] vim: a bunch of updates from upstream

2021-04-19 Thread David Bremner
Felipe Contreras writes: > > Then I think we could consider removing the vim stuff from notmuch. In > the meantime I think the three code-bases serve a purpose. > Thanks for the detailed explanation. Your reasoning makes sense to me. Now if only we could get more than one person at a time

Re: [PATCH 00/13] vim: a bunch of updates from upstream

2021-04-19 Thread David Bremner
Felipe Contreras writes: > I finally took some time to update notmuch-vim and include some fixes, > as well as pull requests. > > Here are the transplanted patches. > So, big picture question. If notmuch is not upstream for this code, should we be distributing it? d

Re: [PATCH] ruby: fix ruby 3.1 warnings

2021-04-19 Thread David Bremner
Felipe Contreras writes: > Hello. > > On Sat, Apr 17, 2021 at 7:20 AM David Bremner wrote: > >> Thanks for the patch. I have a couple of questions / comments >> >> - It doesn't apply against current master (5248f55d5f1). Can you rebase >> it? > &g

Re: [PATCH] lib/n_d_index_file: check return value from _n_m_add_filename

2021-04-18 Thread David Bremner
David Bremner writes: > Ignoring this return value seems like a bad idea in general, and in > particular it has been hiding one or more bugs related to handling > long directory names. > --- > > This is not a fix for the aforementioned bugs, but it at least makes > clea

Re: [PATCH] test-lib: unset XDG_CONFIG_HOME

2021-04-18 Thread David Bremner
Đoàn Trần Công Danh writes: > lib/open.cc:_load_key_file will only open xdg-config files in > $XDG_CONFIG_HOME if it's defined, $HOME/.config will be considered if > and only if XDG_CONFIG_HOME not defined. > > Let's unset said variable before running the test. applied to master. d

Re: v1 deletion patches

2021-04-18 Thread David Bremner
David Bremner writes: > This version has a better commit message for 2/2 and portability fixes > (thanks to Tomi) for 1/2. > > It obsoletes the WIP version [1] > > [1]: id:20210414021627.1236560-1-da...@tethera.net Applied to master. d _

Re: [PATCH] compat: expose canonicalize_file_name to C++

2021-04-18 Thread David Bremner
Đoàn Trần Công Danh writes: > > Anyway, I see some failure in the testsuite due to: > - *My* hostname(1) (from coreutils) doesn't understand "-f" ah, any suggestions for a portable replacement? I guess some perl one liner might work. > - All emacs tests depend on dtach(1) but the >

Re: [PATCH] compat: expose canonicalize_file_name to C++

2021-04-17 Thread David Bremner
Đoàn Trần Công Danh writes: > > However, I see that lib/open.cc uses g_key_file_get_value from GLib > already, we may switch to g_canonicalize_file_name then? > Yes that could work. I think the treatment of NULL input might need some extra care with g_canonicalize_file_name; at least my 5

Re: [PATCH] ruby: fix ruby 3.1 warnings

2021-04-17 Thread David Bremner
Felipe Contreras writes: > init.c:214:5: warning: ‘rb_cData’ is deprecated: by: rb_cObject. Will be > removed in 3.1. [-Wdeprecated-declarations] > > Signed-off-by: Felipe Contreras Hi Felipe; Thanks for the patch. I have a couple of questions / comments - It doesn't apply against

Re: [PATCH] compat: expose canonicalize_file_name to C++

2021-04-17 Thread David Bremner
Đoàn Trần Công Danh writes: > When compat canonicalize_file_name was introduced, it was limited to > C code only because it was used by C code only during that time. > > From 5ec6fd4d, (lib/open: check for split configuration when creating > database., 2021-02-16), lib/open.cc, which is C++,

Re: [PATCH] test: put shim at end of LD_PRELOAD path

2021-04-16 Thread David Bremner
David Bremner writes: > Certain tools like the address-sanitizer fail if they are not the > first LD_PRELOADed library. It does not seem to matter for our shims, > as long as they are loaded before libnotmuch. For what it's worth, I've applied this change to m

Re: [PATCH v2 0/2] scaffolding for autocrypt support

2021-04-16 Thread David Bremner
Daniel Kahn Gillmor writes: > Hi David, all-- > > On Sun 2021-02-21 15:21:30 +, David Edmondson wrote: >> I started looking at how to add autocrypt support based on >> https://git.sr.ht/~zge/autocrypt. > > Thanks for this work, i'm glad to see the interest in autocrypt! > > I tend to think

Re: [PATCH] NEWS: user visible config related changes for 0.32

2021-04-16 Thread David Bremner
David Bremner writes: > --- > NEWS | 41 + > 1 file changed, 41 insertions(+) > applied to master d ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send an email t

[PATCH 2/2] lib: directly traverse postlists in _n_message_delete

2021-04-16 Thread David Bremner
This is intended to fix the slow behaviour of "notmuch new" (and possibly "notmuch reindex") when large numbers of files are deleted. The underlying issue [1] seems to be the Xapian glass backend spending a large amount of time in db.has_positions when running queries with large-ish amounts of

[PATCH 1/2] perf-tests: add test for removing files.

2021-04-16 Thread David Bremner
Without the proposed fix for deletion performance [1], this test is probably unreasonably slow compared to others at the same small/medium/large scale. [1]: id:20210414021627.1236560-3-da...@tethera.net --- performance-test/T00-new.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git

v1 deletion patches

2021-04-16 Thread David Bremner
This version has a better commit message for 2/2 and portability fixes (thanks to Tomi) for 1/2. It obsoletes the WIP version [1] [1]: id:20210414021627.1236560-1-da...@tethera.net ___ notmuch mailing list -- notmuch@notmuchmail.org To unsubscribe send

Deletion speed improvements for notmuch-new

2021-04-13 Thread David Bremner
These are a bit rough around the edges, but I wanted to see if we could get them into shape for the 0.32 release, since the performance improvement for me is pretty drastic. I would appreciate testing, since I think the performance test may be kindof best case in avoiding long threads. [PATCH

[PATCH 1/2] WIP: add performance test for removing files.

2021-04-13 Thread David Bremner
No doubt this is non-portable use of tar. --- performance-test/T00-new.sh | 10 ++ 1 file changed, 10 insertions(+) diff --git a/performance-test/T00-new.sh b/performance-test/T00-new.sh index a14dd13f..1eeac6d0 100755 --- a/performance-test/T00-new.sh +++ b/performance-test/T00-new.sh

[PATCH 2/2] WIP: replace use of queries in n_m_delete with postlist access

2021-04-13 Thread David Bremner
This improves performance because it removes some interleaving of queries and deletions, which is causing a lot of time to be spenting checking for position information in the glass backend --- lib/message.cc | 68 +- 1 file changed, 39

Re: v2 convert remaining CLI to new configuration

2021-04-10 Thread David Bremner
David Bremner writes: > This obsoletes [1] and [2]. > > I've been using it for a month, I think it's probably ready to > apply to master. Since the last posted version the only difference (other than > incorporating [2]) is that I changed the call to access to test the > config

[PATCH 06/28] lib/config: add notmuch_config_get_values_string

2021-04-06 Thread David Bremner
This is to support the less common (at least in the notmuch codebase) case of accessing a ;-delimited list config value with an arbitrary string key. --- lib/config.cc | 14 ++ lib/notmuch.h | 17 - test/T590-libconfig.sh | 23 +++

[PATCH 01/28] lib/open: fix leaks calling _trial_open

2021-04-06 Thread David Bremner
_trial_open can't know if the PATH_ERROR return value will cause the error message to be returned from the library, so it's up the caller to clean up if not. --- lib/open.cc | 6 ++ 1 file changed, 6 insertions(+) diff --git a/lib/open.cc b/lib/open.cc index 8f572b0b..dc191d64 100644 ---

[PATCH 11/28] CLI: load merged config at top level

2021-04-06 Thread David Bremner
This paves the way for the conversion of the remaining subcommands to the new configuration framework. --- notmuch-client.h | 1 + notmuch.c| 29 ++--- 2 files changed, 27 insertions(+), 3 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index

[PATCH 07/28] lib/config: add config_pairs iterators

2021-04-06 Thread David Bremner
The layer of shims here seems a bit wasteful compared to just calling the corresponding string map functions directly, but it allows control over the API (calling with notmuch_database_t *) and flexibility for future changes. --- lib/config.cc | 45 +

[PATCH 15/28] CLI/config: switch "notmuch config list" to merged config

2021-04-06 Thread David Bremner
Use the database opened at the top level rather than opening another notmuch_database_t. Test output changes because keys are now listed in alphabetical order, and because a missing database is no longer an error. --- notmuch-config.c| 69 -

[PATCH 17/28] CLI/config: use notmuch_database_reopen

2021-04-06 Thread David Bremner
This allows `notmuch config` to use the common configuration information carried by the notmuch_database_t opened at the top level. --- notmuch-config.c | 17 - test/T750-user-header.sh | 3 ++- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git

[PATCH 19/28] CLI/config: drop obsolete notmuch_config_get_*

2021-04-06 Thread David Bremner
These are no longer used, replaced by notmuch_config_get. --- notmuch-client.h | 29 notmuch-config.c | 121 --- 2 files changed, 150 deletions(-) diff --git a/notmuch-client.h b/notmuch-client.h index 7911c20c..a1d8dfe9 100644 ---

[PATCH 16/28] CLI/config: migrate notmuch_config_open to new config

2021-04-06 Thread David Bremner
notmuch_config_open will be preserved in the medium term for use by the commands that are manipulating the config file directly (config and setup) --- lib/config.cc | 5 +- notmuch-client.h | 2 +- notmuch-config.c

[PATCH 20/28] CLI/config: drop cached data from notmuch_config_t

2021-04-06 Thread David Bremner
The idea is to preserve notmuch_config_t as a thin wrapper for GKeyFile. --- notmuch-config.c | 48 +--- 1 file changed, 9 insertions(+), 39 deletions(-) diff --git a/notmuch-config.c b/notmuch-config.c index c13f0ecf..24c16833 100644 ---

[PATCH 13/28] test/setup: check file output instead of notmuch config list

2021-04-06 Thread David Bremner
This allows verification of comments added to new / updated config file. --- test/T040-setup.sh| 17 +--- .../config-with-comments | 88 +++ 2 files changed, 91 insertions(+), 14 deletions(-) create mode 100644

[PATCH 23/28] CLI+lib: detect missing database in split configurations.

2021-04-06 Thread David Bremner
Eventually we want to do all opening of databases in the top level (main function). This means that detection of missing databases needs to move out of subcommands. It also requires updating the library to use the new NO_DATABASE status code. --- lib/open.cc | 24 +---

[PATCH 14/28] CLI/setup: switch to new configuration framework

2021-04-06 Thread David Bremner
Most of the changes are the elimination of notmuch_config_t accessor use. We also migrate some of the diagnostics to the top level where we are opening the files in question. --- notmuch-setup.c | 51 +++-- notmuch.c | 21 2

[PATCH 26/28] CLI/config: remove calls to notmuch_config_open from top level

2021-04-06 Thread David Bremner
This will allow simplifying the subcommand interface. Change the internal API to notmuch_config_open to not tie it to the implementation of subcommands in notmuch.c. It also fixes a previously broken test, since notmuch_config_open does not understand the notion of the empty string as a config

[PATCH 09/28] lib/config: set default for primary user email

2021-04-06 Thread David Bremner
This is mainly copying code from the CLI into the lib. The CLI copy will be deleted in a later commit. --- lib/config.cc | 70 +++--- test/T590-libconfig.sh | 7 ++--- test/test-lib.sh | 6 +++- 3 files changed, 73 insertions(+), 10

[PATCH 05/28] lib: provide notmuch_database_load_config

2021-04-06 Thread David Bremner
This is mainly targetted at notmuch-config.c, or similar applications that don't necessarily need both a configuration file and a database to exist. --- lib/notmuch.h | 27 ++ lib/open.cc| 96 ++ test/T590-libconfig.sh | 182

[PATCH 02/28] lib: add missing status strings

2021-04-06 Thread David Bremner
--- lib/database.cc | 8 1 file changed, 8 insertions(+) diff --git a/lib/database.cc b/lib/database.cc index 9743c1ca..d2ccdd58 100644 --- a/lib/database.cc +++ b/lib/database.cc @@ -293,12 +293,20 @@ notmuch_status_to_string (notmuch_status_t status) return "Operation requires

[PATCH 21/28] CLI/config: default to storing all config in external files

2021-04-06 Thread David Bremner
Previously the fact that some configuration options were only stored in the database (and thus editing the config file had no effect) was a source of user confusion. This was fixed with the series ending at d9af0af1646. On the other hand, the underlying partition of config options into those

  1   2   3   4   5   6   7   8   9   10   >