Commit graph

7440 commits

Author SHA1 Message Date
David Bremner
32f24b97d0 bindings/python-cffi: clean up _notmuch_config.py
_notmuch_config.py is generated by configure, and cannot be cleaned up
by the current python build system, since it is imported as a module
by that same build system.

Use DISTCLEAN rather than CLEAN for consistency with other configure
related things.
2023-09-12 07:37:32 -03:00
David Bremner
db8bf6f7ad debian: changelog for 0.38-1 2023-09-11 20:19:25 -03:00
David Bremner
139ea43f3d version: bump to 0.38 2023-09-11 19:56:21 -03:00
David Bremner
8dc8cedb3b NEWS: NEWS for 0.38 2023-09-09 19:49:36 -03:00
David Bremner
2c81de8f5f debian: changelog for 0.38~rc2-1 2023-09-03 09:11:53 -03:00
David Bremner
ed5b8f65fc version: bump to 0.31~rc2 2023-09-03 09:09:22 -03:00
Michael J Gruber
a84dc2f7e6 compat: probe for strcasestr more thoroughly
Depending on compiler (gcc, g++, clang) and standard options (c99, c11),
string.h may or may not include strings.h, leading to possibly missing
or conflicting declarations of strcasestr.

Include both so that both detection and compilation phases use the same
(possibly optimised) implementations.

Suggested-by: Thomas Schneider <qsx@chaotikum.eu>
Suggested-by: Florian Weimer <fweimer@redhat.com>
Suggested-by: Tomi Ollila <tomi.ollila@iki.fi>
2023-08-27 19:39:23 -03:00
David Bremner
9a1126241d debian: changelog for 0.38~rc1-1 2023-08-26 08:31:49 -03:00
David Bremner
240e9fff90 version: bump to 0.38~rc1 2023-08-26 08:29:45 -03:00
David Bremner
90c6182825 debian: skip T810-tsan on ppc64el
Hopefully just a temporary measure.
2023-08-26 08:28:33 -03:00
David Bremner
25c933d7e6 debian: use architecture.mk
I plan to add further architecture dependent checks, which makes this
preferable to directly calling dpkg-architecture.
2023-08-26 08:22:33 -03:00
David Bremner
115d4d69eb test: minimize impact of native compilation.
Native compilation is kindof useless in the test suite because we
throw away the cache after every subtest.  The test suite could in
principle share an eln cache within a given test file; for now try to
minimize the amount of native-compilation. There is an intermittent
bug where emacs loses track of its default-directory; I suspect (but
have no proof) that bug is related to native compilation and/or race
conditions. This patch seems to prevent that bug (or at least reduce
its frequency).
2023-08-26 07:45:36 -03:00
David Bremner
8c8fda965f debian: set suite to experimental 2023-08-24 10:56:33 -03:00
David Bremner
5ed121bed9 doc: update copyright date 2023-08-24 08:03:46 -03:00
David Bremner
695f663f81 debian: changelog for 0.38~rc0-1 2023-08-24 08:00:55 -03:00
David Bremner
aa5674fce0 NEWS: start NEWS for 0.38 2023-08-24 07:58:51 -03:00
David Bremner
2f874fb2cc version: set up 0.38~rc0 2023-08-24 07:58:19 -03:00
David Bremner
368e0f61d5 test/setup: ignore blank lines in generated config
The presense of the blank lines between sections depends on the
version of glib. Strip them before comparison.
2023-08-21 19:30:54 -03:00
David Bremner
df45194d5f CLI/config: simulate top level comments when creating config
According to discussion on

          https://gitlab.gnome.org/GNOME/glib/-/issues/3078

it looks like upstream will stop supporting top of file comments.

It is questionable whether we really need this feature, but for now
update notmuch-config to simulate it.
2023-08-21 19:30:54 -03:00
David Bremner
1719b9e568 test/emacs: adapt to breaking change in Gnus defaults
As of Emacs 29.1, In-Reply-To is in the default value for
message-hidden-headers. We actually want to see that in the test
suite, so remove it again. To future proof the tests, fix a default
value for message-hidden-headers specifically for the test suite.
2023-08-20 14:32:02 -03:00
David Bremner
b6f144abe1 lib/n_d_remove_message: do not remove unique filename
It is wasteful to remove a filename term when the whole message
document is about to be removed from the database. Profiling with perf
shows this takes a significant portion of the time when cleaning up
removed files in the database.

The logic of n_d_remove_message becomes a bit more convoluted here in
order to make the change minimal.

It is possible that this function can be further optimized, since the
expansion of filename terms into filenames is probably not needed
here.
2023-07-22 07:15:59 -03:00
David Bremner
d93d49b6ae lib/message: check message type before deleting document
It isn't really clear how this worked before. Traversing the terms of
a document after deleting it from the database seems likely to be
undefined behaviour at best
2023-07-22 07:11:46 -03:00
David Bremner
08ca74d715 debian: add autopkgtests
We generate output to stderr for BROKEN tests, which are not failures,
so tell the test runner not to fail because of output on stderr.
2023-07-21 07:41:50 -03:00
David Bremner
ec26eeaeec test: support testing notmuch as installed
We put some effort into testing the built copy rather than some
installed copy. On the other hand for people like packagers, testing
the installed copy is also of interest.

When NOTMUCH_TEST_INSTALLED is set to a nonempty value, tests do not
require a built notmuch tree or running configure.

Some of the tests marked as broken when running against installed
notmuch are probably fixable.
2023-07-21 07:41:50 -03:00
David Bremner
73f3081160 test: Guess a value for NOTMUCH_PYTHON
python3 will work for many people, and reduce the friction to running
the tests without running configure first.
2023-07-21 07:07:43 -03:00
David Bremner
f6fcdf12da test: check for empty/missing files in test_expect_equal_message_body
Messages can have empty bodies, but empty files are not messages.
2023-07-21 07:07:43 -03:00
David Bremner
dfa43a1921 test: treat undefined feature variables as 0
When running the test suite without building first, it is desirable to
have the tests consider these variables being undefined as equivalent
to the feature not being present, and in particular for the tests not
to generate errors.
2023-07-21 06:58:16 -03:00
Tim Culverhouse
e9ff896f84 schemata: document 'excluded' field in structured output
Include the 'excluded' field in the structured output schema.

Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
2023-07-09 12:26:56 -03:00
David Bremner
f873790b6f perf-test: update corpus signature
In the decade (!) since this corpus was last updated, the keyserver
network is essentially dead, and I have migrated gpg keys. Bump the
version number as a clean way of switching signatures. Also update the
instructions to suggest using "--locate-external-key" to download the
public key. By default this uses WKD, which is now supported for my
UID.
2023-07-09 12:14:29 -03:00
David Bremner
a62b8a95c0 doc/lib: clarify ownership for notmuch_database_get_revision
The ownership is implicit in the const declaration (I think!), but
that does not show up in the doxygen generated API docs.
2023-07-09 12:08:28 -03:00
David Bremner
808fd6f258 test: add known broken test for message-id with embedded spaces.
According to my reading of RFC5322, there is an obsolete syntax for
Message-Id which permits folding whitespace (i.e. to be removed /
ignored by parsers). In [1] Paul Wise observed that notmuch removed
whitespace on indexing, but does not do any corresponding
normalization of queries. Mark the latter as a bug by adding a failing
test.

[1]: id:20230409044143.4041560-1-pabs3@bonedaddy.net
2023-07-09 11:59:43 -03:00
Michael J Gruber
3771832b01 python: adjust legacy bindings to py 3.12
Py 3.12 finally pulled the plug on the `SafeConfigParser` class which
has been deprecated since py 3.2.

We use it in the legacy bindings only, so take the easy route of
importing `ConfigParser` as `SafeConfigParser` and monkey-patching so
that the class has the expected interface.
2023-07-09 11:43:21 -03:00
Felipe Contreras
95a4bf3817 ruby: db: reorganize initializer
In order to make it more extensible.

No functional changes.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-05-29 07:51:02 -03:00
Paul Wise
239fdbbbf0 notmuch-mutt: check that the search cache Maildir is not a real Maildir
This prevents data loss when users configure the search cache Maildir to be a
real Maildir containing their real mail data, since the search cache Maildir
is expected to contain only symlinks to the real mail data.

Prevents: <ZCsQBNmbzwkvbpHA@localhost.localdomain>
2023-05-28 15:34:42 -03:00
Paul Wise
18e35950da notmuch-mutt: do not clear search cache Maildir when nothing is found
The previous results might be useful to the user but
an empty directory definitely isn't useful.
2023-05-28 15:33:11 -03:00
Paul Wise
85916d8a96 notmuch-mutt: clarify the empty Maildir function operates on search caches
Rename the function and adjust the documentation comment.
2023-05-28 15:32:11 -03:00
Paul Wise
93d936c5ae notmuch-mutt: replace extra command with notmuch thread search feature
This should be be slightly faster since it avoids forking a shell
and is less code in and less dependencies for the script.

Since String::ShellQuote isn't used elsewhere, drop mention of it.
2023-05-27 14:26:43 -03:00
Paul Wise
6d383d4049 notmuch-mutt: fix Xapian query construction
Spaces need to be stripped when querying the Message-Id,
because notmuch stores them in Xapian with spaces stripped.

All double-quote characters need to be doubled to escape them,
otherwise they will be added as extra query terms outside the id.
2023-05-27 14:24:40 -03:00
Paul Wise
d155f29eca notmuch-mutt: convert ISO-8859-15 copyright statement to UTF-8
Suggested-by: isutf8 & check-all-the-things
2023-05-25 08:43:14 -03:00
Felipe Contreras
afa45bd6b8 ruby: query: fix get sort
The order was wrong, right now `query.sort` doesn't return a number.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-05-25 07:02:59 -03:00
John Gliksberg
74c2c86769 vim: doc: minor spelling fix
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-05-07 14:27:33 -06:00
Felipe Contreras
3f4c61592f vim: doc: small fixes
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-05-07 14:27:10 -06:00
Jakub Wilk
1b878877d9 doc: fix typos 2023-04-13 11:14:58 -03:00
Felipe Contreras
e4d75fcc83 ruby: remove FileNames object
Not used anymore now that we return an array of strings directly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-12 07:30:01 -03:00
Felipe Contreras
837426d7be ruby: filenames: return string array directly
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-12 07:29:48 -03:00
Felipe Contreras
777b02a7d7 ruby: add filenames helper
Right now it doesn't do much, but it will help for further
reorganization.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-12 07:05:23 -03:00
David Bremner
a554690d6a lib: index attachments with mime types matching index.as_text
Instead of skipping indexing all attachments, we check of a (user
configured) mime type that is indexable as text.
2023-04-02 19:24:43 -03:00
David Bremner
3f5809bf28 lib: parse index.as_text
We pre-parse into a list of compiled regular expressions to avoid
calling regexc on the hot (indexing) path.  As explained in the code
comment, this cannot be done lazily with reasonable error reporting,
at least not without touching a lot of the code in index.cc.
2023-04-02 19:22:36 -03:00
David Bremner
c6733a45c8 lib: add config key INDEX_AS_TEXT
Higher level processing as a list of regular expressions and
documentation will follow.
2023-04-02 19:21:37 -03:00
Felipe Contreras
44924a6a09 ruby: remove Tags object
Not used anymore now that we return an array of strings directly.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
2023-04-02 19:11:10 -03:00