aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2025-08-11debian: install git-remote-notmuchfeature/git-remoteDavid Bremner
2025-08-11cli/git-remote: add check for missing messagesDavid Bremner
In cases where a given 'export' both adds and deletes messages, we may not know what messages are actually missing until the end of processing. We thus do single pass of all remaining message-ids, and report any that are still missing at the end of the "export" operation.
2025-08-11cli/git-remote: handle message deletionsDavid Bremner
There are two main possibilities. One is explicit delete ('D' command in the stream from git fast-export) and one is files disappearing between commits. It is less clear the latter can happen in well formed sequence of commits, but it could result e.g. from manual changes to the repo.
2025-08-11cli/git-remote: add export commandDavid Bremner
Two (sub)features are stubbed out in this initial implementation: deleting messages (as opposed to tags), and missing messages. There are two corresponding tests marked as broken in T860-git-remote.sh. A third test passes with the stub, which is maybe not ideal, but at least it acts as a regression test.
2025-08-11cli/git-remote: add import commandDavid Bremner
The output in default.import is based on a modified version of Felipe's git-remote-nm with Blake2 hashing replaced by SHA1 (for portability). This enable fetch/pull/clone, so test that as well.
2025-08-11cli: start remote helper for git.David Bremner
This is closely based on git-remote-nm (in ruby) by Felipe Contreras. Initially just implement the commands 'capabilites' and 'list'. This isn't enough to do anything useful so start some unit tests. Testing of URL passing will be done after clone (import command) support is added.
2025-08-09util: refactor sync_dir and mkdir_recursiveDavid Bremner
Moving these functions to libnotmuch_util will allow re-user from either multiple CLI compilation units or from the library. To avoid future surprises, replace printing to stderr with the usual status string mechanism.
2025-08-09lib/config: add config keys for git-remote-notmuch.David Bremner
The precise function will be explained in a future update to notmuch-config(1).
2025-08-09lib: return NOTMUCH_STATUS_OPERATION_INVALIDATED where appropriateAnton Khirnov
The overall goal is to allow clients to restart operations in situations where that is the response recommended by the underlying Xapian library. Amended-by: db, added above explanation
2025-08-04lib/database-private: undef XAPIAN_DEPRECATED before redefining itAnton Khirnov
Silences compiler warnings about redefining a macro.
2025-08-04lib: add notmuch_threads_status()Anton Khirnov
While a number of errors can happen when iterating over threads (DatabaseModifiedError, memory allocation errors, etc.), the API currently cannot signal them to the caller, and either triggers an internal error (aborting the caller) or returns NULL from notmuch_threads_get() with no information on what actually went wrong. Add a new public function notmuch_threads_status() - similar to previously added notmuch_messages_status() - that allows propagating those errors to the caller. Use this to remove the INTERNAL_ERROR() in _notmuch_thread_create() (triggered by T642). Fixes: https://github.com/pazz/alot/issues/1460 Amended-By: db. Resolved whitespace disagreement between emacs and uncrustify in favour of uncrustify.
2025-08-04test: add a known broken test for DatabaseModifiedError from threads iterationAnton Khirnov
This is similar to previously added T641, except here we iterate over threads rather than messages. After f375ea1add121c428f261473512831a169dfe335, the DatabaseModifiedError raised by Xapian is now handled in _notmuch_message_create(), resulting in a NULL message being returned to _notmuch_thread_create(), which currently triggers an internal error.
2025-08-04lib/config: simplify cleanup in notmuch_database_get_config_list()Anton Khirnov
The list destructor is always set when necessary (i.e. if the iterator is successfully created), so there is never a need to invoke it explicitly, even on failure.
2025-07-24lib: handle DatabaseModifiedError in _notmuch_message_createAnton Khirnov
If an open database is modified sufficiently by other callers, the open instance becomes invalid and operations on it throw DatabaseModifiedError. Per Xapian documentation, the caller is then supposed to reopen the database and restart the query. This exception is currently not handled in _notmuch_message_create(), leading to the default handler abort()ing the process. Catch this exception in _notmuch_message_create() and return an error instead of crashing. Since the entire query becomes invalid - including results that have already been read by the caller - this situation cannot be handled by libnotmuch transparently. A new public function - notmuch_messages_status() - is added to allow the callers to check whether the messages iterator was exhausted or terminated early due to a runtime error. This also allows memory allocation failure to be signalled to the caller. Amended-By: David Bremner <david@tethera.net> [replace use of notmuch_messages_valid]
2025-07-06test: add another known broken test for uncaught DatabaseModifiedErrorAnton Khirnov
This one is raised from _notmuch_message_create(). See also https://github.com/pazz/alot/issues/1460#issuecomment-2994101019
2025-07-04python/doc: fix link to notmuch-config manpageDavid Bremner
This docstring has been like this a long time, but recently I noticed sphinx-doc complaining about :man:. This :any: link seems to work, and is consistent with the other links to the notmuch-config man page.
2025-06-23Merge branch 'release'David Bremner
2025-06-22doc/emacs: start subsection on message level actionsDavid Bremner
In particular this gives a place for documenting how to resume editing drafts.
2025-06-22doc/emacs: update keybindings list for 'e'David Bremner
The mention of notmuch-tree-button-activate seems to have been an error / obsolete.
2025-06-22doc/emacs: refactor navigation commandsDavid Bremner
The amount of space saved here is minimal, but I want to migrate to a more topic focused manual, as opposed to long alphabetical lists of commands.
2025-06-22doc/emacs: start a section on notmuch-message-modeDavid Bremner
This is mostly just copying docstrings, but putting them into sections makes them more discoverable.
2025-06-22test: do not add legacy bindings to PYTHONPATHMichael J Gruber
d526797a ("python: move legacy python bindings to contrib.", 2025-02-15) moved the legacy python bindings away from the location in `bindingss/`. Do not add that location to the PYTHONPATH since it is obsolete.
2025-06-20emacs/search: call notmuch-search-mode before popping to bufferjonah
This makes derived-mode matching in display-buffer-alist work.
2025-06-16bindings/python-cffi: fix typosJakub Wilk
2025-03-29python: make IndexOptions publicJakub Wilk
Database docstrings refer to IndexOptions, so the latter should be public too.
2025-03-20Merge branch 'release'David Bremner
2025-03-20emacs: fix disabling notmuch-show-header-line via customlen@realtimegenomics.com
The defcustom had a typo that prevented it from working as intended.
2025-03-18Merge branch 'release'David Bremner
2025-03-18doc/python: correct wording around container complexity.David Bremner
Based on a suggestion from Jakub Wilk.
2025-03-15Merge branch 'release'David Bremner
2025-03-15debian: drop patchesdebian/0.39-1archive/debian/0.39-1David Bremner
Those changes are now directly in git.
2025-03-15Merge branch 'debian/unstable' into releaseDavid Bremner
merge bugfix uploads from other branch
2025-03-15NEWS: set release date0.39David Bremner
2025-03-15debian: changelog stanza for 0.39-1David Bremner
2025-03-15version: bump to 0.39David Bremner
Identical to 0.39~rc3, except for release related documentation (e.g. NEWS).
2025-03-15NEWS: news for 0.39David Bremner
This is based on my reading of git shortlog. Some more development specific changes have been omitted.
2025-03-15Merge branch 'release'David Bremner
2025-03-14debian: changelog for 0.39~rc3-1debian/0.39_rc3-1archive/debian/0.39_rc3-10.39_rc3David Bremner
2025-03-14version: bump to 0.39~rc3David Bremner
2025-03-14Set 'untrusted-content' to t in all modesStefan Kangas
Instead of trying to guess in which modes this is safe not to set in, let's just set it in all of them. Background (added by db): untrusted-content was added in Emacs 29.3 and is currently set by Gnus and used by org-mode to prevent certain unsafe operations. I think the intent is to use it for blocking more unsafe operations in the future.
2025-03-13Merge branch 'release'David Bremner
2025-03-13bindings/python-cffi: fix docstring for message.header()Michael J Gruber
The cffi bindings raise a LookupError in case a header is not present. Adjust the docstring to say so. The legacy bindings behaved differently, and this is one of the things to be aware of when migrating to the cffi bindings.
2025-03-13Debian build-deps: include emacs-pgtk in conjunctionDaniel Kahn Gillmor
Debian developers with the pure GTK+ variant of emacs (which does not support X11 at all, as it builds entirely against the GTK Wayland backend) should also be able to treat the build-dependencies as satisfied. Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
2025-03-13Merge branch 'release'David Bremner
2025-03-13emacs/tree: add call to notmuch-hl-line-mode from process-filterDavid Bremner
This removes the visual gap/stutter between when the screen fills and when the hl-line "cursor" is drawn. It is not obviously how to robustly test this, since it the observable effect is purely a matter of timing.
2025-03-13emacs/tree: call notmuch-hl-line-mode from tree-sentinelDavid Bremner
There is a a perceptible gap between when the tree shows up and when the hl-line is visible, but this is better than the previous state where the line did not show up at all until the user moved the cursor.
2025-03-13emacs/tree: condition hl-line-mode on notmuch-hl-lineDavid Bremner
It isn't clear that this call to hl-line-mode will survive the coming re-organization to stop relying on hooks, but incrementally this at least makes the disabling behaviour consistent.
2025-03-13emacs: replace use of hook to draw hl-line in search modeDavid Bremner
In the thread at id:87fsfuuxwn.fsf@thinkbox, a bug is discussed where the point and hl-line overlay get out of sync, leading the user to open the wrong message. As far as I can tell this is caused by notmuch-hl-mode being invoked too early. This change bypasses the logic preventing notmuch-search-hook being called only once, so that the overlay is updated later after the buffer is full(er). This change may lead to the overlay being updated multiple times; if this is annoying we can add a similar buffer local variable to ensure it is only called once. The extra logic to check notmuch-search-target-line reduces the flicker somewhat by not highlighting the first line every time.
2025-03-13test/emacs: add tests for hl-line-mode integrationDavid Bremner
Most of the known broken tests replicate (my intepretation of) the bug reported at id:87fsfuuxwn.fsf@thinkbox (or some unreported, but probably related bugs in tree/unthreaded view). The last 3 broken tests are just unimplimented planned functionality.
2025-03-13emacs: add defcustom to control hl-line modeDavid Bremner
Currently the presence of hl-line highlighting is controlled implicitely by hooks. In future commits it will be migrated to use this variable.