aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-01-09Merge branch 'release'David Bremner
2022-01-08python-cffi: returned OwnedMessage objects from Message.repliesDavid Bremner
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-08test: add known broken tests for recursive traversal of replies.David Bremner
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-03completion: use mail_root for path completion in bash/zshCédric Hannotier
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-03doc: mail store is given by database.mail_rootCédric Hannotier
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-01bindings/python-cffi: add matched property to message objectsDavid Bremner
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.
2021-12-31build: move {C,CXX}FLAGS to the end of FINAL_{C,CXX}FLAGSDavid Bremner
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-31build: move CPPFLAGS after source directory includes.David Bremner
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-31build: move LDFLAGS after notmuch libraries.David Bremner
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-29emacs: update coolj-line-prefix-regexp to make space optionalDavid Bremner
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-29Merge branch 'release'David Bremner
2021-12-29configure: calculate NOTMUCH_BUILDDIR, write to Makefile.configDavid Bremner
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-29lib/open: do not consider .notmuch alone as an existing database.David Bremner
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-29test/new: add known broken test for missing xapian directory.David Bremner
`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-26test: test folder renamesDavid Bremner
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-25doc: add dep. on stamp file for rebuilding gzipped man pages.David Bremner
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-23test: remove directory names from paths in exceptionsDavid Bremner
These cause failures when building out of tree.
2021-12-23emacs: add notmuch-logo.svg and use it in emacs mua on graphic displaysTomi Ollila
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-23doc: introduce stamp file for info buildDavid Bremner
This partially fixes (i.e. just for sphinx) the problem reported by Daniel in id:87r29wwgq2.fsf@fifthhorseman.net.
2021-12-23doc: replace phony target with variableDavid Bremner
Depending on a phony target seems like a good way to always trigger a recipe.
2021-12-12emacs/tree: fix docstrings for author facesKyle Meyer
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-11configure: have bash_absolute and perl_absolute always definedTomi Ollila
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-10Merge tag 'debian/0.34.2-1'David Bremner
notmuch release 0.34.2-1 for unstable (sid) [dgit] [dgit distro=debian no-split --quilt=linear]
2021-12-10debian: build only against default python versiondebian/0.34.2-1archive/debian/0.34.2-1David Bremner
This problem will will be solved in the next release of dh-python, but the crude solution is needed for backports anyway.
2021-12-09NEWS: mention fix for unprintable python exception0.34.2David Bremner
2021-12-09debian: changelog for 0.34.2-1David Bremner
2021-12-09version: bump to 0.34.2David Bremner
2021-12-09NEWS: add NEWS for 0.34.2David Bremner
2021-12-06test/emacs: mark one test as fixed in newer emacs.David Bremner
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-05python-cffi: fix out-of-tree buildDavid Bremner
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-05Merge branch 'release'David Bremner
2021-12-05Fix error message when using notmuch_status_to_stringFloris Bruynooghe
The python exception class was incorrectly loading the error message which resulted in unprintable exception objects.
2021-12-04python-cffi: introduce stamp fileDavid Bremner
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-04ruby: don't use a directory as a target.David Bremner
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-04emacs: don't add space to tag completion candidates.David Bremner
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-04test/new: replace use of gdb in vanishing file testDavid Bremner
Unlike the similar change in T060-new, no symlink creation is needed here.
2021-12-04test/count: replace use of gdb with a LD_PRELOAD shimDavid Bremner
There is a certain amount of boilerplate to pass the call on the original function, so abstract it out as a C preprocessor macro, plus some extra includes in notmuch-test.h
2021-12-04test: move system includes to notmuch-test.hDavid Bremner
This removes some redudant includes, and will also make it easier to introduce "#define _GNU_SOURCE", which must come before all system includes.
2021-12-04lib/config: use g_key_file_get_string to read config valuesDavid Bremner
Unlike the previous g_key_file_get_value, this version processes escape codes for whitespace and \. The remaining two broken tests from the last commit are because "notmuch config get" treats every value as a list, and thus the previously introduces stripping of leading whitespace applies.
2021-12-04test: known broken tests for escape characters in config files.David Bremner
glib generates the following escape characters with their usual meanings: \n, \t, \r, and \\, along with \s for _leading_ spaces. Currently notmuch fails to unescape these on reading the config files. These tests demonstrate this bug; the one new test that passes is because apparently glib only escapes tabs at the beginning of a key.
2021-12-04config: ignore leading/trailing spaces in ';'-delimited listsDavid Bremner
In [1] Ciprian observed that it was easy for users to mistakenly introduce leading and trailing space to new.tags when editing a notmuch config file. This commit strips spaces on either side of the ';' delimiter when splitting. In principle it would be possible to support tags (or other config values) with leading or trailing spaces by processing '\s' escapes in the input string. Currently such processing is not done. [1]: id:CA+Tk8fzjPLaEd3vL1f9ebk_bF_RV8PDTLzDupraTkCLCpJAmCg@mail.gmail.com
2021-12-04test: known broken tests for leading/trailing ws in configDavid Bremner
These tests duplicate the bug/misfeature reported in id:CA+Tk8fzjPLaEd3vL1f9ebk_bF_RV8PDTLzDupraTkCLCpJAmCg@mail.gmail.com
2021-12-04emacs: run notmuch-search-hook lazilyDavid Bremner
In message id:YT3ueuZHKW931NW3@localhost, Fabio Natali isolated a visual glitch caused by running notmuch-search-hook too early. This change moves the running of that hook to notmuch-search-process-filter, which ensures there is some output in the buffer before running the hook. Since n-s-p-f can be called many times for a given buffer, add a buffer local flag to make sure it is only run once per buffer.
2021-12-04Merge branch 'release'David Bremner
2021-12-04python-cffi: switch to notmuch_database_{open,create}_with_configDavid Bremner
Since release 0.32, libnotmuch provides searching for database and configuration paths. This commit changes the python module notmuch2 to use those facilities. This fixes the bug reported in [1], along with a couple of the deprecation warnings in the python bindings. Database.default_path is deprecated, since it no longer faithfully reflects what libnotmuch is doing, and it is also no longer used in the bindings themselves. This commit choose the default of config=CONFIG.EMPTY (equivalent to passing "" to notmuch_database_open_with_config). This makes the change upward compatible API-wise (at least as far as the test suite verifies), but changing the default to CONFIG.SEARCH would probably be more convenient for bindings users. [1]: id:87h7d4wp6b.fsf@tethera.net
2021-12-04test: add known broken tests for python bindings in split configsDavid Bremner
This reproduces the bug(s) reported in id:87h7d4wp6b.fsf@tethera.net
2021-12-04test: add python-cffi bindings to path for test_pythonDavid Bremner
This will allow testing the new python bindings using test_python, in addition to the current invocation of pytest.
2021-12-04python-cffi: fix typos in docstring for Database.default_pathDavid Bremner
These generate warnings from sphinx doc, which makes it harder to debug documentation changes. They also corrupt the output.
2021-12-03lib/config: don't overwrite database.path if the caller passed itDavid Bremner
If the user passed a path, and we opened it, then we consider that definitive definition of "database.path". This makes libnotmuch respond more gracefully to certain erroneous combinations of NOTMUCH_CONFIG settings and config file contents.
2021-12-03lib/open: track which parameters are passedDavid Bremner
This will be used to fine tune the loading of configuration for certain special configuration items (initially just "database.path").