]> git.notmuchmail.org Git - notmuch/log
notmuch
3 years agoMerge tag '0.33.1'
David Bremner [Sat, 11 Sep 2021 00:02:10 +0000 (21:02 -0300)]
Merge tag '0.33.1'

notmuch 0.33.1 release

3 years agodebian: drop debian specific test exclusion 0.33.1 archive/debian/0.33.1-1 debian/0.33.1-1
David Bremner [Fri, 10 Sep 2021 11:30:24 +0000 (08:30 -0300)]
debian: drop debian specific test exclusion

In principle these tests should pass now.

3 years agodebian: changelog for 0.33.1-1
David Bremner [Fri, 10 Sep 2021 11:30:07 +0000 (08:30 -0300)]
debian: changelog for 0.33.1-1

3 years agoNEWS: update for 0.33.1
David Bremner [Fri, 10 Sep 2021 11:28:04 +0000 (08:28 -0300)]
NEWS: update for 0.33.1

3 years agoversion: bump to 0.33.1
David Bremner [Fri, 10 Sep 2021 11:21:28 +0000 (08:21 -0300)]
version: bump to 0.33.1

3 years agolib: use 'localhost' rather than fqdn for default mail address.
David Bremner [Thu, 9 Sep 2021 12:51:03 +0000 (09:51 -0300)]
lib: use 'localhost' rather than fqdn for default mail address.

As discussed in the thread starting at [1], the fully qualified domain
name is a bit tricky to get reproducibly, might reveal information
people prefer to keep private, and somewhat unlikely to provide
reliable mail routing.

The new approach of $current_username@localhost is better for the
first two considerations, and probably at least as good as a test mail
address.

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

3 years agotest/emacs: test for functions in notmuch-search-result-format.
David Bremner [Mon, 30 Aug 2021 19:49:06 +0000 (12:49 -0700)]
test/emacs: test for functions in notmuch-search-result-format.

Based on the commit message in id:20210221151902.2301690-3-dme@dme.org

Add the function notmuch-test-result-flags to test-lib.el to avoid
repeating it in 3 T*.sh files.

3 years agoemacs: Allow functions in notmuch-{tree,unthreaded}-result-format
David Edmondson [Sun, 21 Feb 2021 15:19:02 +0000 (15:19 +0000)]
emacs: Allow functions in notmuch-{tree,unthreaded}-result-format

If the car of an element in notmuch-tree-result-format or
notmuch-unthreaded-result-format is a function, insert the result of
calling the function into the buffer.

3 years agoemacs: Allow functions in notmuch-search-result-format
David Edmondson [Sun, 21 Feb 2021 15:19:01 +0000 (15:19 +0000)]
emacs: Allow functions in notmuch-search-result-format

If the car of an element in notmuch-search-result-format is a
function, insert the result of calling the function into the buffer.

This allows a user to generate custom fields in the output of a search
result. For example, with:

(defun -notmuch-result-flags (format-string result)
  (let ((tags-to-letters '(("flagged" . "!")
   ("unread" . "u")
   ("mine" . "m")
   ("sent" . "s")
   ("replied" . "r")))
(tags (plist-get result :tags)))

    (format format-string
    (mapconcat (lambda (t2l)
 (if (member (car t2l) tags)
     (cdr t2l)
   " "))
       tags-to-letters ""))))

(setq notmuch-search-result-format '((-notmuch-result-flags . "%s ")
     ("date" . "%12s ")
     ("count" . "%9s ")
     ("authors" . "%-30s ")
     ("subject" . "%s ")
     ("tags" . "(%s)")))

The first few characters on each line of the search result are used to
show information about some significant tags associated with the
thread.

3 years agoemacs: Use pcase in notmuch-search-insert-field
David Edmondson [Sun, 21 Feb 2021 15:19:00 +0000 (15:19 +0000)]
emacs: Use pcase in notmuch-search-insert-field

Rather than lots of string-equal calls, use the pcase macro.

3 years agoemacs: notmuch-fcc-header-setup: fix regression
Jonas Bernoulli [Mon, 2 Aug 2021 22:10:08 +0000 (00:10 +0200)]
emacs: notmuch-fcc-header-setup: fix regression

With [1: 16b2db09] we lost the (undocumented) option to use no Fcc
header only for From addresses matching a regexp.  This brings back
that feature and documents it.

1: 2021-01-15 16b2db0986ce0ed7c420a69d0a98bb41e9ca4bd8
   emacs: various cosmetic improvements

3 years agoNEWS: typo fix; some trailing periods
Tomi Ollila [Mon, 6 Sep 2021 21:07:11 +0000 (00:07 +0300)]
NEWS: typo fix; some trailing periods

The trailing periods to smaller diff between devel/news2wiki.pl
output and what has been pushed to notmuch-wiki.

3 years agodoc/sexp-queries: update synopsis and description
David Bremner [Tue, 24 Aug 2021 15:17:45 +0000 (08:17 -0700)]
doc/sexp-queries: update synopsis and description

I chose to go with a somewhat terse synopsis to try to keep the length
of the page down.

3 years agoCLI/tag: enable sexp queries
David Bremner [Tue, 24 Aug 2021 15:17:44 +0000 (08:17 -0700)]
CLI/tag: enable sexp queries

We have to rewrite _optimize_tag_query here because it is generating
a query string in the infix Xapian syntax. Luckily this is easy to do
with the sexp query syntax.

3 years agoCLI/{count, dump, reindex, reply, show}: enable sexp queries
David Bremner [Tue, 24 Aug 2021 15:17:43 +0000 (08:17 -0700)]
CLI/{count, dump, reindex, reply, show}: enable sexp queries

The change in each case is to call notmuch_query_create_with_syntax,
relying on the already inherited shared options.  As a bonus we get
improved error handling from the new query creation API.

The remaining subcommand is 'tag', which is a bit trickier.

3 years agoCLI: move query syntax to shared option
David Bremner [Tue, 24 Aug 2021 15:17:42 +0000 (08:17 -0700)]
CLI: move query syntax to shared option

This will allow easy addition of a query syntax option to other subcommands.

3 years agolib/parse-sexp: apply macros
David Bremner [Tue, 24 Aug 2021 15:17:41 +0000 (08:17 -0700)]
lib/parse-sexp: apply macros

Macros implement lazy evaluation and lexical scope.  The former is
needed to make certain natural constructs work sensibly (e.g. (tag
,param)) but the latter is mainly future-proofing in case the DSL is
is extended to allow local bindings.

For technical background, see chapters 6 and 17 of [1] (or some other
intermediate programming languages textbook).

[1] http://cs.brown.edu/courses/cs173/2012/book/

3 years agolib/parse-sexp: thread environment argument through parser
David Bremner [Tue, 24 Aug 2021 15:17:40 +0000 (08:17 -0700)]
lib/parse-sexp: thread environment argument through parser

No functionality change, just an extra argument carried everywhere.

3 years agolib/parse-sexp: support saved s-expression queries
David Bremner [Tue, 24 Aug 2021 15:17:39 +0000 (08:17 -0700)]
lib/parse-sexp: support saved s-expression queries

It turns out there is not really much code in query-fp.cc useful for
supporting the new syntax. The code we could potentially factor out
amounts to calling notmuch_database_get_config; both the key
construction and the parsing of the results are specific to the query
syntax involved.

3 years agoCLI/config support saving s-expression queries
David Bremner [Tue, 24 Aug 2021 15:17:38 +0000 (08:17 -0700)]
CLI/config support saving s-expression queries

This commit does not enable using saved s-expression queries, only
saving and retrieving them from the config file or the database. Use
in queries will be enabled in a following commit.

3 years agolib/parse-sexp: handle saved queries
David Bremner [Tue, 24 Aug 2021 15:17:37 +0000 (08:17 -0700)]
lib/parse-sexp: handle saved queries

This provides functionality analogous to query: in the Xapian
QueryParser based parser. Perhaps counterintuitively, the saved
queries currently have to be in the original query syntax (i.e. not
s-expressions).

3 years agolib: factor out expansion of saved queries.
David Bremner [Tue, 24 Aug 2021 15:17:36 +0000 (08:17 -0700)]
lib: factor out expansion of saved queries.

This is intended to allow use outside of the Xapian query parser.

3 years agolib/parse-sexp: parse user headers
David Bremner [Tue, 24 Aug 2021 15:17:35 +0000 (08:17 -0700)]
lib/parse-sexp: parse user headers

One subtle aspect is the replacement of _find_prefix with
_notmuch_database_prefix, which understands user headers. Otherwise
the code mainly consists of creating a fake prefix record (since the
user prefixes are not in the prefix table) and error handling.

3 years agolib/parse-sexp: support infix subqueries
David Bremner [Tue, 24 Aug 2021 15:17:34 +0000 (08:17 -0700)]
lib/parse-sexp: support infix subqueries

This is necessary so that programs can take infix syntax queries from
a user and use the sexp query syntax to construct e.g. a refinement of
that query.

3 years agolib/parse-sexp: expand queries
David Bremner [Tue, 24 Aug 2021 15:17:33 +0000 (08:17 -0700)]
lib/parse-sexp: expand queries

The code here is just gluing together _notmuch_query_expand with the
existing sexp parser infrastructure.

3 years agolib/thread-fp: factor out query expansion, rewrite in Xapian
David Bremner [Tue, 24 Aug 2021 15:17:32 +0000 (08:17 -0700)]
lib/thread-fp: factor out query expansion, rewrite in Xapian

It will be convenient not to have to construct a notmuch query object
when parsing subqueries, so the commit rewrites the query
expansion (currently only used for thread:{} queries) using only
Xapian. As a bonus it seems about 15% faster in initial experiments.

3 years agolib/query: factor out _notmuch_query_string_to_xapian_query
David Bremner [Tue, 24 Aug 2021 15:17:31 +0000 (08:17 -0700)]
lib/query: factor out _notmuch_query_string_to_xapian_query

When dealing with recursive queries (i.e. thread:{foo}) it turns out
to be useful just to deal with the underlying Xapian objects, and not
wrap them in notmuch objects.

3 years agolib: generate actual Xapian query for "*" and ""
David Bremner [Tue, 24 Aug 2021 15:17:30 +0000 (08:17 -0700)]
lib: generate actual Xapian query for "*" and ""

The previous code had the somewhat bizarre effect that the (notmuch
specific) query string was "*" (interpreted as MatchAll) and the
allegedly parsed xapian_query was "MatchNothing".

This commit also reduces code duplication.

3 years agolib/parse-sexp: support regular expressions
David Bremner [Tue, 24 Aug 2021 15:17:29 +0000 (08:17 -0700)]
lib/parse-sexp: support regular expressions

At least to the degree that the Xapian QueryParser based parser
also supports them. Support short alias 'rx' as it seems to make more
complex queries nicer to read.

3 years agolib: factor out query construction from regexp
David Bremner [Tue, 24 Aug 2021 15:17:28 +0000 (08:17 -0700)]
lib: factor out query construction from regexp

This will allow re-use of this code outside of the Xapian query parser.

3 years agolib/query: generalize exclude handling to s-expression queries
David Bremner [Tue, 24 Aug 2021 15:17:27 +0000 (08:17 -0700)]
lib/query: generalize exclude handling to s-expression queries

In fact most of the code path is in common, only the caching of terms
in the query needs to be added for s-expression queries.

3 years agolib/parse-sexp: handle unprefixed terms.
David Bremner [Tue, 24 Aug 2021 15:17:26 +0000 (08:17 -0700)]
lib/parse-sexp: handle unprefixed terms.

This is equivalent to adding the same field name "" for multiple
prefixes in the Xapian query parser, but we have to explicitely
construct the resulting query.

3 years agolib/parse-sexp: add '*' as syntactic sugar for '(starts-with "")'
David Bremner [Tue, 24 Aug 2021 15:17:25 +0000 (08:17 -0700)]
lib/parse-sexp: add '*' as syntactic sugar for '(starts-with "")'

Users that insist on using a literal '*' as a tag, can continue to do
so by quoting it when searching.

3 years agolib/parse-sexp: 'starts-with' wildcard searches
David Bremner [Tue, 24 Aug 2021 15:17:24 +0000 (08:17 -0700)]
lib/parse-sexp: 'starts-with' wildcard searches

The many tests potentially overkill, but they could catch typos in the
prefixes table. As a simplifying assumption, for now we assume a
single argument to the wildcard operator, as this matches the Xapian
semantics. The name 'starts-with' is chosen to emphasize the supported
case of wildcards in currrent (1.4.x) Xapian.

3 years agolib/parse-sexp: add term prefix backed fields
David Bremner [Tue, 24 Aug 2021 15:17:23 +0000 (08:17 -0700)]
lib/parse-sexp: add term prefix backed fields

We use "boolean" to describe fields that should generate terms
literally without stemming or phrase splitting.  This terminology
might not be ideal but it is already enshrined in
notmuch-search-terms(7).

3 years agolib/parse-sexp: support phrase queries.
David Bremner [Tue, 24 Aug 2021 15:17:22 +0000 (08:17 -0700)]
lib/parse-sexp: support phrase queries.

Anything that is quoted or not purely word characters is considered a
phrase.  Phrases are not stemmed, because the stems do not have
positional information in the database. It is less efficient to scan
the term twice, but it avoids a second pass to add prefixes, so maybe
it balances out. In any case, it seems unlikely query parsing is very
often a bottleneck.

3 years agoutil/unicode: allow calling from C++
David Bremner [Tue, 24 Aug 2021 15:17:21 +0000 (08:17 -0700)]
util/unicode: allow calling from C++

The omission of the 'extern "C"' machinery seems like an oversight.

3 years agolib/parse-sexp: support subject field
David Bremner [Tue, 24 Aug 2021 15:17:20 +0000 (08:17 -0700)]
lib/parse-sexp: support subject field

The broken tests are because we do not yet handle phrase searches.

3 years agolib/parse-sexp: support and, not, and or.
David Bremner [Tue, 24 Aug 2021 15:17:19 +0000 (08:17 -0700)]
lib/parse-sexp: support and, not, and or.

All operations and (Xapian) fields will eventually have an entry in
the prefixes table. The flags field is just a placeholder for now, but
will eventually distinguish between various kinds of prefixes.

3 years agolib/parse-sexp: stem unquoted atoms
David Bremner [Tue, 24 Aug 2021 15:17:18 +0000 (08:17 -0700)]
lib/parse-sexp: stem unquoted atoms

This is somewhat less DWIM than the Xapian query parser, but it has
the advantage of simplicity.

3 years agolib: leave stemmer object accessible
David Bremner [Tue, 24 Aug 2021 15:17:17 +0000 (08:17 -0700)]
lib: leave stemmer object accessible

This enables using the same stemmer in both query parsers.

3 years agolib/parse-sexp: parse single terms and the empty list.
David Bremner [Tue, 24 Aug 2021 15:17:16 +0000 (08:17 -0700)]
lib/parse-sexp: parse single terms and the empty list.

There is not much of a parser here yet, but it already does some
useful error reporting. Most functionality sketched in the
documentation is not implemented yet; detailed documentation will
follow with the implementation.

3 years agolib: add new status code for query syntax errors.
David Bremner [Tue, 24 Aug 2021 15:17:15 +0000 (08:17 -0700)]
lib: add new status code for query syntax errors.

This will help provide more meaningful error messages without special
casing on the client side.

3 years agoCLI/search+address: support sexpr queries
David Bremner [Tue, 24 Aug 2021 15:17:14 +0000 (08:17 -0700)]
CLI/search+address: support sexpr queries

Initially support selection of query syntax in two subcommands to
enable testing.

3 years agolib: define notmuch_query_create_with_syntax
David Bremner [Tue, 24 Aug 2021 15:17:13 +0000 (08:17 -0700)]
lib: define notmuch_query_create_with_syntax

Set the parsing syntax when the (notmuch) query object is
created. Initially the library always returns a trivial query that
matches all messages when using s-expression syntax.

It seems better to select the syntax at query creation time because
the lazy parsing is an implementation detail.

3 years agolib: split notmuch_query_create
David Bremner [Tue, 24 Aug 2021 15:17:12 +0000 (08:17 -0700)]
lib: split notmuch_query_create

Most of the function will be re-usable when creating a query from an
s-expression.

3 years agoconfigure: optional library sfsexp
David Bremner [Tue, 24 Aug 2021 15:17:11 +0000 (08:17 -0700)]
configure: optional library sfsexp

The configure part is essentially the same as the other checks using
pkg-config. Since the optional inclusion of this feature changes what
options are available to the user, include it in the "built_with"
pseudo-configuration keys.

3 years agoCLI: make variable n_requested_db_uuid file scope.
David Bremner [Tue, 24 Aug 2021 15:17:10 +0000 (08:17 -0700)]
CLI: make variable n_requested_db_uuid file scope.

It turns out that now that we pass an open database into the
subcommands, it is easy to check any requested uuid against the
database at the same time as we process the other shared
arguments. This results in overall less boilerplate code, as well as
making a CLI scope function and variable file scope in notmuch.c.

3 years agoMerge branch 'release'
David Bremner [Sat, 4 Sep 2021 18:51:21 +0000 (11:51 -0700)]
Merge branch 'release'

3 years agodebian: changelog for 0.33-2 archive/debian/0.33-2 debian/0.33-2
David Bremner [Sat, 4 Sep 2021 18:30:00 +0000 (11:30 -0700)]
debian: changelog for 0.33-2

3 years agodebian: temporarily disable two subtests
David Bremner [Sat, 4 Sep 2021 18:26:48 +0000 (11:26 -0700)]
debian: temporarily disable two subtests

These are failing on (surprisingly) the Debian amd64
autobuilder. There were also previous reports of failures on Ubuntu
s390x. Fixing this may require changing the way the default is
calculated.

3 years agoMerge branch 'release'
David Bremner [Sat, 4 Sep 2021 15:05:32 +0000 (08:05 -0700)]
Merge branch 'release'

3 years agodebian: add priorversion to removal of obsolete conffile 0.33 archive/debian/0.33-1 debian/0.33-1
David Bremner [Fri, 3 Sep 2021 19:51:39 +0000 (12:51 -0700)]
debian: add priorversion to removal of obsolete conffile

The conffile in question is long gone, no need to retry removing it
forever.

3 years agodebian: changelog for 0.33-1
David Bremner [Fri, 3 Sep 2021 19:26:24 +0000 (12:26 -0700)]
debian: changelog for 0.33-1

3 years agoversion: bump to 0.33
David Bremner [Fri, 3 Sep 2021 19:20:27 +0000 (12:20 -0700)]
version: bump to 0.33

3 years agoNEWS: set release date
David Bremner [Fri, 3 Sep 2021 19:16:43 +0000 (12:16 -0700)]
NEWS: set release date

3 years agoNEWS: add minimal description of remaining changes.
David Bremner [Fri, 3 Sep 2021 19:06:44 +0000 (12:06 -0700)]
NEWS: add minimal description of remaining changes.

3 years agoemacs: don't inline message/rfc822 parts without content
David Bremner [Sun, 4 Jul 2021 13:16:38 +0000 (10:16 -0300)]
emacs: don't inline message/rfc822 parts without content

This avoids some ugly error messages and exceptions, and hopes that
some gnus method will display message/rfc822 parts that have only a
file, no :content part.

3 years agotest: known broken test for emacs display of message/rfc822 parts
David Bremner [Sat, 3 Jul 2021 20:11:31 +0000 (17:11 -0300)]
test: known broken test for emacs display of message/rfc822 parts

There are at least 3 bugs present.

1) notmuch-show-insert-part-message/rfc822 assumes that message/rfc822
parts will have a ":content" property, but that turns out not to be
the case.

2) something deep in gnus wants gnus-newsgroup-charset, but that is
defined in gnus-sum, which is not loaded by default.

3) If gnus-sum is loaded, then the display of the message/rfc822 part
succeeds, but the buffer gets put into gnus-article-mode, which means
that, inter alia, notmuch text properties and keybindings get wiped.

3 years agotest/crypto: test message with rfc822 attachment.
David Bremner [Sat, 3 Jul 2021 20:11:30 +0000 (17:11 -0300)]
test/crypto: test message with rfc822 attachment.

This is intended to help track down a display problem in the emacs
front end

3 years agolib: consider all instances of Delivered-To header
Hannu Hartikainen [Fri, 2 Jul 2021 09:13:09 +0000 (12:13 +0300)]
lib: consider all instances of Delivered-To header

When using notmuch-reply and guessing the From: address from
Delivered-To headers, I had the wrong address chosen today. This was
because the messages from the notmuch list contain these headers in this
order:

Delivered-To: hannu.hartikainen@gmail.com
...
Delivered-To: hannu@hrtk.in
In my .notmuch-config I have the following configuration:

primary_email=hannu@hrtk.in
other_email=hannu.hartikainen@gmail.com;...

Before this change, notmuch-reply would guess From: @gmail.com because
that is the first Delivered-To header present. After the change, the
primary address is chosen as I would expect.

3 years agoreply: add test for multiple Delivered-To headers
Hannu Hartikainen [Fri, 2 Jul 2021 09:13:08 +0000 (12:13 +0300)]
reply: add test for multiple Delivered-To headers

Add a known broken subtest for guessing From: correctly when there are
multiple Delivered-To: headers. The address configured as primary_email
should get picked.

3 years agoemacs: shorten lines in two doc-strings
Jonas Bernoulli [Mon, 19 Jul 2021 11:31:09 +0000 (13:31 +0200)]
emacs: shorten lines in two doc-strings

The byte-compiler wasn't happy about those.

3 years agoemacs: notmuch-show-pipe-message: cosmetics
Jonas Bernoulli [Mon, 19 Jul 2021 11:31:08 +0000 (13:31 +0200)]
emacs: notmuch-show-pipe-message: cosmetics

3 years agoemacs: fix some option type declarations
Jonas Bernoulli [Mon, 19 Jul 2021 11:31:07 +0000 (13:31 +0200)]
emacs: fix some option type declarations

Also improve their doc-strings.

3 years agoemacs: add some function declarations
Jonas Bernoulli [Mon, 19 Jul 2021 11:31:06 +0000 (13:31 +0200)]
emacs: add some function declarations

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.