Commit graph

7295 commits

Author SHA1 Message Date
David Bremner
fd0edeb561 lib/open: use db struct as talloc ctx for choose_database_path
The extra talloc struct "local" was left over from before the notmuch
struct was allocated earlier. Having the notmuch struct available in
this function will allow more flexibility to track the configuration
variations (e.g. split vs. non-split).
2022-01-15 15:51:33 -04:00
David Bremner
237f803fdb test/libconfig: add two tests for the config = "" case
If notmuch_database_open_with_config finds a database, but that
database is not in a legacy, non-split configuration, then it
currently incorrectly deduces the mail root and returns SUCCESS. Add
to two tests to demonstrate this bug.
2022-01-15 15:49:14 -04:00
David Bremner
c62ebcfea9 test/libconfig: save and restore config file
Currently the config file is unusable for further tests requiring a
valid database path.
2022-01-15 15:49:00 -04:00
LdBeth
c7c422ded2 emacs/notmuch-tag.el: add xmlns attribute to svg icons
emacs-mac that compiled with OS X system API for image display
support cannot correctly render svg without xmlns parameter [1].

[1]: id:tencent_127AA231767438AC66FEE4DDB4BBF51DF909@qq.com
2022-01-14 17:12:41 -04:00
David Bremner
f9d8f9c6ba Merge remote-tracking branch 'origin/release' 2022-01-12 13:25:29 -04:00
David Bremner
114b985ba7 test/gpgsm: use --with-colons when calculating fingerprint.
As stressed by the gpg documentation, the non-'with-colons' output
format is subject to change, and indeed it did in 2.3.x (x<=3). This
should make the the test suite more robust against such changes.
2022-01-12 13:22:51 -04:00
Michael J Gruber
21e206e8b9 configure: Ignore more options that Fedora spec macros expect
Signed-off-by: Michael J Gruber <git@grubix.eu>
2022-01-11 15:28:08 -04:00
jao
332b3b639e emacs: make header line in notmuch-show buffers optional
New notmuch-show-header-line customizable boolean to allow inhibiting
a header line in notmuch-show-mode buffers (for instance, because one
prefers to just include Subject in notmuch-message-headers).
2022-01-10 08:03:40 -04:00
David Bremner
63d3b2b5cf notmuch 0.34.3 release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAmHbOcMACgkQA0U5G1Wq
 FSEGVA//Vjgripk0eRDIUZrdL/knjDXybbHVz06r+gx+9Rh1b+3MJ8t+VAjeX7OO
 iJns7ZysKgMsQSYFCFk9fTl5m3ECzZFmzY7lmRU2tU6Hz9lUwotN70e+zGBgFE6J
 sGji4YOCrUnpmgb0j0joRD565m74Bi2Z8Pj+qRvo4RcQY5JxczyDtkSnLb9UDo/e
 FNZ4bTlwJL13Jeu8F6BtnCFPxvpac3qlzLIlG327Fz4cFwQ+QoxQIq5i8pnOu3B2
 HBEyOZAgIuONbV/RH/nwt7QmT45Dne1wP/UqocHkiu3yKvsCRLZC0vsejw8/dZ+D
 GQUfJT9EL1AIJa6OvUyF5UtnPMRKgACG2nt5U8M02ubheAAEgUS/FIIm1kgxkqYU
 5dDKHwU12YHDW2/nwOSRBFDV6TSCkskXr9Thr884KCobyPPnhWkN+pKAfyDhwPMc
 MrnMyId3fPrJRPMxoQ7Z8TJV8l/Wd6FIlFowfzk+s6hfV2qgOUZJ2Btrfk8596Sy
 np8usullbhFagYQ1+JX3AvVxLYvtFKmxO/qG6TcBmjBui5ABz7wtizfgwDx5eVJr
 GpzJUKFUKAmZW+15nm3oNdEwFOjdvRouKc03Qv5eCU6wSaOtd9efgntDPcso8ycW
 Us13KJIhwmwDJdaqnlmG5TdlJY9qjFu/VGHt4+I1GNQuswXRIo8=
 =hQCB
 -----END PGP SIGNATURE-----

Merge tag '0.34.3'

notmuch 0.34.3 release
2022-01-09 19:34:58 -04:00
David Bremner
51c287ead8 doc: add 2022 to copyright years. 2022-01-09 15:35:52 -04:00
David Bremner
a226b7a29b version: bump to 0.34.3 2022-01-09 15:35:12 -04:00
David Bremner
ad147c0205 debian: changelog for 0.34.3-1 2022-01-09 15:31:03 -04:00
David Bremner
9e62a0beaa NEWS: add NEWS for 0.34.3 2022-01-09 15:29:05 -04:00
David Bremner
8b737af28b bindings/python-cffi: search for config by default
The previous (pre-0.34.2) constructor searched for a config file but
only if the database path was not specified, and only to retrieve
database.path. Neither of the available options (CONFIG.SEARCH or
CONFIG.NONE) matches this semantics exactly, but CONFIG.SEARCH causes
less breakage for people who relied on the old behaviour to set their
database.path [1]. Since it also seems like the friendlier option in
the long run, this commit switches to CONFIG.SEARCH as default.

This requires a certain amount of updating the pytest tests, but most
users will actually have a config file, unlike the test environment.

[1]: id:87fsqijx7u.fsf@metapensiero.it
2022-01-09 15:16:51 -04:00
David Bremner
22e04ed01a Merge branch 'release' 2022-01-09 09:20:56 -04:00
David Bremner
9e7ea628e6 python-cffi: returned OwnedMessage objects from Message.replies
If we return regular Message objects, python will try to destroy them,
and the underlying notmuch object, causing e.g. the crash [1].

[1]: id:87sfu6utxg.fsf@tethera.net
2022-01-08 16:29:41 -04:00
David Bremner
d9a2b900b6 test: add known broken tests for recursive traversal of replies.
This reproduces the bug reported at [1]. The second test hints at the
solution, making reply return OwnedMessage objects.

[1]: id:87sfu6utxg.fsf@tethera.net
2022-01-08 16:29:41 -04:00
Cédric Hannotier
d99b0d4dc8 completion: use mail_root for path completion in bash/zsh
Since mail store and database directory can be different,
path and folder completions must use the directory given by
database.mail_root, not by database.path.
2022-01-03 08:07:38 -04:00
Cédric Hannotier
f9ffc5f433 doc: mail store is given by database.mail_root
The mail store directory is given by database.mail_root,
which can be different from database.path.

However, notmuch-insert documentation was still referencing the latter
as the provider of the maildir directory instead of the former.
2022-01-03 08:07:13 -04:00
David Bremner
9cc026f3da bindings/python-cffi: add matched property to message objects
Existing users of the legacy python bindings use
message.get_flags(Message.FLAG.MATCH) to determine which messages in a
thread matched. Since the bindings don't provide get_flags anymore,
they should provide a property analogous to the existing "excluded"
property.
2022-01-01 11:48:40 -04:00
David Bremner
e9c55864cd build: move {C,CXX}FLAGS to the end of FINAL_{C,CXX}FLAGS
In addition to avoiding problems with user specified include paths
picking up an installed version of notmuch.h, this should also enable
users to override more options (in particular they could override
warning options since the last one takes effect).

[1]: id:7851CAB5-4556-4931-A0A2-37003E56C927@ryandesign.com
2021-12-31 07:08:06 -04:00
David Bremner
911d9a916e build: move CPPFLAGS after source directory includes.
In [1] Ryan Schmidt reported a problem on macports [2] with notmuch
finding an existing installed version of notmuch.h during the build.

This is a partial fix; the user might also specify -I in CFLAGS.

[1]: id:7851CAB5-4556-4931-A0A2-37003E56C927@ryandesign.com

[2]: The problem does not arise when notmuch.h is installed into a
"system" include path that the compiler searches by default.
2021-12-31 07:07:55 -04:00
David Bremner
2494e61b9e build: move LDFLAGS after notmuch libraries.
In [1] Ryan Schmidt reported a problem on macports [2] with notmuch
finding an existing installed version of libnotmuch during the build
when the user specified LDFLAGS including the libnotmuch install
directory.

This change should prevent that.

LDFLAGS also occurs in FINAL_LIBNOTMUCH_LDFLAGS. The only built
library linked to that is util/libtnotmuch_util.a, and that passed as
explicit (relative) path, and is thus not affected by -L.

[1]: id:7851CAB5-4556-4931-A0A2-37003E56C927@ryandesign.com

[2]: The problem does not arise when libnotmuch is installed into a
"system" library path that the compiler/linker searches by default.
2021-12-31 07:07:32 -04:00
David Bremner
6721e2eac5 emacs: update coolj-line-prefix-regexp to make space optional
Jani reported that lines prefixed with '>' (as opposed to '> ') are
not highlighted properly [1]. David E responded with a updated regex
[2]. This change implements David E's suggestion.

[1]: id:87a8b5pcky.fsf@nikula.org
[2]: id:m2pok1e3gv.fsf@dme.org
2021-12-29 14:24:21 -04:00
David Bremner
3eb25c94bd Merge branch 'release' 2021-12-29 14:20:49 -04:00
David Bremner
14c4f9441d configure: calculate NOTMUCH_BUILDDIR, write to Makefile.config
This will correct the current use of an undefined variable when
setting LD_LIBRARY_PATH in doc/Makefile.local

It is tempting to try to replace the use of test/export-dirs.sh, but
this is not as simple as it looks, as NOTMUCH_BUILDDIR is used to
locate sh.config, so probably cannot also sensibly be used to define
it.
2021-12-29 14:12:03 -04:00
David Bremner
25e0f5e592 lib/open: do not consider .notmuch alone as an existing database.
It makes perfect sense for users to want to pre-create .notmuch,
e.g. to install hooks, so we should handle the case of a .notmuch
directory without an actual xapian database more gracefully.
2021-12-29 14:11:21 -04:00
David Bremner
e43bad4883 test/new: add known broken test for missing xapian directory.
`notmuch new' should go ahead and create the xapian database if it is
missing, even in the case where the parent .notmuch (or equivalent)
directory exists.
2021-12-29 14:11:10 -04:00
David Bremner
063f5e9862 test: test folder renames
In [1] Mark Walters reported a problem with messages being removed
from the database when the parent directory was renamed. Jani Nikula
proposed [2] these tests but observed

   This test is not suitable for merging since it's not deterministic.

After applying Jani's patch [3], the tests now pass deterministically,
and could usefully act as regression tests.

[1]: id:87siray6th.fsf@qmul.ac.uk
[2]: id:1393191650-28333-1-git-send-email-jani@nikula.org
[3]: id:1441445731-4362-2-git-send-email-jani@nikula.org
2021-12-26 12:30:25 -04:00
David Bremner
02d8ff376d doc: add dep. on stamp file for rebuilding gzipped man pages.
In [1] Daniel observed that the gzipped man pages were only being
rebuild every second time when building with `make -j4'. This may be
caused by a race condition between sphinx-build rebuilding the roff
files and the recipe to gzip them. This commit sequentializes these
two steps by making the stamp file a prerequisite for (all of) the
gzip files.

[1]: id:87tveotn1g.fsf@fifthhorseman.net
2021-12-25 07:32:27 -04:00
David Bremner
cea1604a08 test: remove directory names from paths in exceptions
These cause failures when building out of tree.
2021-12-23 08:47:40 -04:00
Tomi Ollila
031f4b4da5 emacs: add notmuch-logo.svg and use it in emacs mua on graphic displays
emacs/notmuch-logo.svg is handcrafted scalable vector graphics version
of the notmuch logo.

Emacs on graphic displays render this image four times in size compared
to the emacs/notmuch-logo.png, and the image is much sharper.

The rendered image size, 100x100 pixels, fits reasonably well with
text shown in various font sizes.

Scaling the image -- if desired -- may come in the future. For now
this is improvement on how the logo looked in notmuch-hello window.
2021-12-23 08:16:49 -04:00
David Bremner
b7e08901e8 doc: introduce stamp file for info build
This partially fixes (i.e. just for sphinx) the problem reported by
Daniel in id:87r29wwgq2.fsf@fifthhorseman.net.
2021-12-23 08:01:28 -04:00
David Bremner
d825847b52 doc: replace phony target with variable
Depending on a phony target seems like a good way to always trigger a
recipe.
2021-12-23 08:01:11 -04:00
Kyle Meyer
ed03babd05 emacs/tree: fix docstrings for author faces
The docstrings for notmuch-tree-match-author-face and
notmuch-tree-no-match-author-face incorrectly match the docstring of
notmuch-tree-match-date-face.
2021-12-12 10:14:07 -04:00
Tomi Ollila
ab8d0e5725 configure: have bash_absolute and perl_absolute always defined
Since set -u is used, without bash or perl, configure would fail.

This has gone unnoticed as (almost) everyone always had both
bash and perl installed (and in $PATH).

Thanks to FreeBSD ports this bug became visible; this change is
verbatim copy of `patch-configure` in FreeBSD ports tree.
2021-12-11 07:17:42 -04:00
David Bremner
a06b76b9b3 notmuch release 0.34.2-1 for unstable (sid) [dgit]
[dgit distro=debian no-split --quilt=linear]
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAmGzWWMACgkQA0U5G1Wq
 FSG8xg/+Jx1z1pqC9CAQpw1Ccb9OuYsniwj7rvhfutbS82zkuFFq2UdjHa3rP31a
 zABqN9b9VDUtsEE5Wyf+Md7SZ202NQK3sZ/vh///CHis12CLaMZkvpi+twi9f5pj
 pMzcwXJ5voaHxErDvvjIp3FV9+RsfpZl5owXpav8j6Hl05TZ4xHfopF0O9rSJQhK
 +KuUjb2zGO7clP78cEZhEn+hk5DmYf0obRDK7hHgL/n8FVB+pmUsa5riauW2u/Jm
 ozhL+sC3DjVspQLZ1SgHHBocfuLCOlMcp2sqLHEN9pqF7XcW3m0aq9GFfYlUNh1m
 kc8HpTxHI7hcQmS0zsURgqV2fNR9okS8ye0zaCMw5oJ7h4J36i5kbRj0TPfRW7h3
 SKPuFGELPVqGj3NjUEhS34vgCcocmYmYqurAGKl1OnDouDT+ZpNMeg0EFrfhU/N3
 jcRTYcw6IarFJ85h8uFPBqIXd0H8KoPvUTa85eS4a/wqcrxPZTgtuqu35mlpe+1U
 77TyoQIT5AYa8c0N51a60jGK1ijY0/SBtMtb+hRxYuWLCU9wnWZEOBPakbqTVIdn
 +iBR4kYwQfhewqv2yLdCp/GsLqhQs2X79yBChWtcUc4WtM5B5QVlgU9TloyJJVHA
 2HB6ZkJW3MlzIhdJ/naemCuoW3D5ApnXJzGIWJk1nsSyR/Gq66k=
 =lO2D
 -----END PGP SIGNATURE-----

Merge tag 'debian/0.34.2-1'

notmuch release 0.34.2-1 for unstable (sid) [dgit]

[dgit distro=debian no-split --quilt=linear]
2021-12-10 18:53:57 -04:00
David Bremner
2394ee6289 debian: build only against default python version
This problem will will be solved in the next release of dh-python, but
the crude solution is needed for backports anyway.
2021-12-10 09:36:10 -04:00
David Bremner
a254a15861 NEWS: mention fix for unprintable python exception 2021-12-09 08:54:15 -04:00
David Bremner
b5eaa8ee83 debian: changelog for 0.34.2-1 2021-12-09 08:49:52 -04:00
David Bremner
05ee23ba42 version: bump to 0.34.2 2021-12-09 08:47:15 -04:00
David Bremner
49f8d051d1 NEWS: add NEWS for 0.34.2 2021-12-09 08:44:22 -04:00
David Bremner
57f29f4cb1 test/emacs: mark one test as fixed in newer emacs.
The remaining problem in this test is fixed upstream in Emacs
28. While most people are using earlier versions of emacs, the test
still provides some documentation of a known bug.
2021-12-06 17:28:51 -04:00
David Bremner
f17d75b83c python-cffi: fix out-of-tree build
The main idea is to replace the hack of copying version.txt into the
bindings source with a generated _notmuch_config.py file.

This will mean that the bindings only build after configuring and
building notmuch itself. Given those constraints, "pip install ."
should work.
2021-12-05 09:08:48 -04:00
David Bremner
95f0c59fe9 Merge branch 'release' 2021-12-05 09:02:50 -04:00
Floris Bruynooghe
ca4e1d885b Fix error message when using notmuch_status_to_string
The python exception class was incorrectly loading the error message
which resulted in unprintable exception objects.
2021-12-05 08:53:39 -04:00
David Bremner
c01152885c python-cffi: introduce stamp file
Although the rebuild does not take long, it is a bit noisy, so assume
if it succeeds once, it doesn't need to re-invoke setup.py until the
shared library is rebuilt. This is a partial fix for [1].

[1]: id:87r29wwgq2.fsf@fifthhorseman.net
2021-12-04 15:22:06 -04:00
David Bremner
904c067f32 ruby: don't use a directory as a target.
The directory is (neccesarily) not updated by the build, so it keeps
trying to build. The proposed fix is to use the name of the dynamic
library containing the extension.  This is a partial fix for the
rebuilding reported at [1].

[1]: id:87r29wwgq2.fsf@fifthhorseman.net
2021-12-04 15:21:54 -04:00
David Bremner
20b2150406 emacs: don't add space to tag completion candidates.
Apparently this messes up various third party completion
frameworks. This change does mean that users will have to hit space
after completing a tag change in order to enter another change.

As a bonus, remove the call to #'delete, since
completing-read-multiple already promises to remove empty strings.
2021-12-04 12:56:43 -04:00
David Bremner
efa7f35d4a test/new: replace use of gdb in vanishing file test
Unlike the similar change in T060-new, no symlink creation is needed
here.
2021-12-04 12:36:08 -04:00