Commit graph

309 commits

Author SHA1 Message Date
David Bremner
8ed68c1bbe CLI/git: change defaults for repo and prefix
The previous defaults were not suitable for personal (i.e. not
bugtracking for notmuch development) use.

Provide two ways for the user to select nmbug compatible defaults;
command line argument and checking the name of the script.
2022-06-17 08:40:19 -03:00
David Bremner
e50a413906 doc/notmuch-git: initial documentation
This is mainly derived from the various help outputs from the script,
with some massaging of markup and addition of links.
2022-06-17 08:40:19 -03:00
jao
9695e4c38d emacs: use message-dont-reply-to-names when composing replies
notmuch-mua functions for replies now use the built-in customizable
variable message-dont-reply-to-names with the same semantics as
message-mode.
2022-06-16 08:51:19 -03:00
David Bremner
a5504e8b1c CLI: document handling of --config for external commands
Create a section of the notmuch(1) manpage to have some place to put
this documentation.
2022-06-13 07:28:35 -03:00
David Bremner
ae1fc657ef doc/emacs: document a few notmuch-hello customizable variables.
A user asked about the thousands separator on IRC, and I had to check
the source.
2022-05-29 07:30:22 -03:00
David Bremner
fd46fc1977 emacs: document/defcustom notmuch-multipart/alternative-discouraged
This variable is important for people who want to change the default
behaviour when displaying multipart/alternative messages.  Previously
it was undocumented.  Add a defcustom to help users and copy some
documentation from the wiki. The usual machinery of re-using
docstrings is a bit tricky to use here because it mangles the example
lisp code, and the link to the info node should not be in e.g. the
html page.

Add a simple test to make sure the switch from defvar to defcustom did
not break something obvious.
2022-05-20 22:40:32 -03:00
David Bremner
306b7028d2 doc: define and use semantic markup for configuration items
This makes sure each configuration item is cross referenceable without
extra markup, and also adds index entries.
2022-05-20 22:40:32 -03:00
David Bremner
d8492f7540 doc/emacs: document notmuch-show-toggle-toggle-elide-non-matching
Recently there was a question on the mailing list about the existence
of this function, so let us try to make it more discoverable.
2022-05-15 18:50:32 -03:00
David Bremner
37492858b6 doc/sexp-queries: be more consistent about ending example text
Most, but not all of the the explanatory texts already end in
'.'. This makes the remainder match.
2022-04-30 14:22:51 -03:00
David Bremner
5e90c847d7 doc/sexp-queries: fix example
Update the explanatory text to match the query.
2022-04-30 14:13:03 -03:00
David Bremner
b2eb0547e1 doc/sexp-queries: escape @ in non-verbatim text
This prevents sphinx-doc from creating spurious mailto: links. Thanks
to Jakub Wilk for telling me about the fix.
2022-04-30 13:46:51 -03:00
David Bremner
a1d139de4d lib: add sexp: prefix to Xapian (infix) query parser.
This is analogous to the "infix" prefix provided by the s-expression
based query parser.
2022-04-15 08:25:46 -03:00
David Bremner
8ed6a172b3 lib: do not phrase parse prefixed bracketed subexpressions
Since Xapian does not preserve quotes when passing the subquery to a
field processor, we have to make a guess as to what the user
intended. Here the added assumption is that a string surrounded by
parens is not intended to be a phrase.
2022-03-19 07:27:29 -03:00
David Bremner
928c204240 emacs: Document undo binding.
This messes up whitespace, which will require a global change to fix.
2022-02-26 08:00:28 -04:00
David Bremner
cc2c3a383d emacs: add notmuch-tag-undo
Keybindings are deferred to a future commit.
2022-02-26 07:58:14 -04:00
David Bremner
92b6b991b0 doc/emacs: add minimal documentation for notmuch-unthreaded mode.
If nothing else it means the mode is discoverable by browsing the
documentation, and also provides a target for links when enumerating
modes.
2022-02-25 08:36:51 -04:00
David Bremner
999706c4d5 doc: use hyperlinks for config options in notmuch-insert(1)
The tradeoff is no bold/italic in the man pages to get actual
hyperlinks in the html output.
2022-02-20 09:33:56 -04:00
David Bremner
75f86b39c3 doc: add configuration section to notmuch-insert(1)
This is partially redudant given some existing cross references, but
it is useful to have all of the config keys listed in one place, to
help keep track of them if nothing else.
2022-02-20 09:33:56 -04:00
David Bremner
8060022bdf doc: add configuration section to notmuch-new(1)
Increase discoverability.
2022-02-20 09:33:56 -04:00
David Bremner
69289c5d62 doc: alphabetize options in notmuch-config(1)
Originally (I think) these were in the order generated by notmuch
setup. As the number of options grows, and several are not in the
initial setup generated file, the original order becomes less useful
for users. This commit alphabetizes the keys to help users
search. There is only one content change, an added cross-reference
from user.other_email to user.primary_email.
2022-02-20 09:33:56 -04:00
inwit
56f41d7b36 doc: make post-hook description more precise
Add the word "any" to the description of post-new hook description in
order to clarify that it is always run, even if there are no new
messages.
2022-02-11 13:39:07 -04:00
David Bremner
5c183d814b doc: replace :math: for subscripts in notmuch-sexp-queries(7)
Sphinx pulls in mathjax to do :math:, which complicates viewing the
html version offline. The direct :sub: is supported directly in html.
2022-01-29 16:37:59 -04:00
David Bremner
3bf6487359 doc: document new option show.extra_headers
Increase discoverability by cross referencing from the notmuch-show
manual entry to the notmuch-config manual entry.
2022-01-25 07:51:48 -04:00
jao
15207652a1 emacs: customizable names for search buffers
Customizable names for buffers presenting search results, via two
custom variables (notmuch-search-buffer-name-format and
notmuch-saved-search-buffer-name-format), defaulting to values
currently used for plain searches and including too tree and
unthreaded search buffers.

Amended by db: spelling fix.
2022-01-23 20:47:49 -04:00
jao
332b3b639e emacs: make header line in notmuch-show buffers optional
New notmuch-show-header-line customizable boolean to allow inhibiting
a header line in notmuch-show-mode buffers (for instance, because one
prefers to just include Subject in notmuch-message-headers).
2022-01-10 08:03:40 -04:00
David Bremner
63d3b2b5cf notmuch 0.34.3 release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAmHbOcMACgkQA0U5G1Wq
 FSEGVA//Vjgripk0eRDIUZrdL/knjDXybbHVz06r+gx+9Rh1b+3MJ8t+VAjeX7OO
 iJns7ZysKgMsQSYFCFk9fTl5m3ECzZFmzY7lmRU2tU6Hz9lUwotN70e+zGBgFE6J
 sGji4YOCrUnpmgb0j0joRD565m74Bi2Z8Pj+qRvo4RcQY5JxczyDtkSnLb9UDo/e
 FNZ4bTlwJL13Jeu8F6BtnCFPxvpac3qlzLIlG327Fz4cFwQ+QoxQIq5i8pnOu3B2
 HBEyOZAgIuONbV/RH/nwt7QmT45Dne1wP/UqocHkiu3yKvsCRLZC0vsejw8/dZ+D
 GQUfJT9EL1AIJa6OvUyF5UtnPMRKgACG2nt5U8M02ubheAAEgUS/FIIm1kgxkqYU
 5dDKHwU12YHDW2/nwOSRBFDV6TSCkskXr9Thr884KCobyPPnhWkN+pKAfyDhwPMc
 MrnMyId3fPrJRPMxoQ7Z8TJV8l/Wd6FIlFowfzk+s6hfV2qgOUZJ2Btrfk8596Sy
 np8usullbhFagYQ1+JX3AvVxLYvtFKmxO/qG6TcBmjBui5ABz7wtizfgwDx5eVJr
 GpzJUKFUKAmZW+15nm3oNdEwFOjdvRouKc03Qv5eCU6wSaOtd9efgntDPcso8ycW
 Us13KJIhwmwDJdaqnlmG5TdlJY9qjFu/VGHt4+I1GNQuswXRIo8=
 =hQCB
 -----END PGP SIGNATURE-----

Merge tag '0.34.3'

notmuch 0.34.3 release
2022-01-09 19:34:58 -04:00
David Bremner
51c287ead8 doc: add 2022 to copyright years. 2022-01-09 15:35:52 -04:00
Cédric Hannotier
f9ffc5f433 doc: mail store is given by database.mail_root
The mail store directory is given by database.mail_root,
which can be different from database.path.

However, notmuch-insert documentation was still referencing the latter
as the provider of the maildir directory instead of the former.
2022-01-03 08:07:13 -04:00
David Bremner
02d8ff376d doc: add dep. on stamp file for rebuilding gzipped man pages.
In [1] Daniel observed that the gzipped man pages were only being
rebuild every second time when building with `make -j4'. This may be
caused by a race condition between sphinx-build rebuilding the roff
files and the recipe to gzip them. This commit sequentializes these
two steps by making the stamp file a prerequisite for (all of) the
gzip files.

[1]: id:87tveotn1g.fsf@fifthhorseman.net
2021-12-25 07:32:27 -04:00
David Bremner
b7e08901e8 doc: introduce stamp file for info build
This partially fixes (i.e. just for sphinx) the problem reported by
Daniel in id:87r29wwgq2.fsf@fifthhorseman.net.
2021-12-23 08:01:28 -04:00
David Bremner
d825847b52 doc: replace phony target with variable
Depending on a phony target seems like a good way to always trigger a
recipe.
2021-12-23 08:01:11 -04:00
David Bremner
1e7d33961e Merge branch 'release' 2021-12-04 09:27:30 -04:00
David Bremner
d7f9572413 python-cffi: switch to notmuch_database_{open,create}_with_config
Since release 0.32, libnotmuch provides searching for database and
configuration paths. This commit changes the python module notmuch2 to
use those facilities.

This fixes the bug reported in [1], along with a couple of the
deprecation warnings in the python bindings.

Database.default_path is deprecated, since it no longer faithfully
reflects what libnotmuch is doing, and it is also no longer used in
the bindings themselves.

This commit choose the default of config=CONFIG.EMPTY (equivalent to
passing "" to notmuch_database_open_with_config).  This makes the
change upward compatible API-wise (at least as far as the test suite
verifies), but changing the default to CONFIG.SEARCH would probably be
more convenient for bindings users.

[1]: id:87h7d4wp6b.fsf@tethera.net
2021-12-04 08:42:31 -04:00
David Bremner
20b2ae1218 emacs: drop C-tab binding in hello mode, document <backtab>.
The <backtab> binding has always been there, but the docs were
apparently mistakenly changed to say <backspace> [1]

Revert to <backtab> in the documentation.

The commit also drops the C-<tab> binding, since it seems redundant
and it interferes with tab-bar-mode.

[1]: 703dec7754.
2021-12-03 20:28:12 -04:00
David Bremner
48b5263646 doc/python-cffi: import from built bindings, not installed module
Previously the python-cffi bindings either failed to build, or built
for the wrong module by using the installed module.

The fix requires correction the module path, building the bindings
before docs, and helping python find the built libnotmuch.

Based on patch / discussion from Micheal Gruber [1]

[1]: id:cover.1634808719.git.git@grubix.eu
2021-12-03 20:25:59 -04:00
David Bremner
b264a49be3 rename built_with.sexpr_query to built_with.sexp_queries
It is confusing to use two different names (sexp vs sexpr) when
compared with the command line option --query=sexp and (furthermore)
singular vs plural when compared with the man page title.
2021-12-03 20:06:06 -04:00
David Bremner
93104f0d9d doc/sexp-queries: replace definition lists with block quotes.
This document contains meaningful markup in the terms, which makeinfo
complains about. Replace the use of definition lists with regular
paragraphs containing quote blocks. This is accomplished by splitting
the "term" from the definition with a blank line.
2021-10-25 08:25:35 -03:00
David Bremner
00fdf10937 doc: remove explicit formatting of terms in definition lists
Sphinx-doc already formats the terms appropriately for a given
backend (bold in html and man). `makeinfo` complains noisily about
formatting inside a @item if we add our own explicit formatting.

This change may change the formatting in the info output. On the other
hand, the existing use of quotes for bold is not that great anyway.

In some places blank lines were removed to preserve the logical
structure of a definition list.
2021-10-25 08:25:22 -03:00
David Bremner
49aa44bb01 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.
2021-09-04 17:07:19 -07:00
David Bremner
551254eb76 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/
2021-09-04 17:07:19 -07:00
David Bremner
81b9dbd110 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.
2021-09-04 17:07:19 -07:00
David Bremner
6ab2d9b1a2 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).
2021-09-04 17:07:19 -07:00
David Bremner
a07ef8abf5 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.
2021-09-04 17:07:19 -07:00
David Bremner
cc5992a304 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.
2021-09-04 17:07:19 -07:00
David Bremner
afe85e6578 lib/parse-sexp: expand queries
The code here is just gluing together _notmuch_query_expand with the
existing sexp parser infrastructure.
2021-09-04 17:07:19 -07:00
David Bremner
1870b3ae4b 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.
2021-09-04 17:07:19 -07:00
David Bremner
0ca4ad2670 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.
2021-09-04 17:07:19 -07:00
David Bremner
011d06f4d6 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.
2021-09-04 17:07:19 -07:00
David Bremner
8322f536f5 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).
2021-09-04 17:07:19 -07:00
David Bremner
90d9c2ad5c 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.
2021-09-04 17:07:19 -07:00