aboutsummaryrefslogtreecommitdiff
path: root/lib/message-property.cc
AgeCommit message (Collapse)Author
2026-01-15lib: move call to _n_m_invalidate_metadataDavid Bremner
It is wrong most of the time in _notmuch_message_remove_terms, but that function is too low level to know how to call _n_m_invalidate_metadata with the right argument, at least not without more extensive changes. This change merely makes the current behaviour more obvious, since the other calls cannot have relied on metadata being invalidated.
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
2023-03-30lib/message-property: sync removed properties to the databaseKevin Boulain
_notmuch_message_remove_all_properties wasn't syncing the message back to the database but was still invalidating the metadata, giving the impression the properties had actually been removed. Also move the metadata invalidation to _notmuch_message_remove_terms to be closer to what's done in _notmuch_message_modify_property and _notmuch_message_remove_term.
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).
2021-03-13lib: run uncrustifyuncrustify
This is the result of running $ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h *.cc in the lib directory
2019-06-14lib: run uncrustifyuncrustify
This is the result of running $ uncrustify --replace --config ../devel/uncrustify.cfg *.c *.h *.cc in the lib directory
2018-05-26properties: add notmuch_message_count_propertiesDaniel Kahn Gillmor
The user can already do this manually, of course, but (a) it's nice to have a convenience function, and (b) exposing this interface means that someone more clever with a _notmuch_string_map_t than i am can write a more efficient version if they like, and it will just accelerate the users of the convenience function.
2018-05-26lib: expose notmuch_message_get_database()Daniel Kahn Gillmor
We've had _notmuch_message_database() internally for a while, and it's useful. It turns out to be useful on the other side of the library interface as well (i'll use it later in this series for "notmuch show"), so we expose it publicly now.
2018-05-03move more http -> httpsDaniel Kahn Gillmor
Correct URLs that have crept into the notmuch codebase with http:// when https:// is possible. As part of this conversion, this changeset also indicates the current preferred upstream URLs for both gmime and sup. the new URLs are https-enabled, the old ones are not. This also fixes T310-emacs.sh, thanks to Bremner for catching it.
2017-10-20properties: add notmuch_message_remove_all_properties_with_prefix()Daniel Kahn Gillmor
Subsequent patches will introduce a convention that properties whose name starts with "index." will be stripped (and possibly re-added) during re-indexing. This patch lays the groundwork for doing that.
2017-10-09lib: convert notmuch_bool_t to stdbool internallyJani Nikula
C99 stdbool turned 18 this year. There really is no reason to use our own, except in the library interface for backward compatibility. Convert the lib internally to stdbool.
2017-04-20Replace index(3) with strchr(3)Fredrik Fornwall
The index(3) function has been deprecated in POSIX since 2001 and removed in 2008, and most code in notmuch already calls strchr(3). This fixes a compilation error on Android whose libc does not have index(3).
2016-09-21lib: iterator API for message propertiesDavid Bremner
This is a thin wrapper around the string map iterator API just introduced.
2016-09-21lib: basic message-property APIDavid Bremner
Initially, support get, set and removal of single key/value pair, as well as removing all properties.