| Age | Commit message (Collapse) | Author |
|
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.
|
|
These tests illustrate the bug reported in id:87v97ytd2s.fsf@fastmail.fm
|
|
This file should have been created in commit 5a8d174f, but wasn't.
|
|
Let the compiler enforce the immutability.
|
|
This is both a bit clearer and avoids the possibility of modification.
|
|
Let the compiler help us catch bugs.
|
|
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.
|
|
This table is intended to be immutable
|
|
Work towards the goal of concurrent access to different Xapian
databases from the same process.
|
|
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.
|
|
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>
|
|
There's no need to repeat the same code over and over.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
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>
|
|
|
|
|
|
In some uses of reopen, new documents and threads maybe have been
added, and e.g. compaction may have changed the uuid.
|
|
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
|
|
|
|
|
|
Most users will not need to change this, but documenting it helps
preserve the interface.
|
|
|
|
Including the relative path that was broken until a recent commit.
|
|
|
|
This makes the treatment of relative paths consistent between the
database and config files.
|
|
The behaviour should not change depending on where the configuration
is stored.
|
|
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.
|
|
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.
|
|
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
Local variables are perfectly fine.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
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>
|
|
There's no need to complicate the script passing the MAIL_DIR
environment variable.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
There's no point in repeating the same initialization in all the tests.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
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>
|
|
notmuch 0.32 release
|
|
|
|
|
|
|
|
The tests fail otherwise.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
Otherwise the output from the tests would be different.
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
|
|
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>
|
|
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.
|
|
notmuch 0.32~rc2 release
|
|
|
|
|