]> git.cworth.org Git - notmuch-old/log
notmuch-old
3 years agoemacs: use closures instead of backquoted lambdas
Jonas Bernoulli [Mon, 19 Jul 2021 11:31:05 +0000 (13:31 +0200)]
emacs: use closures instead of backquoted lambdas

3 years agoNEWS: user visible changes for 0.33
David Bremner [Thu, 26 Aug 2021 17:43:39 +0000 (10:43 -0700)]
NEWS: user visible changes for 0.33

Based on commits attributed to me in the output of

$ git shortlog 0.32.3..

3 years agodebian: changelog for 0.33~rc0-1 0.33_rc0 archive/debian/0.33_rc0-1 debian/0.33_rc0-1
David Bremner [Thu, 26 Aug 2021 15:28:21 +0000 (08:28 -0700)]
debian: changelog for 0.33~rc0-1

3 years agoversion: bump to 0.33~rc0
David Bremner [Thu, 26 Aug 2021 15:25:36 +0000 (08:25 -0700)]
version: bump to 0.33~rc0

3 years agodoc/emacs: use :code: for some missing references
David Bremner [Sun, 22 Aug 2021 03:51:09 +0000 (20:51 -0700)]
doc/emacs: use :code: for some missing references

It's not obvious how to reference (non-notmuch) emacs variables and
functions in a sphinx document.

3 years agodoc: read notmuch-tree.rsti for rst_epilog
David Bremner [Sun, 22 Aug 2021 03:51:08 +0000 (20:51 -0700)]
doc: read notmuch-tree.rsti for rst_epilog

This is needed so that docstrings from notmuch-tree.el (in particular
notmuch-tree-toggle-order) can be used in the emacs documentation.

3 years agoemacs/rstdoc: escape '*'
David Bremner [Sun, 22 Aug 2021 03:51:07 +0000 (20:51 -0700)]
emacs/rstdoc: escape '*'

This is just a regular character in docstrings (as it is fairly often
used in lisp identifiers and buffer names) but is the start of
emphasis in rst. This change is needed to quell a noisy warning when
including notmuch-tree.rsti

3 years agoCLI: define and use format version 5
David Bremner [Sun, 22 Aug 2021 00:00:11 +0000 (17:00 -0700)]
CLI: define and use format version 5

This is a bit of a cheat, since the format does not actually
change. On the other hand it is fairly common to do something like
this to shared libary SONAMEs when the ABI changes in some subtle way.
It does rely on the format-version argument being early enough on the
command line to generate a sensible error message.

3 years agoemacs: new command notmuch-tree-filter-by-tag
jao [Sun, 22 Aug 2021 00:50:49 +0000 (01:50 +0100)]
emacs: new command notmuch-tree-filter-by-tag

This new command for notmuch-tree-mode is analogous to
notmuch-search-filter-by-tag, bound to "t" in notmuch-search-mode; it
gets therefore the same "t" keybinding in notmuch-tree-mode (replacing
the current assignment to notmuch-search-by-tag).

3 years agoemacs: new command notmuch-tree-filter
jao [Sun, 22 Aug 2021 00:50:48 +0000 (01:50 +0100)]
emacs: new command notmuch-tree-filter

This command is analogous to notmuch-filter, but is defined on tree
mode buffers.

3 years agotest/path-config: use test_expect_equal_file_nonempty
David Bremner [Wed, 4 Aug 2021 10:42:33 +0000 (07:42 -0300)]
test/path-config: use test_expect_equal_file_nonempty

This is more robust against crashes when the expected output is also
generated by notmuch. In the case where the expected output is
explicit, it seems like overkill.

3 years agotest: add test_expect_equal_file_nonempty
David Bremner [Wed, 4 Aug 2021 10:42:32 +0000 (07:42 -0300)]
test: add test_expect_equal_file_nonempty

A common bug in tests is that the code used to generate the EXPECTED
file fails, generating no output. When the code generating the OUTPUT
file fails in the same way, the test passes, even though there is a
failure being hidden. Add a new test function that guards against
this.

3 years agotest: factor out test_diff_file_
David Bremner [Wed, 4 Aug 2021 10:42:31 +0000 (07:42 -0300)]
test: factor out test_diff_file_

A following commit will use this new function in a public test
function.

3 years agotest/expect_equal_file: whitespace cleanup
David Bremner [Wed, 4 Aug 2021 10:42:30 +0000 (07:42 -0300)]
test/expect_equal_file: whitespace cleanup

No functional change, just reindent to Emacs defaults.

3 years agodoc: document database search algorithm.
David Bremner [Wed, 4 Aug 2021 10:42:36 +0000 (07:42 -0300)]
doc: document database search algorithm.

Essentially a translation of the function _choose_database_path for
human consumption. As a bonus, document environment variable
NOTMUCH_DATABASE

3 years agoMerge tag 'debian/0.32.3-1'
David Bremner [Thu, 19 Aug 2021 04:46:42 +0000 (21:46 -0700)]
Merge tag 'debian/0.32.3-1'

notmuch release 0.32.3-1 for unstable (sid) [dgit]

[dgit distro=debian no-split --quilt=linear]

3 years agodebian: drop patches archive/debian/0.32.3-1 debian/0.32.3-1
David Bremner [Wed, 18 Aug 2021 05:05:32 +0000 (22:05 -0700)]
debian: drop patches

The relevant changes are of the 0.32.2 release

3 years agoMerge remote-tracking branch 'origin/debian/bullseye' into release
David Bremner [Wed, 18 Aug 2021 05:03:24 +0000 (22:03 -0700)]
Merge remote-tracking branch 'origin/debian/bullseye' into release

3 years agodebian: changelog for 0.32.3-1 0.32.3
David Bremner [Wed, 18 Aug 2021 00:18:21 +0000 (17:18 -0700)]
debian: changelog for 0.32.3-1

3 years agoversion: bump to 0.32.3
David Bremner [Wed, 18 Aug 2021 00:12:27 +0000 (17:12 -0700)]
version: bump to 0.32.3

3 years agoNEWS: news for 0.32.3
David Bremner [Wed, 18 Aug 2021 00:02:21 +0000 (17:02 -0700)]
NEWS: news for 0.32.3

3 years agoCLI/config: restore "notmuch config get built_with.*"
David Bremner [Sun, 18 Jul 2021 17:58:22 +0000 (14:58 -0300)]
CLI/config: restore "notmuch config get built_with.*"

We need to special case the config section "built_with" because it is
not (currently) handled by the library. This seems consist with the
other sub-sub-commands 'list' and 'set'.

3 years agotest/config: add tests for built_with
David Bremner [Sun, 18 Jul 2021 17:58:21 +0000 (14:58 -0300)]
test/config: add tests for built_with

The "get" test is known broken because this functionality was dropped
during the 0.32 config rewrite.

3 years agolib/open: look in MAILDIR for database, as documented.
David Bremner [Wed, 4 Aug 2021 10:42:35 +0000 (07:42 -0300)]
lib/open: look in MAILDIR for database, as documented.

This fixes the bug id:87bl9lx864.fsf@kisara.moe

3 years agotest: add known broken tests for finding database via MAILDIR
David Bremner [Wed, 4 Aug 2021 10:42:34 +0000 (07:42 -0300)]
test: add known broken tests for finding database via MAILDIR

This highlights a bug reported by several users, including
Mohsin Kaleem [1].

The inconsistent use of test_begin_subtest_known_broken is because
some of these tests pass even though the database cannot be
located. This problem is left for a future commit.

[1]: id:87bl9lx864.fsf@kisara.moe

3 years agolib: bump libnotmuch minor version
Austin Ray [Fri, 13 Aug 2021 16:50:28 +0000 (12:50 -0400)]
lib: bump libnotmuch minor version

Notmuch 0.32 corresponds to libnotmuch 5.4 as indicated by docstrings;
however, the minor number wasn't bumped. Any libnotmuch downstream
consumer using the LIBNOTMUCH_CHECK_VERSION macro to support multiple
versions won't be able to access the new 5.4 functions.

Signed-off-by: Austin Ray <austin@austinray.io>
3 years agolib: correct deprecated db open functions' docs
Austin Ray [Sat, 14 Aug 2021 22:39:17 +0000 (18:39 -0400)]
lib: correct deprecated db open functions' docs

Both notmuch_database_open() and notmuch_database_open_verbose()'s
documentation state they call notmuch_database_open_with_config() with
config_path=NULL; however, their implementations pass an empty string.
The empty string is the correct value to maintain their original
behavior of not loading the user's configuration so their documentation
is incorrect.

3 years agoperf-test: fix for verbose
Felipe Contreras [Sat, 26 Jun 2021 20:13:03 +0000 (15:13 -0500)]
perf-test: fix for verbose

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
3 years agoemacs: Refine scope of notmuch-jump-key face
Protesilaos Stavrou [Sat, 17 Jul 2021 08:30:18 +0000 (11:30 +0300)]
emacs: Refine scope of notmuch-jump-key face

The intent of the 'notmuch-jump-key' face is to allow users/themes to
differentiate the text of the minibuffer prompt from the keys that are
associated with jump actions.  Commit 5cc106b0 correctly introduced the
'notmuch-jump-key' face for keys, but mistakenly applied it to the
prompt as well.

3 years agoemacs: honour notmuch-show-text/html-blocked-images in w3m messages
jao [Wed, 4 Aug 2021 00:02:41 +0000 (01:02 +0100)]
emacs: honour notmuch-show-text/html-blocked-images in w3m messages

When mm-text-html-renderer is set to 'w3m, the variable playing the
role of a regular expression for blocked images is
w3m-ignored-image-url-regexp.  We bind it when the renderer is not
'shr.

3 years agotest: revert to mkdir -p to make results directory.
David Bremner [Tue, 3 Aug 2021 23:35:13 +0000 (20:35 -0300)]
test: revert to mkdir -p to make results directory.

As suggested by id:m21r7al3mt.fsf@guru.guru-group.fi

3 years agoruby: cleanup object_destroy()
Felipe Contreras [Tue, 3 Aug 2021 18:44:57 +0000 (13:44 -0500)]
ruby: cleanup object_destroy()

It was assumed the destructor of notmuch_rb_database_type did return a
notmuch_status_t because that's what notmuch_database_close returns, and
that value was checked by notmuch_rb_database_close in order to decide
if to raise an exception.

It turns out notmuch_database_destroy was called instead, so nothing was
returned (void).

All the destroy functions are void, and that's what we want.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
3 years agotest: use --minversion to detect GNU Parallel.
David Bremner [Mon, 2 Aug 2021 11:21:42 +0000 (08:21 -0300)]
test: use --minversion to detect GNU Parallel.

Based on a suggestion of Ole Tange [1].

[1]: id:CA+4vN7x6jp4HCiEybZ=5g+2X6Pa7etBFX3Bbd=UYty37gR6wEQ@mail.gmail.com

3 years agoFix author-scan.sh on BSD systems.
Matt Armstrong [Sat, 13 Feb 2021 18:22:43 +0000 (10:22 -0800)]
Fix author-scan.sh on BSD systems.

BSD xargs does not have the -d option. Here we use tr to convert
newlines to NUL characters, then pass -0 to xargs (which BSD does
support).

I looked at passing -z to 'git ls-files', but I did not find a BSD
grep option to turn on NUL deliminted line processing.

3 years agodoc: drop note about early versions of Xapian
David Bremner [Mon, 2 Aug 2021 10:14:03 +0000 (07:14 -0300)]
doc: drop note about early versions of Xapian

Mathias Beyer [1] points out that this note is redudant since Xapian
no longer builds with the problematic versions of Xapian.

[1]: id:20210207124404.yldgtzjrsagacrl4@hoshi

3 years agoruby: split database close and destroy
Felipe Contreras [Wed, 7 Jul 2021 03:45:32 +0000 (22:45 -0500)]
ruby: split database close and destroy

Mirrors the C API: 7864350c (Split notmuch_database_close into two
functions, 2012-04-25).

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
3 years agocli: remove extraneous space in message
Simon Branch [Sun, 29 Nov 2020 22:35:22 +0000 (14:35 -0800)]
cli: remove extraneous space in message

3 years agoemacs: notmuch-tree: mark the initial message at point as read
Jonas Bernoulli [Tue, 16 Feb 2021 00:01:38 +0000 (01:01 +0100)]
emacs: notmuch-tree: mark the initial message at point as read

When moving between message in a tree or show buffer, the message at
point is marked as read.  Likewise when creating such a buffer, then
the message that is initially at point is supposed to be marked as
read as well.

The latter worked for `notmuch-show' but not for `notmuch-tree'.
Press "RET" or "M-RET" in a search buffer to observe these behaviors.

In both cases the marking is supposed to be done by the function
`notmuch-show-command-hook'.  In the case of `notmuch-show' that
function is added directly to `post-command-hook'.

`notmuch-tree' instead adds the function `notmuch-tree-command-hook'
to `post-command-hook' and that calls `notmuch-show-command-hook',
in the respective show buffer, but of course only if that exists.

Because the tree buffer is created asynchronously, the show buffer
doesn't exist yet by the time the `post-command-hook' is run, so
we have to explicitly run `notmuch-tree-command-hook' once the
show buffer exists.

The show buffer is created when `notmuch-tree-goto-and-insert-msg'
calls `notmuch-tree-show-message-in'.  `notmuch-tree-process-filter'
is what finally brings us here.

3 years agoemacs: remove useless lexically bound variable
David Bremner [Wed, 7 Jul 2021 01:51:08 +0000 (22:51 -0300)]
emacs: remove useless lexically bound variable

A let binding without a value is just an obfuscated way of saying
nil, especially if you are not going to mutate the variable.

3 years agoruby: enable garbage collection using talloc
Felipe Contreras [Mon, 17 May 2021 19:39:15 +0000 (14:39 -0500)]
ruby: enable garbage collection using talloc

We basically steal all the objects from their notmuch parents, therefore
they are completely under Ruby's gc control.

The order at which these objects are freed does not matter any more,
because destroying the database does not destroy all the children
objects, since they belong to Ruby now.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
3 years agoruby: create an actual wrapper struct
Felipe Contreras [Mon, 17 May 2021 19:39:14 +0000 (14:39 -0500)]
ruby: create an actual wrapper struct

Currently Ruby data points directly to a notmuch object (e.g.
notmuch_database_t), since we don't need any extra data that is fine.

However, in the next commit we will need extra data, therefore we create
a new struct notmuch_rb_object_t wrapper which contains nothing but a
pointer to the current pointer (e.g. notmuch_database_t).

This struct is tied to the Ruby object, and is freed when the Ruby
object is freed by the garbage collector.

We do nothing with this wrapper, so no functionality should be changed.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
3 years agoperf-test: add ruby test
Felipe Contreras [Sat, 26 Jun 2021 20:07:14 +0000 (15:07 -0500)]
perf-test: add ruby test

Simply list the message-id of all the messages in a loop 100 times.

Suggested-by: David Bremner <david@tethera.net>
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
3 years agoemacs: update declaration of notmuch-tree
David Bremner [Wed, 7 Jul 2021 01:35:30 +0000 (22:35 -0300)]
emacs: update declaration of notmuch-tree

This fixes an a warning from the byte-compiler.  The commit
74ab62a34018b38a40db4d363fff3faae964b47a changed the function
signature but did not update the declaration.

3 years agoemacs: fix typo in variable name
David Bremner [Wed, 7 Jul 2021 01:25:57 +0000 (22:25 -0300)]
emacs: fix typo in variable name

This error crept in during my style rewrite of dkg's proposed change.

3 years agoreplace references to freenode with references to libera
David Bremner [Tue, 6 Jul 2021 20:19:03 +0000 (17:19 -0300)]
replace references to freenode with references to libera

I left the reference to freenode in the test suite data, since it is
historical.

3 years agodoc: new notmuch show --sort and related emacs commands
jao [Fri, 2 Jul 2021 20:44:24 +0000 (21:44 +0100)]
doc: new notmuch show --sort and related emacs commands

New --sort CLI option documented in notmuch-show's man page, and
notmuch-search-toggle-order mentioned in doc/notmuch-emacs.rst and
devel/emacs-keybindings.org (in the latter, there's also some
whitespace changes in a table introduced by org-mode).

3 years agoemacs/tree: command to toggle search sort order in tree mode
jao [Fri, 2 Jul 2021 20:44:23 +0000 (21:44 +0100)]
emacs/tree: command to toggle search sort order in tree mode

New command notmuch-tree-toggle-order for switching the sort order (by
reissuing the search with a different flag) in a notmuch-tree buffer.

3 years agoemacs/hello: honouring :sort-order in threaded queries
jao [Fri, 2 Jul 2021 20:44:22 +0000 (21:44 +0100)]
emacs/hello: honouring :sort-order in threaded queries

Now that notmuch show accepts --sort, we can, on the emacs side, use
it according to the value of :sort-order in the definition of saved
queries.

3 years agoCLI/show: tests for the new --sort option
jao [Fri, 2 Jul 2021 20:44:21 +0000 (21:44 +0100)]
CLI/show: tests for the new --sort option

New unit tests for notmuch show --sort, covering the basic use cases.

3 years agoCLI/show: accept --sort
jao [Fri, 2 Jul 2021 20:44:20 +0000 (21:44 +0100)]
CLI/show: accept --sort

Add the command-line option --sort to the show command of the CLI
notmuch interface, with the same possible values as the same option in
notmuch search.

3 years agotest: deduplicate T590
Michael J Gruber [Tue, 29 Jun 2021 15:29:20 +0000 (17:29 +0200)]
test: deduplicate T590

Test numbers are a concise way to communicate about tests and to remeber
them. Currently, there is one pait of duplicates:

T590-libconfig.sh
T590-thread-breakage.sh

Renumber the latter one to 592 since this keeps the alphabetic order and
leaves room in between.

Signed-off-by: Michael J Gruber <git@grubix.eu>
3 years agodebian: document new build-dependency debian/bullseye archive/debian/0.31.4-2 debian/0.31.4-2
David Bremner [Tue, 29 Jun 2021 01:48:29 +0000 (22:48 -0300)]
debian: document new build-dependency

3 years agoCommit Debian 3.0 (quilt) metadata
David Bremner [Tue, 29 Jun 2021 01:44:24 +0000 (22:44 -0300)]
Commit Debian 3.0 (quilt) metadata

[dgit (9.13) quilt-fixup]

3 years agodebian: add xapian-tools for tests
David Bremner [Sat, 24 Apr 2021 15:13:37 +0000 (12:13 -0300)]
debian: add xapian-tools for tests

xapian-metadata is used by some of the new tests.

(cherry picked from commit 9f8458a998a0a20f435b5d47ac085acb9490ddae)

3 years agodebian/changelog: refinalize for upload
David Bremner [Tue, 29 Jun 2021 01:09:54 +0000 (22:09 -0300)]
debian/changelog: refinalize for upload

3 years agoemacs/tree use notmuch-show-single-message
David Bremner [Sat, 26 Jun 2021 12:04:28 +0000 (09:04 -0300)]
emacs/tree use notmuch-show-single-message

This is more efficient than notmuch-show-only-matching-messages, since
we do not parse the potentially large thread structure to find a
single message.

This is only a partial fix for notmuch-tree view, because displaying
the thread structure in the tree-mode window still crashes on long
threads. It is however enough to make unthreaded view handle long
threads.

3 years agoemacs/show: add parameter notmuch-show-single-message
David Bremner [Sat, 26 Jun 2021 12:04:27 +0000 (09:04 -0300)]
emacs/show: add parameter notmuch-show-single-message

This dynamically bound variable can be set when the caller of
notmuch-show guarantees that exactly one message will match the
query. It avoids transporting and parsing the complete thread
structure.

3 years agotest: start test file for emacs unthreaded view.
David Bremner [Sat, 26 Jun 2021 12:04:26 +0000 (09:04 -0300)]
test: start test file for emacs unthreaded view.

Initial focus is on behaviour with large threads.

The second test replicates a bug reported by Alan Schmitt in
id:87lf7sojbq.fsf@m4x.org.

3 years agoemacs: remap send-message and send-message-and-exit
edef [Sun, 13 Jun 2021 08:23:58 +0000 (08:23 +0000)]
emacs: remap send-message and send-message-and-exit

All three of C-c C-c, <menu-bar> <Message> <Send Message>,
and <tool-bar> <Send Message> are bound to message-send-and-exit by
message.el, but notmuch-mua.el only had an explicit override for the
keyboard binding. This mostly manifests as confusing Fcc behaviour for
GUI users.

Patching the bindings for specific keys is rather brittle, since it has
to be aware of every relevant binding. This change switches to instead
using a remap binding, which turns any binding for message-send or
message-send-and-exit into a binding for the corresponding notmuch-mua
command.

3 years agoruby: add keyword arguments to db.query
Felipe Contreras [Mon, 24 May 2021 02:19:09 +0000 (21:19 -0500)]
ruby: add keyword arguments to db.query

That way we don't need pass them to the query object ourselves.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
3 years agolib: update transaction documentation
David Bremner [Sat, 22 May 2021 11:07:17 +0000 (08:07 -0300)]
lib: update transaction documentation

Partly this is to recognize the semantics we inherit from Xapian,
partly to mention the new autocommit feature.

3 years agodoc: document database.autocommit variable
David Bremner [Sat, 22 May 2021 01:06:02 +0000 (22:06 -0300)]
doc: document database.autocommit variable

This exposes some database internals that most users will probably not
understand.

3 years agolib: autocommit after some number of completed transactions
David Bremner [Tue, 18 May 2021 02:06:01 +0000 (23:06 -0300)]
lib: autocommit after some number of completed transactions

This change addresses two known issues with large sets of changes to
the database.  The first is that as reported by Steven Allen [1],
notmuch commits are not "flushed" when they complete, which means that
if there is an open transaction when the database closes (or e.g. the
program crashes) then all changes since the last commit will be
discarded (nothing is irrecoverably lost for "notmuch new", as the
indexing process just restarts next time it is run).  This does not
really "fix" the issue reported in [1]; that seems rather difficult
given how transactions work in Xapian. On the other hand, with the
default settings, this should mean one only loses less than a minutes
worth of work.  The second issue is the occasionally reported "storm"
of disk writes when notmuch finishes. I don't yet have a test for
this, but I think committing as we go should reduce the amount of work
when finalizing the database.

[1]: id:20151025210215.GA3754@stebalien.com

3 years agotest: add known broken test for closing with open transaction
David Bremner [Tue, 18 May 2021 10:55:23 +0000 (07:55 -0300)]
test: add known broken test for closing with open transaction

The expected output may need adjusting, but what is clear is that
saving none of the changes is not desirable.

3 years agolib/config: add NOTMUCH_CONFIG_AUTOCOMMIT
David Bremner [Fri, 21 May 2021 15:54:10 +0000 (12:54 -0300)]
lib/config: add NOTMUCH_CONFIG_AUTOCOMMIT

This will be used to control how often atomic transactions are
committed.

3 years agodatabase/close: remove misleading code / comment
David Bremner [Tue, 18 May 2021 11:03:22 +0000 (08:03 -0300)]
database/close: remove misleading code / comment

Unfortunately, it doesn't make a difference if we call
cancel_transaction or not, all uncommited changes are discarded if
there is an open (unflushed) transaction.

3 years agolib/database: fix style mistake.
David Bremner [Sun, 27 Jun 2021 16:52:43 +0000 (13:52 -0300)]
lib/database: fix style mistake.

The spacing of the declaration was wrong in ea30110.

3 years agoemacs: use new face for notmuch-jump and related
Protesilaos Stavrou [Fri, 21 May 2021 16:55:31 +0000 (19:55 +0300)]
emacs: use new face for notmuch-jump and related

The minibuffer-prompt face that was used before made it impossible to
differentiate between two distinct UI elements: (i) the prompt's text
which itself cannot be acted upon, (ii) the actionable keys used to
jump to searches/tags.

The use of a named face, notmuch-jump-key, makes it possible for users
or theme developers to apply properties that are specific to each of
those two cases.

In the interest of backward compatibility, the new face inherits from
minibuffer-prompt.

3 years agoMerge tag '0.32.2'
David Bremner [Sun, 27 Jun 2021 12:34:00 +0000 (09:34 -0300)]
Merge tag '0.32.2'

notmuch 0.32.2 release

3 years agoNEWS: finalize for 0.32.2 0.32.2
David Bremner [Sun, 27 Jun 2021 11:56:21 +0000 (08:56 -0300)]
NEWS: finalize for 0.32.2

3 years agochangelog for 0.31.4-2
David Bremner [Sun, 27 Jun 2021 01:44:36 +0000 (22:44 -0300)]
changelog for 0.31.4-2

3 years agolib/n_d_index_file: re-use thread-id of existing message
David Bremner [Sat, 15 May 2021 18:40:22 +0000 (15:40 -0300)]
lib/n_d_index_file: re-use thread-id of existing message

This prevents the message document getting multiple thread-id terms
when there are multiple files with the same message-id.

This change shifts some thread ids, requiring adjustments to other tests.

(cherry picked from commit 3f4de98e7c8c70f9a86a4f899147126f79907bd9)

3 years agodebian: changelog for 0.32.2-1
David Bremner [Sun, 27 Jun 2021 01:34:30 +0000 (22:34 -0300)]
debian: changelog for 0.32.2-1

3 years agoNEWS: mention fix for memory leak.
David Bremner [Sun, 27 Jun 2021 01:26:09 +0000 (22:26 -0300)]
NEWS: mention fix for memory leak.

3 years agoemacs: Prefer email address over User ID when showing valid signature
Daniel Kahn Gillmor [Thu, 27 May 2021 01:44:59 +0000 (21:44 -0400)]
emacs: Prefer email address over User ID when showing valid signature

Most concrete verification steps are likely only taken on the e-mail
address in the first place, and e-mail addresses render more
intelligibly than arbitrary User IDs in the first place.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Amended-by: db, apply dme restructuring suggestions.
3 years agocli/show: produce "email" element in sigstatus
Daniel Kahn Gillmor [Thu, 27 May 2021 01:44:58 +0000 (21:44 -0400)]
cli/show: produce "email" element in sigstatus

When the certificate that signs a message is known to be valid, GMime
is capable of reporting on the e-mail address embedded in the
certificate.

We pass this information along to the caller of "notmuch show", as
often only the e-mail address of the certificate has actually been
checked/verified.

Furthermore, signature verification should probably at some point
compare the e-mail address of the caller against the sender address of
the message itself.  Having to parse what gmime thinks is a "userid"
to extract an e-mail address seems clunky and unnecessary if gmime
already thinks it knows what the e-mail address is.

See id:878s41ax6t.fsf@fifthhorseman.net for more motivation and discussion.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
3 years agoMerge branch 'release'
David Bremner [Fri, 25 Jun 2021 12:34:29 +0000 (09:34 -0300)]
Merge branch 'release'

3 years agolib: write talloc report in notmuch_database_destroy
David Bremner [Sat, 19 Jun 2021 00:59:43 +0000 (21:59 -0300)]
lib: write talloc report in notmuch_database_destroy

Since most memory allocation is (ultimately) in the talloc context
defined by a notmuch_database_t pointer, this gives a more complete
view of memory still allocated at program shutdown.

We also change the talloc report in notmuch.c to mode "a" to avoid
clobbering the newly reported log.

3 years agolib/config: fix memory leak
David Bremner [Sat, 19 Jun 2021 00:59:44 +0000 (21:59 -0300)]
lib/config: fix memory leak

This commit fixes a small memory leak (per iterator restart) by
actually using the talloc context intended to be blown away on
restart.

3 years agoversion: bump to 0.32.2
David Bremner [Fri, 25 Jun 2021 12:02:54 +0000 (09:02 -0300)]
version: bump to 0.32.2

3 years agoemacs: Add compatibility for org-msg.el
Ori [Thu, 24 Jun 2021 19:43:58 +0000 (15:43 -0400)]
emacs: Add compatibility for org-msg.el

Enable `notmuch-company` with `org-msg`, which does not derive from
`message-mode` in composing. This change was first proposed in the
discussion here:
https://github.com/jeremy-compostella/org-msg/issues/53

3 years agodoc: tweak hook configuration documentation.
David Bremner [Tue, 22 Jun 2021 23:08:13 +0000 (20:08 -0300)]
doc: tweak hook configuration documentation.

Add a historical note, and hint to look below for more about hooks.
Capitalized the heading for consistency, removed blank line.

3 years agotest/libconfig: make indexing more consistent
David Bremner [Sat, 19 Jun 2021 13:31:16 +0000 (10:31 -0300)]
test/libconfig: make indexing more consistent

The other tests have converted to two digit decimal, the commit does
the same to the remaining test that was printing out indices in hex.

3 years agoMerge branch 'release'
David Bremner [Sun, 20 Jun 2021 20:15:20 +0000 (17:15 -0300)]
Merge branch 'release'

3 years agoNEWS: fix typo
David Bremner [Sun, 20 Jun 2021 19:59:30 +0000 (16:59 -0300)]
NEWS: fix typo

Oops. Apparently our release checks do not check the spelling of
UNRELEASED (although Tomi's wiki conversion script does).

3 years agoNEWS: start NEWS for 0.32.2
David Bremner [Sun, 20 Jun 2021 19:41:03 +0000 (16:41 -0300)]
NEWS: start NEWS for 0.32.2

3 years agoemacs: require seq for seq-some
David Bremner [Tue, 8 Jun 2021 23:12:33 +0000 (20:12 -0300)]
emacs: require seq for seq-some

Although the function dates from 2015, the autoload is newer. In
particular [1] it is not found in Emacs 25.3.

[1]: id:874ke85tqx.fsf@cgc-instruments.com

3 years agotest: check openssl prequisite for add_gpgsm_home
David Bremner [Tue, 8 Jun 2021 19:39:10 +0000 (16:39 -0300)]
test: check openssl prequisite for add_gpgsm_home

This is a fix for the test failures reported by Dan Čermák [1].

It is more robust to check for the prerequisite inside the function
that uses it, rather than in every test file that calls the function.

[1]: id:87k0n4fqgm.fsf@tethera.net

3 years agotest: aggregate-results updates
Tomi Ollila [Mon, 17 May 2021 08:11:09 +0000 (11:11 +0300)]
test: aggregate-results updates

notmuch-test will now call aggregate-results.sh with file list
that it compiles based on the test ran, and aggregate-results
will report failure is any of the test files are missing.

With this notmuch-test no longer has to exit in non-parallel
run if some test fail to write its report file -- so it works
as parallel tests in this sense.

Changed test_done() in test-lib.sh write report file in one write(2),
so there is (even) less chance it being partially written. Also,
now it writes 'total' last and aggregate-results.sh expects this
line to exist in all report files for reporting to be successful.

Added 'set -eu' to notmuch-test and modified code to work with
these settings. That makes it harder to get mistakes slipped
into committed code.

3 years agolib/message: use passed database for error handling
David Bremner [Mon, 24 May 2021 00:08:29 +0000 (21:08 -0300)]
lib/message: use passed database for error handling

'message' should always be initialized if we reach here, but in case it
is not, we still want to be able to log an error message.

3 years agolib/{open,message}: make some internal functions static
David Bremner [Mon, 24 May 2021 00:08:28 +0000 (21:08 -0300)]
lib/{open,message}: make some internal functions static

They are not used outside their file, so being extern seems like an oversight

3 years agoemacs: update default mailing list archives for stashing links
Jani Nikula [Fri, 21 May 2021 12:51:26 +0000 (15:51 +0300)]
emacs: update default mailing list archives for stashing links

Gmane web interface is long gone, remove it. Make MARC the new
default. Update LKML to Lore, where it already redirects anyway. Also
add Notmuch web archive.

3 years agotest: add known broken test for indexing RFC822 group names
David Bremner [Wed, 24 Mar 2021 00:24:05 +0000 (21:24 -0300)]
test: add known broken test for indexing RFC822 group names

Austin Clements diagnosed this indexing problem in [1].

[1]: id:20130711215207.GR2214@mit.edu

3 years agoemacs: fix declare-function definitions with related line breaks
Tomi Ollila [Sat, 16 Jan 2021 17:17:09 +0000 (19:17 +0200)]
emacs: fix declare-function definitions with related line breaks

- declare-function notmuch-unthreaded lacked file name
- declare-function notmuch-search had differently named last arg
  - note: check-declare-directory did not complain about that
- declare-function notmuch-search-show-thread without nil
- some functions declared to be in different file than those
  existed ("notmuch" -> "notmuch-lib")

- some related function/declare lines were (/are now) wider than
  80-columns; added line breaks (and proper indentation) there

3 years agoemacs: drop setting mail-user-agent, and document how to set it
David Bremner [Fri, 4 Jun 2021 23:05:31 +0000 (20:05 -0300)]
emacs: drop setting mail-user-agent, and document how to set it

After some discussion [1], I decided it is better to make notmuch users
who rely on this behaviour customize mail-user-agent. This is
consistent with the behaviour of other emacs mail packages.

[1]: id:87k0nuhfrk.fsf@toryanderson.com

3 years agotest: source $NOTMUCH_SRCDIR/test/test-lib-emacs.sh
Tomi Ollila [Sun, 23 May 2021 07:34:43 +0000 (10:34 +0300)]
test: source $NOTMUCH_SRCDIR/test/test-lib-emacs.sh

Sourcing test-lib.sh will cd to TMP_DIRECTORY, so
relative path in $0 will not work in previous version
 . $(dirname "$0")/test-lib-emacs.sh

Now individual test scripts -- e.g. ./test/T310-emacs.sh
will work.

3 years agoMerge remote-tracking branch 'origin/release'
David Bremner [Mon, 31 May 2021 23:26:31 +0000 (20:26 -0300)]
Merge remote-tracking branch 'origin/release'

3 years agoNEWS/emacs: document changes in 0.32 that affect keybindings.
Daniel Kahn Gillmor [Thu, 27 May 2021 16:58:37 +0000 (12:58 -0400)]
NEWS/emacs: document changes in 0.32 that affect keybindings.

See list discussion in thread starting with
id:87h7ip2baq.fsf@fifthhorseman.net for more details.

Signed-off-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Amended-by: David Bremner (s/.emacs/Emacs configuration/)
3 years agoruby: use notmuch_exclude_t enum
Felipe Contreras [Sat, 1 May 2021 12:04:46 +0000 (07:04 -0500)]
ruby: use notmuch_exclude_t enum

It exists since 2013, let's allow it to be used in Ruby.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
3 years agotest: add regression test for large number of deletions
David Bremner [Sat, 24 Apr 2021 23:02:43 +0000 (20:02 -0300)]
test: add regression test for large number of deletions

Prior to 9ad19e4454f there was an unhandled Xapian exception when
reindexing after a large number of deletes.  This test was used for
bisection, and will subsequently serve as a regression test.