| Age | Commit message (Collapse) | Author |
|
This new command allows the user to interactively choose a different
duplicate (file) to display for a given message in
notmuch-show-mode. Since both tree and unthreaded view use
notmuch-show-mode, this provides the same facility there.
|
|
This introduces a new mandatory key for message structures, namely
"duplicate". Per convention in devel/schemata this does _not_ increase
the format version. This means that clients are responsible for
checking that it exists, and not crashing if it does not.
The main functional change is teaching mime_node_open to understand a
'duplicate' argument.
Support for --duplicate in notmuch-reply would make sense, but we
defer it to a later commit.
|
|
Add command line argument --duplicate, analogous with that already
supported for notmuch-search.
Use of a seperate function for _get_filename is mainly a form of
documentation at this point.
md5sum is of course a weak hash, but it is good enough for
this (non-adversarial) test suite use.
|
|
Analogous to notmuch-show-depth-limit, it requires a bit more
calculation, but that cost seems dominated by the rendering cost.
|
|
This parameter was originally introduced to hide large attachements
that happened to be text/plain. From a performance point of view,
there is no reason not to also hide large message bodies.
|
|
This leverages the machinery already there to insert buttons for
attachments.
A potential use-case is browsing the top layers of the tree to decide
which of the lower subtrees to read.
|
|
This is primarily intended to support testing upward compatibility
with legacy repos.
|
|
The original nmbug format (now called version 0) creates 1
subdirectory of 'tags/' per message. This causes problems for more
than (roughly) 100k messages.
Version 1 introduces 2 layers of hashed directories. This scheme was
chose to balance the number of subdirectories with the number of extra
directories (and git objects) created via hashing.
This should be upward compatible in the sense that old repositories
will continue to work with the updated notmuch-git.
|
|
In split configurations there is no special significance to a top
level directory called .notmuch in the mail root. Users should
therefore be able to have mail stored underneath it.
|
|
This corpus will be used to test a new --duplicate option for notmuch-show
|
|
These are based on the equivalent functions for json. Like those,
these are pretty simple-minded, and don't really understand the
syntax.
|
|
This makes the tests more robust against changing output formats, by
allowing us to centralize fixes in the sanitization function. It is
not appropriate for all cases, in particular it is unneeded when using
test_json_nodes, and unhelpful when testing filenames.
|
|
Fix the bug reported at [1].
The parameter expansion for regex and wildcard modifiers has to be
done a bit differently, because their arguments are not s-expressions
defining complete Xapian queries.
[1]: id:87o7yxqxy6.fsf@code.pm
|
|
These tests replicate the problem reported by Eric Colson [1] (for the
regex case).
[1]: id:87o7yxqxy6.fsf@code.pm
|
|
It can be tedious to use "" inside of a string, e.g. in a shell script.
|
|
Support this syntax for constincy with (data from to) ranges.
|
|
The date range parsing machinery already knows how to do something
appropriate with an empty string, but the lastmod parsing blindly
tries to parse each atom as a number.
|
|
The database needs to be writable because the list of stored file
names will change in general.
|
|
In order for a database to actually be writeable, it must be the case that it
is open, not just the correct type of Xapian object. By explicitely
checking, we are able to provide better error reporting, in particular
for the previously broken test in T566-lib-message.
|
|
Make the behaviour when passed NULL consistent with
notmuch_filenames_valid. The library already passes the result of
notmuch_message_get_tags without checking for NULL, so it should be
handled.
|
|
This should return false, but currently segfaults.
Start a new file for tags library API related tests. This is maybe
overkill, but new C boilerplate which doesn't corrupt the database is
needed anyway.
|
|
The closed database case should fail gracefully, but currently it
segfaults.
|
|
Use a closed database to force throwing a Xapian exception. Leave the
check vague to accomodate a potential explicit check for open database.
|
|
Unfortunately we can't differentiate between the two distinct error
conditions for Document::remove_term.
|
|
Some code movement is needed to make sure the cache is only
invalidated when the Xapian operation succeeds.
|
|
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.
|
|
This addresses a bug report / feature request of Uwe Kleine-König. The
assumption is that we always load a config file in the CLI (i.e. we
never pass "" as the config file argument to
notmuch_database_open_with_config).
[1]: id:8baa58c3-7ab9-ec03-1bbd-28aa5be838f2@kleine-koenig.org
|
|
Setting this according to --config was requested by Uwe
Kleine-König. There are some other ways that the configuration file
might be found in current notmuch, so check those as well.
As a bonus, fix a bug in the hook tests that left NOTMUCH_CONFIG set
even though a config file was provided via NOTMUCH_PROFILE.
[1]: id:8baa58c3-7ab9-ec03-1bbd-28aa5be838f2@kleine-koenig.org
|
|
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.
|
|
This is probably more convenient than always passing a command line
argument.
Use notmuch-config for consistency with other notmuch CLI tools.
Now that there is something relevant in the config files, test the
--config option.
|
|
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.
|
|
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 HEAD" is also 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.
|
|
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.
|
|
There is current insufficient sanitization and/or escaping of tag names
internally in notmuch-git.
|
|
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.
|
|
Exercise the main functionality of notmuch-git. add_git_repos() will
hopefully be simplifed when an init subcommand is added.
|
|
notmuch-mua functions for replies now use the built-in customizable
variable message-dont-reply-to-names with the same semantics as
message-mode.
|
|
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.
This commit changes notmuch-search-show-thread too since the return
value of notmuch-show-next-thread depends on notmuch-search-show-thread.
Amended by db: fix whitespace in T450-emacs-show
|
|
This makes `notmuch --config foo external-subcommand` work
consistently with the built in subcommands.
|
|
The main goal is to test the setting of NOTMUCH_CONFIG, but also
include a basic sanity test for execing scripts.
|
|
Like notmuch_database_open, we need to conditionally print the error
message.
|
|
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.
|
|
We need to do it some day, and it is a bit annoying to read
deprecation messages in broken tests.
|
|
The actual content type of `application/octet-stream` is up to content
type detection of the reader, and thus may not be stable across
implementations or versions. This showed up when
fd46fc19 ("emacs: document/defcustom notmuch-multipart/alternative-discouraged", 2022-05-14)
introduced a test for omitting a part of type `text/html` because it
expected a part of type `application/octet-stream` to remain in place,
i.e. a part of "unstable type". In particular, tests with `fd46fc19`
would succeed on RHEL/EPEL but fail on all current Fedoras with
```
FAIL multipart/alternative hides html by default
--- T450-emacs-show.16.notmuch-show-multipart-alternative 2022-05-26 15:34:42.100557244 +0000
+++ T450-emacs-show.16.OUTPUT 2022-05-26 15:34:42.102557207 +0000
@@ -24,7 +24,7 @@
uses 64 as the
buffer size.
[ text/html (hidden) ]
-[ 0001-Deal-with-situation-where-sysconf-_SC_GETPW_R_SIZE_M.patch: application/octet-stream (as text/x-diff) ]
+[ 0001-Deal-with-situation-where-sysconf-_SC_GETPW_R_SIZE_M.patch: application/octet-stream (as text/x-patch) ]
From e3bc4bbd7b9d0d086816ab5f8f2d6ffea1dd3ea4 Mon Sep 17 00:00:00 2001
From: Alexander Botero-Lowry <alex.boterolowry@gmail.com>
Date: Tue, 17 Nov 2009 11:30:39 -0800
```
due to the different type detected.
Fix this by giving that message a specicific type of `text/x-diff` in
the test corpus, and adjust all affected test outputs.
Signed-off-by: Michael J Gruber <git@grubix.eu>
Amended-by: db, fix some trailing whitespace
|
|
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 use here because it mangles the example
lisp code, and the link to the info node should not be in e.g. the
html page.
Add a simple test to make sure the switch from defvar to defcustom did
not break something obvious.
|
|
Apply the previously factored-out function used by notmuch-show.
|
|
The same mitigation already applied for show should also be applied
for reply
|
|
These should continue to display as buttons by default, even as we
update the handling for reply.
|
|
Initially these are to test the emacs frontend.
|
|
This is analogous to the "infix" prefix provided by the s-expression
based query parser.
|