aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2023-03-30test: remove unnecessary sortingKevin Boulain
The other tests rely on a stable output.
2023-03-30test: display key name in property testsKevin Boulain
To make the tests a bit easier to understand.
2023-03-30lib/message-property: catch xapian exceptionsKevin Boulain
Since libnotmuch exposes a C interface there's no way for clients to catch this. Inspired by what's done for tags (see notmuch_message_remove_tag).
2023-03-30test: uncaught exception when editing properties of a removed messageKevin Boulain
These two functions don't fail gracefully when editing a removed message: BROKEN edit property on removed message without uncaught exception --- T610-message-property.20.EXPECTED 2023-02-27 11:33:25.792764376 +0000 +++ T610-message-property.20.OUTPUT 2023-02-27 11:33:25.793764381 +0000 @@ -1,2 +1,3 @@ == stdout == == stderr == +terminate called after throwing an instance of 'Xapian::DocNotFoundError' The other functions appear to be safe.
2023-02-27lib/notmuch: update exampleKevin Boulain
Likely missed in 86cbd215e, when notmuch_query_search_messages_st was renamed to notmuch_query_search_messages.
2023-02-21emacs/tree: use two argument form of setq-localDavid Bremner
Apparently the macro setq-local only takes two arguments in Emacs 26.1
2023-02-20lib: add better diagnostics for over long filenames.David Bremner
Previously we just crashed with an internal error. With this change, the caller can handle it better. Update notmuch-new so that it doesn't crash with "unknown error code" because of this change.
2023-02-20test: add known broken test for diagnostics from over long filenames.David Bremner
Previously we tested over long directory names, add similar testing for over long filenames.
2023-02-20emacs: notmuch-tree-outline-modejao
With this mode, one can fold trees in the notmuch-tree buffer as if they were outlines, using all the commands provided by outline-minor-mode. We also define a couple of movement commands that, optional, will ensure that only the thread around point is unfolded. The implementation is based on registering a :level property in the messages p-list, that is then used by outline-minor-mode to to recognise headers. Amended by db: Copy docstring to manual and edit for presentation. Add two tests. Fix typo "wether".
2023-01-10configure: use pkg-config for gpgmeDaniel Kahn Gillmor
GnuPG upstream has supported pkg-config since gpgme version 1.13 and gpg-error 1.33, and now prefers the use of pkg-config by default, instead of relying on gpg-error-config and gpgme-config. As of libgpg-error 1.46, upstream deliberately does not ship gpg-error-config by default. As of gpgme 1.18.0, upstream does not ship gpgme-config if gpg-error-config is also not present. Both of these versions of upstream libraries are in debian unstable now. To the extent that notmuch is dependent on GnuPG, it should follow GnuPG upstream's lead. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2023-01-05test: mark some tests as broken when run as root.David Bremner
File permission errors e.g., are hard to trigger as root.
2022-12-27lib/message: move xapian call inside try/catch block in _n_m_deleteDavid Bremner
The call to delete_document can throw exceptions (and can happen in practice [1]), so catch the exception and extract the error message. As a side effect, also move the call to _n_m_has_term inside the try/catch. This should not change anything as that function already traps any Xapian exceptions. [1]: id:wwuk039sk2p.fsf@chaotikum.eu
2022-12-27test: add known broken test for exception handling in _n_m_deleteDavid Bremner
In [1], Thomas Schneider reported an uncaught Xapian exception when running out of disk space. We generate the same exception via database corruption. [1]: id:wwuk039sk2p.fsf@chaotikum.eu
2022-12-27lib/database: propagate status code from _notmuch_message_deleteDavid Bremner
_notmuch_message_delete can return (at least) NOTMUCH_STATUS_XAPIAN_EXCEPTION, which we should not ignore.
2022-12-27CLI/git: use --exclude=false when calling notmuch-searchDavid Bremner
We use notmuch search in two places in notmuch-git.py: to find which tags have a given prefix, and to see if message with given id exists locally. In both cases we do not want the presence of exclude tags (e.g. deleted) to change the results.
2022-12-03doc: mark `--output=summary` as defaultMichael J Gruber
`notmuch search` behaves differently depending on the output option: It either outputs information pertaining to all threads with matching messages (summary, threads) or to all matching messages (messages, files, tags). The man page refres solely to the former in the main description. Help the user by clearly marking `summary` as the default output option. Signed-off-by: Michael J Gruber <git@grubix.eu>
2022-11-15emacs/show: use n-s-i-headerline to update tagsDavid Bremner
Although this has more steps than the previous regular expression search and replace, it should be more robust against changes in the headerline format, such as the inclusion of duplicate numbers (which broke the previous version).
2022-11-15emacs/show: add optional orig-tags argument to n-s-i-headerlineDavid Bremner
This will support use of this function in notmuch-show-update-tags.
2022-11-15emacs/show: use plist to pass message info to n-s-insert-headerlineDavid Bremner
This should allow calling notmuch-show-insert-headerline from other places without duplicating the set of plist accesses.
2022-11-05emacs: move From header addition to after header internRussell Sim
OTHER-HEADERS are expected to be passed as strings, to match the implementation of `compose-mail'. But the "From" header is currently expected to be passed as a symbol. Instead the "From" header can be safely added after converting all the headers to symbols.
2022-11-05cli: add options --offset and --limit to notmuch showRobin Jarry
notmuch search does not output header values. However, when browsing through a large email corpus, it can be time saving to be able to paginate without running notmuch show for each message/thread. Add --offset and --limit options to notmuch show. This is inspired from commit 796b629c3b82 ("cli: add options --offset and --limit to notmuch search"). Update man page, shell completion and add a test case to ensure it works as expected. Cc: Tim Culverhouse <tim@timculverhouse.com> Cc: Tomi Ollila <tomi.ollila@iki.fi> Signed-off-by: Robin Jarry <robin@jarry.cc>
2022-11-05emacs: fix dangling overlays in notmuch-searchMatt Armstrong
notmuch-search-insert-authors now sets the evaporate property on the ellipsis overlays. Emacs will delete them when the buffer contents are zeroed out, which happens with `notmuch-refresh-buffer`. This prevents them from being collapsed to zero-width overlays in position 1. See Emacs bug#58479. An upcoming change in Emacs will make these dangling overlays visible to the user.
2022-10-11nmweb: Fix spacing around punctuation in headersJakub Wilk
2022-09-23emacs: add notmuch-search-edit-search and notmuch-tree-edit-searchTomi Ollila
...and bind these to "E" in their respective keymaps. Expected to be called interactively, then using read-from-minibuffer with current search string as initial contents for editing. (Noninteractive use makes little sense, but is supported.) With this one can expand (as an opposite to limit) their query and have e.g. (some of their) saved searches as search "templates". While at it, removed `(defvar notmuch-search-query-string)` from notmuch-tree.el; it is unused (`notmuch-tree-basic-query` is used instead). Thanks to Jose Antonio Ortega Ruiz for his example for notmuch-tree code, and better interactive use.
2022-09-23nmweb: escape subject in search viewDavid Bremner
Fix a bug reported by Jakub Wilk [1]. [1]: id:20220822064717.qftn4tr7cs4r2ian@jwilk.net
2022-09-23test: replace aging OpenPGP key used in the test suiteJustus Winter
This replaces the old OpenPGPv4 key that is used in the test suite with a more modern OpenPGPv4 key. All cryptographic artifacts in the test suite are updated accordingly. Having old cryptographic artifacts in the test suite presents a problem once the old algorithms are rejected by contemporary implementations. For reference, this is the old key. sec rsa1024 2011-02-05 [SC] 5AEAB11F5E33DCE875DDB75B6D92612D94E46381 uid [ unknown] Notmuch Test Suite <test_suite@notmuchmail.org> (INSECURE!) ssb rsa1024 2011-02-05 [E] And this is the new key. Note that is has the same shape, but uses Ed25519 and Cv25519 instead of 1024-bit RSA. sec ed25519 2022-09-07 [SC] 9A3AFE6C60065A148FD4B58A7E6ABE924645CC60 uid [ultimate] Notmuch Test Suite (INSECURE!) <test_suite@notmuchmail.org> ssb cv25519 2022-09-07 [E]
2022-09-19test: compute expected keyid from fingerprintJustus Winter
2022-09-03test: add known broken test for indexing text/* attachmentsDavid Bremner
The general problem of indexing attachments requires some help to turn things into text, but (most?) text/* should be doable internally, possibly with optimizations as for the text/html case.
2022-09-03test: rename indexing corpusDavid Bremner
The corpus is not really suitable for general indexing test since the sole message is ignored (and will most likely continue to be ignored) by notmuch-new.
2022-09-03lib: add field processor for lastmod: prefixDavid Bremner
By sharing the existing logic used by the sexp query parser, this allows negative lastmod revisions to be interpreted as relative to the most recent revision.
2022-09-03lib: factor out lastmod range handling from sexp parser.David Bremner
This will permit the re-use of the same logic in the infix query parser. The location of the shared code in the infix side is for consistency with the other shared parsing logic. It will make more sense when a Xapian field processor is added for the lastmod prefix.
2022-09-03lib/sexp: provide relative lastmod queriesDavid Bremner
Test the relatively trivial logic changes for the sexp query parser first before refactoring that logic to share with the infix query parser.
2022-09-03lib/open: create database path in some casesDavid Bremner
There is some duplication of code here, but not all of the locations valid to find a database make sense to create. Furthermore we nead two passes, so the control flow in _choose_database_path would get a bit convoluted.
2022-09-03lib/open: return non-SUCCESS on missing database pathDavid Bremner
This simplifies the logic of creating the directory path when it doesn't exist.
2022-09-03lib/open: refactor call to mkdir into functionDavid Bremner
This makes the error handling available for re-use. Using g_mkdir_with_parents also handles the case of a pre-existing directory. This introduces new functionality, namely creating the parent directories, which will be useful for creating directories like '.local/share/notmuch/default'.
2022-09-03test/path-config: set database.mail_root but not database.pathDavid Bremner
The failing "create database" test replicates a bug reported by Sean Whitton [1]. The other two failures also look related to the database being (re)created in the wrong place. [1]: id:87y1wqkw13.fsf@athena.silentflame.com.
2022-09-03test: add test for creating database in various configurations.David Bremner
The existing database creation (via add_email_corpus) was always done in the traditional configuration. The use of xapian-metadata is just to portably ensure that there is a database created where we expect there to be.
2022-09-03emacs/show: use read-shell-command instead of read-stringAntoine Beaupré
This enables auto-completion of commands, something which plain read-string does not do. It's otherwise a drop-in replacement. According to `C-h f`, read-shell-command was introduced in Emacs 23.1 or earlier.
2022-09-03emacs: new notmuch-tree-process-exit-functionsjao
Hook run when the tree insertion process finishes its job. -- This patch supersedes <id:20220816214023.1523322-1-jao@gnu.org>, but changing the new variable name. Right now, it can be used for silly things like removing or changing the the "End of search." hardcoded message in the tree buffer. But also for more sophisticated things like folding all threads in add-ons like my outline mode for tree buffers (to be submitted). Signed-off-by: jao <jao@gnu.org>
2022-08-24debian: update changelog for new build-dependsdebian/0.37-1archive/debian/0.37-1David Bremner
2022-08-24debian: build-depend on emacs-elDavid Bremner
This is hopefully temporary, to work around some bugs related to emacs 28 in Debian.
2022-08-21NEWS: set release date for 0.370.37David Bremner
2022-08-21debian: changelog for 0.37-1David Bremner
2022-08-21version: update to 0.37David Bremner
2022-08-21NEWS: minimal entries for two emacs changes.David Bremner
2022-08-16test: increase cffi timeoutMichael J Gruber
By default, the test suite uses 2min for other tests and 5s for cffi tests. Sporadically, this leads to test failures caused by the timeout on slower or loaded test infrastructure (as seen on ppc64le in Fedora's infrastructure during branch time). Increase the cffi timeout to the same 2m=120s. Signed-off-by: Michael J Gruber <git@grubix.eu>
2022-08-14changelog for 0.37~rc0-3debian/0.37_rc0-3archive/debian/0.37_rc0-3David Bremner
2022-08-14debian: changelog for 0.37~rc0-2debian/0.37_rc0-2archive/debian/0.37_rc0-2David Bremner
2022-08-14debian: upload release candidate to experimental, not unstabledebian/0.37_rc0-1archive/debian/0.37_rc0-1David Bremner
Oops, tagged "upstream" version is incorrect, but it's a minor issue.
2022-08-14debian: changelog stanza for 0.37~rc0-10.37_rc0David Bremner