aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-05-15emacs: restore tag-changes and query bindings for tag hooksKyle 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 Emacs's dlet (not available until Emacs 28) and use it in notmuch-tag to expose tag-changes and query to the hooks.
2021-05-15test: add known broken tests for notuch-{before,after}-tag-hookDavid Bremner
These tests illustrate the bug reported in id:87v97ytd2s.fsf@fastmail.fm
2021-05-15CLI: add missing file notmuch-client-initDavid Bremner
This file should have been created in commit 5a8d174f, but wasn't.
2021-05-14CLI/notmuch: make immutable tables constDavid Bremner
Let the compiler enforce the immutability.
2021-05-14CLI: make static message strings constDavid Bremner
This is both a bit clearer and avoids the possibility of modification.
2021-05-14CLI/config: make immutable tables constDavid Bremner
Let the compiler help us catch bugs.
2021-05-14CLI: centralize initialization in notmuch_client_initDavid Bremner
Initially make sure gmime_filter_reply initialization is thread-safe (assuming notmuch_client_init is only called once). For tidyness, also put talloc initialization in the new function.
2021-05-14lib/message: mark flag2tag as constDavid Bremner
This table is intended to be immutable
2021-05-14lib/generate_thread_id: move static buffer to notmuch_database_tDavid Bremner
Work towards the goal of concurrent access to different Xapian databases from the same process.
2021-05-13lib: make glib initialization thread-safeDavid Bremner
In principle this could be done without depending on C++11 features, but these features should be available since gcc 4.8.1, and this localized usage is easy to replace if it turns out to be problematic for portability.
2021-05-12ruby: improve general data get helperFelipe Contreras
There's no need to do Check_Type, Data_Get_Struct calls rb_data_object_get(), which already does that. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-12ruby: improve all Data_Get_Notmuch_* helpersFelipe Contreras
There's no need to repeat the same code over and over. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-12ruby: add missing Data_Get_Notmuch helpersFelipe Contreras
Apparently commit 5c9e3855 (ruby: Don't barf if an object is destroyed more than once, 2010-05-26) missed these two. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-12Merge branch 'release'David Bremner
2021-05-12NEWS: add note about fix to notmuch_database_reopenDavid Bremner
2021-05-12lib/notmuch_database_reopen: reload some database metadataDavid Bremner
In some uses of reopen, new documents and threads maybe have been added, and e.g. compaction may have changed the uuid.
2021-05-12test: change database from within pre-new hookMichael J Gruber
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 writes to the database after that it uses wrong assumptions about the last used doc id etc. Demonstrate this by triggering an assertion. (This new test succeeds with notmuch 0.31.4.) Signed-off-by: Michael J Gruber <git@grubix.eu> Amended-by: db. Check for both messages
2021-05-10Merge branch 'release'David Bremner
2021-05-10NEWS: start NEWS for 0.32.1David Bremner
2021-05-10doc: document database.backup_dirDavid Bremner
Most users will not need to change this, but documenting it helps preserve the interface.
2021-05-10doc: document (tersely) the intended behaviour of relative paths.David Bremner
2021-05-10test: test explicit configuration of backup directoryDavid Bremner
Including the relative path that was broken until a recent commit.
2021-05-10test: test relative paths for database.hook_dirDavid Bremner
2021-05-10lib/config: expand relative paths when reading from databaseDavid Bremner
This makes the treatment of relative paths consistent between the database and config files.
2021-05-10test: add known broken test for relative setting of mail_rootDavid Bremner
The behaviour should not change depending on where the configuration is stored.
2021-05-10lib/config: canonicalize paths relative to $HOME.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 relative path. The change in T030-config.sh reflects a user visible, but hopefully harmless behaviour change; the expanded form of the paths will now be printed by notmuch config.
2021-05-10test: add known broken test for relative database path in newDavid 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.
2021-05-05test: ruby: simplify output comparisonFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-05test: ruby: don't use instance variablesFelipe Contreras
Local variables are perfectly fine. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-05test: ruby: use much more standard Ruby idiomsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: use much more standard putsFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: simplify test_ruby()Felipe Contreras
We always do test_expect_equal_file, so do it in test_ruby() directly. The only subtest where we don't (get non-existent file) can be easily modified. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: simplify MAIL_DIR initializationFelipe Contreras
There's no need to complicate the script passing the MAIL_DIR environment variable. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: simplify MAIL_DIR checkFelipe Contreras
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: ruby: refactor test_ruby()Felipe Contreras
There's no point in repeating the same initialization in all the tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02test: move test_ruby() inside the only clientFelipe Contreras
Not much point in polluting the main library, and also will be useful to modify it in tandem with the tests. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-02Merge tag '0.32'David Bremner
notmuch 0.32 release
2021-05-02debian: add changelog for 0.32-1debian/0.32-1archive/debian/0.32-10.32David Bremner
2021-05-02NEWS: set date for 0.32 releaseDavid Bremner
2021-05-02version: bump to 0.32David Bremner
2021-05-01test: add external prereqs to many emacs testsFelipe Contreras
The tests fail otherwise. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-01test: add prereqs check in test_emacs_expect_tFelipe Contreras
test_emacs may update the external prereqs, in which case we want to skip the test rather than fail. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-01test: fix wrong SKIP messagesFelipe Contreras
When the external prereqs are updated inside the body of the command (e.g. test_emacs) the message in test_report_skip_ is wrong: it outputs the body of the command instead of the subtest name. We need to pass the same argument we pass to test_skip. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-01test: use correct fqdn in passwd_sanitize()Felipe Contreras
My fqdn is 'natae.localdomain', however, socket.getfqdn() returns 'localhost'. To fetch the true fqdn we need socket.getaddrinfo(). For more information see: https://stackoverflow.com/a/11580042/10474 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-01test: unset NAME environment variableFelipe Contreras
Otherwise the output from the tests would be different. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-05-01test: fix passwd_sanitize()Felipe Contreras
If any of the variables is empty the output is completely messed up, because replace("", "FOO") puts "FOO" before every single character. I don't have my full name configured, and this is what I get: USER_FULL_NAME=USER_FULL_NAME=USER_FULL_NAME USER_FULL_NAMEsUSER_FULL_NAMEtUSER_FULL_NAMEdUSER_FULL_NAMEoUSER_FULL_NAMEuUSER_FULL_NAMEtUSER_FULL_NAME USER_FULL_NAME=USER_FULL_NAME=USER_FULL_NAME Let's check for empty strings before doing any replace. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2021-04-28perf-test: add option to run perfDavid 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.
2021-04-28Merge tag '0.32_rc2'David Bremner
notmuch 0.32~rc2 release
2021-04-28debian: add changelog for 0.32~rc2-1debian/0.32_rc2-1archive/debian/0.32_rc2-10.32_rc2David Bremner
2021-04-28version: bump to 0.32~rc2David Bremner