- Notmuch 0.32.1 (UNRELEASED)
+Notmuch 0.33 (UNRELEASED)
+=========================
+
+Vim
+---
+
+Respect excluded tags when showing a thread.
+
+ Notmuch 0.32.1 (2021-05-15)
===========================
+ General
+ -------
+
Restore handling of relative values for `database.path` that was
broken by 0.32. Extend this handling to `database.mail_root`,
`database.backup_dir`, and `database.hook_dir`.
notmuch_database_reopen. This fixes a bug when adding messages to the
database in a pre-new hook.
+ Fix default of `$HOME/mail` for `database.path`. In release 0.32, this
+ default worked only in "notmuch config".
+
+ Emacs
+ -----
+
+ Restore the dynamically bound variables `tag-changes` and `query` in
+ in `notmuch-before-tag-hook` and `notmuch-after-tag-hook`.
+
Notmuch 0.32 (2021-05-02)
=========================
}
}
if (! *database_path) {
+ notmuch_status_t status;
+
*database_path = _xdg_dir (ctx, "XDG_DATA_HOME", ".local/share", profile);
- *split = true;
+ status = _db_dir_exists (*database_path, message);
+ if (status) {
+ *database_path = NULL;
+ } else {
+ *split = true;
+ }
+ }
+
+ if (! *database_path) {
+ notmuch_status_t status;
+
+ *database_path = talloc_asprintf (ctx, "%s/mail", getenv ("HOME"));
+ status = _db_dir_exists (*database_path, message);
+ if (status) {
+ *database_path = NULL;
+ }
}
if (*database_path == NULL) {
_notmuch_config_cache (notmuch, NOTMUCH_CONFIG_DATABASE_PATH, path);
}
-static void
-_init_libs ()
-{
-
- static int initialized = 0;
-
- /* Initialize the GLib type system and threads */
-#if ! GLIB_CHECK_VERSION (2, 35, 1)
- g_type_init ();
-#endif
-
- /* Initialize gmime */
- if (! initialized) {
- g_mime_init ();
- initialized = 1;
- }
-}
-
static void
_load_database_state (notmuch_database_t *notmuch)
{
GKeyFile *key_file = NULL;
bool split = false;
- _init_libs ();
+ _notmuch_init ();
notmuch = _alloc_notmuch ();
if (! notmuch) {
int err;
bool split = false;
- _init_libs ();
+ _notmuch_init ();
notmuch = _alloc_notmuch ();
if (! notmuch) {
GKeyFile *key_file = NULL;
bool split = false;
- _init_libs ();
+ _notmuch_init ();
notmuch = _alloc_notmuch ();
if (! notmuch) {
EXPECTED=$NOTMUCH_SRCDIR/test/emacs.expected-output
+test_require_emacs
add_email_corpus
# syntax errors in test-lib.el cause mysterious failures
output=$(notmuch search $os_x_darwin_thread | notmuch_search_sanitize)
test_expect_equal "$output" "thread:XXX 2009-11-18 [4/4] Jjgod Jiang, Alexander Botero-Lowry; [notmuch] Mac OS X/Darwin compatibility issues (inbox unread)"
+ test_begin_subtest "notmuch-show: before-tag-hook is run, variables are defined"
+ output=$(test_emacs '(let ((notmuch-test-tag-hook-output nil)
+ (notmuch-before-tag-hook (function notmuch-test-tag-hook)))
+ (notmuch-show "id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com")
+ (execute-kbd-macro "+activate-hook\n")
+ (execute-kbd-macro "-activate-hook\n")
+ notmuch-test-tag-hook-output)')
+ test_expect_equal "$output" \
+ '(("id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com" "-activate-hook")
+ ("id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com" "+activate-hook"))'
+
+ test_begin_subtest "notmuch-show: after-tag-hook is run, variables are defined"
+ output=$(test_emacs '(let ((notmuch-test-tag-hook-output nil)
+ (notmuch-after-tag-hook (function notmuch-test-tag-hook)))
+ (notmuch-show "id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com")
+ (execute-kbd-macro "+activate-hook\n")
+ (execute-kbd-macro "-activate-hook\n")
+ notmuch-test-tag-hook-output)')
+ test_expect_equal "$output" \
+ '(("id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com" "-activate-hook")
+ ("id:ddd65cda0911171950o4eea4389v86de9525e46052d3@mail.gmail.com" "+activate-hook"))'
+
test_begin_subtest "Message with .. in Message-Id:"
add_message [id]=123..456@example '[subject]="Message with .. in Message-Id"'
test_emacs '(notmuch-search "id:\"123..456@example\"")