Commit graph

7427 commits

Author SHA1 Message Date
David Bremner
174221b179 doc/emacs: split index category from label
A more verbose category is needed for the index, but not the
description in the manual.
2022-08-11 07:43:17 -03:00
David Bremner
fe3db23684 doc/emacs: drop domain label
This makes the generate info files somewhat less verbose, so that they
say e.g. "Key Binding" instead of "Emacs Key Binding"
2022-08-11 07:43:17 -03:00
David Bremner
b2d0720971 doc/elisp: replace label for Emacs commands and key bindings.
In the notmuch doc index it is important to be clear which parts are
Emacs related.
2022-08-11 07:43:17 -03:00
David Bremner
4d367ac0b4 doc: copy elisp.py from flycheck, make available
This corresponds to flycheck commit
1702d2db3d8ba9bcb9b2bf810e791e907fcc3adc, which is apparently the last
time this file was modified (2018).

Embedding seems defensible since the file is evidently not changing
that much, and we need to change some labels to make it fit with the
not-just-emacs nature of notmuch docs.
2022-08-11 07:43:17 -03:00
David Bremner
bf64c48855 doc: add some documentation about duplicate files.
This is mainly motivated by the new emacs-UI features to select
duplicates, but hopefully it will help demystify things for users of
the CLI as well.
2022-08-11 07:32:04 -03:00
David Bremner
5a47b5a884 emacs: add docstring for notmuch-show-choose-duplicate
It should have one in any case, but in particular it is needed for the
manual.
2022-08-11 07:25:28 -03:00
David Bremner
d273263d16 emacs/show: restrict inlined mimetypes on refresh.
This fixes the bug reported by Al [1]. Essentially apply the same fix
as [2] in a different place.

[1]: id:877d41nmr1.fsf@gmail.com
[2]: 90a7c1af36
2022-08-11 07:17:17 -03:00
David Bremner
4de3eb4c0e test/emacs: add known broken test for inlining on refresh.
This duplicates the bug reported by Al [1]

[1]: id:877d41nmr1.fsf@gmail.com
2022-08-11 07:17:17 -03:00
David Bremner
6d6d2a5fe7 emacs: add duplicate support to notmuch-show-view-raw-message
This fixes one of the bugs reported by Gregor in [1]

[1]: id:87edxw8jp4.fsf@no.workgroup
2022-08-07 07:05:49 -03:00
David Bremner
05c85290ca emacs/show: provide a more friendly function to get duplicate num
There is not much code here, but at least we can fix the indexing as 1
based.
2022-08-07 07:05:49 -03:00
David Bremner
67f535332c test/emacs: add known broken test for viewing raw duplicate
This duplicates one of the bugs reported by Gregor in [1].

[1]: id:87edxw8jp4.fsf@no.workgroup
2022-08-07 07:05:49 -03:00
David Bremner
1849c68d0f emacs: update notmuch-show-get-filename to handle duplicates
This fixes one of the bugs reported by Gregor in [1].

[1]: id:87edxw8jp4.fsf@no.workgroup
2022-08-07 07:05:49 -03:00
David Bremner
2c7438fe51 test/emacs: add known broken test for stashing duplicate filename
This duplicates (no pun intended) one of the bugs reported by Gregor
in id:87edxw8jp4.fsf@no.workgroup
2022-08-07 07:05:49 -03:00
David Bremner
3a175ddffb NEWS: initial set of NEWS for 0.37.
There are one or two more changes to apply (and potentially document)
before release, but this covers most of my commits.
2022-08-06 09:24:19 -03:00
David Bremner
429924b28f doc/notmuch: merge two sections on external commands.
When adding the description of the propagation of NOTMUCH_CONFIG, I
missed that there was already a section on external commands, with a
different title.
2022-08-06 09:20:24 -03:00
David Bremner
7b27119d8e tests: remove dead code from T055-path-config.sh
This case statement does nothing.
2022-08-06 09:16:13 -03:00
Tomi Ollila
54190d091c notmuch.c: add missing trailing newlines in two error messages
Removed duplicate error check (and the message) in 3rd case where
the same error message (w/o trailing newline) was present.

In case of test/T040-setup.sh, command substitution deletes
trailing newlines, so related test there cannot be changed
(and therefore could not notice this user experience flaw).
2022-07-31 21:03:59 -03:00
David Bremner
f4ebb60375 doc/emacs: add docstring for notmuch-unthreaded-result-format.
The main change is actually updating cross references.
2022-07-30 08:53:35 -03:00
David Bremner
9d013801bb emacs: update defcustom for notmuch-unthreaded-result-format
This is essentially a copy of that for notmuch-tree-result-format,
aside from the default value.
2022-07-30 08:53:25 -03:00
David Bremner
dc2097ea9f doc/emacs: add docstring and example for n-tree-result-format
This example is based on one originally by Jon Hurst.
2022-07-30 08:53:07 -03:00
David Bremner
25ebb9e7d3 emacs: update defcustom for notmuch-search-result-format.
It seems redundant to have the previous example, since the default
value is always show by describe variable.

Enforce more restrictions on the keys in the alist, since arbitrary
strings don't work as field names.

Document that functions can be used in lieu of field names.
2022-07-30 08:52:47 -03:00
David Bremner
2b10a56c78 doc/emacs: add docstring and example for n-search-result-format
When the ability to use functions was added, this example was confined
to a commit message, which is not user discoverable.
2022-07-30 08:52:37 -03:00
David Bremner
4237409faf emacs: update defcustom for notmuch-search-result-format.
It seems redundant to have the previous example, since the default
value is always show by describe variable.

Enforce more restrictions on the keys in the alist, since arbitrary
strings don't work as field names.

Document that functions can be used in lieu of field names.
2022-07-30 08:52:26 -03:00
David Bremner
1ef7c75111 emacs/reply: reply to correct duplicate
Essentially we just need to arrange to pass the right --duplicate
argument to notmuch reply.

As a side-effect, correct the previously unused value of EXPECTED in
T453-emacs-reply.sh.
2022-07-30 08:46:22 -03:00
David Bremner
24decfc1dd CLI/reply: support --duplicate argument
We want the reply used to match that shown e.g. in the emacs
interface. As a first step provide that functionality on the command
line.

Schema does not need updating as the duplicate key was already
present (with a constant value of 1).
2022-07-30 08:45:15 -03:00
David Bremner
5ea5a5557d emacs/show: display count of duplicates in headerline
There is no real cost here, except screen real estate. Some people
might prefer hiding the duplicate count, but we leave that for a
future commit.
2022-07-30 08:44:14 -03:00
David Bremner
b3d466bf39 emacs/show: provide notmuch-show-choose-duplicate
This new command allows the user to interactively choose a different
duplicate (file) to display for a given message in
notmuch-show-mode. Since both tree and unthreaded view use
notmuch-show-mode, this provides the same facility there.
2022-07-30 08:42:12 -03:00
David Bremner
4612f3eb3d CLI/show: support --duplicate for structured output
This introduces a new mandatory key for message structures, namely
"duplicate". Per convention in devel/schemata this does _not_ increase
the format version. This means that clients are responsible for
checking that it exists, and not crashing if it does not.

The main functional change is teaching mime_node_open to understand a
'duplicate' argument.

Support for --duplicate in notmuch-reply would make sense, but we
defer it to a later commit.
2022-07-30 08:41:50 -03:00
David Bremner
cef5eaaef6 CLI/show: initial support for --duplicate for (raw output only)
Add command line argument --duplicate, analogous with that already
supported for notmuch-search.

Use of a seperate function for _get_filename is mainly a form of
documentation at this point.

md5sum is of course a weak hash, but it is good enough for
this (non-adversarial) test suite use.
2022-07-30 08:39:13 -03:00
David Bremner
f599b8873f CLI/git: opportunistically use bindings to check for known messages
If the bindings are installed, use them to avoid one exec of notmuch
search per message.
2022-07-16 20:27:40 -04:00
David Bremner
bd4347499f CLI/git: current cache contents of index
Rather than shelling out once per message to get the list of files
corresponding to tags, it is much faster (although potentially a bit
memory intensive) to read them all at once.
2022-07-16 20:27:40 -04:00
David Bremner
c66f0dea7a perf-test: add tests notmuch-git
The main focus of these initial tests is the (currently unacceptably
slow) checkout performance.
2022-07-16 20:27:40 -04:00
David Bremner
349987668a doc/emacs: add notmuch-show-empty-saved-searches to manual
Answering a user question, I had to dig for this variable, but I think
it is a reasonably common customization wish, particularly for users
with custom count-functions.
2022-07-15 12:37:34 -04:00
David Bremner
9b4aa9a3e6 doc/emacs: define and use emacsvar and emacscmd markup
This makes it easier to navigate the merged index of all of the
notmuch documentation.
2022-07-15 12:37:24 -04:00
David Bremner
c527358794 doc: do not generate python module index
This currently seems unhelpful, and not generating it removes if from
the navigation bar, which prevents mis-clicking.
2022-07-14 16:31:11 -04:00
David Bremner
9003394f5c doc: drop module index from ToC
There is only one module listed, so the index is not useful.
2022-07-14 16:31:11 -04:00
David Bremner
7ad20fc697 doc: retitle notmuch-emacs manual
This makes the HTML TOC read more naturally. Add a label to make cross
referencing easier.
2022-07-14 16:31:11 -04:00
David Bremner
e55b04b028 doc: reorganize sphinx toctree
This mainly affects the html output (although users generating epub or
pdf would also notice a change). The goal is twofold: make the TOC a
bit friendler and easier to navigate by introducing some hierarchy,
and allow links for nmbug and notmuch-setup.
2022-07-14 16:31:11 -04:00
David Bremner
7925481997 doc: improve config item labels in info output
Commit 306b7028d added the nmconfig role / directive. Unfortunately
the default of using the directive name in texinfo output is pretty
ugly, so attempt to make it more human readable by passing `objname`
to add_object_type invocation.
2022-07-14 16:31:11 -04:00
David Bremner
5e17495ab7 doc/emacs: add discussion about notmuch-show performance.
Most of the information is already in the docstrings, but hopefully
by grouping it is more discoverable.
2022-07-14 11:51:12 -04:00
David Bremner
bde8ea5d1d emacs/show: introduce notmuch-show-height-limit
Analogous to notmuch-show-depth-limit, it requires a bit more
calculation, but that cost seems dominated by the rendering cost.
2022-07-14 11:51:01 -04:00
David Bremner
e580ce0058 emacs/show: obey notmuch-show-max-text-part-size for part 0
This parameter was originally introduced to hide large attachements
that happened to be text/plain. From a performance point of view,
there is no reason not to also hide large message bodies.
2022-07-14 11:48:30 -04:00
David Bremner
1d254bd35e emacs/show: optionally insert bodies of "deep messages" lazily
This leverages the machinery already there to insert buttons for
attachments.

A potential use-case is browsing the top layers of the tree to decide
which of the lower subtrees to read.
2022-07-14 11:47:49 -04:00
David Bremner
ded2eb1a50 perf-test/emacs: test showing longish threads
This particular thread takes about 100 times longer to display in
emacs than on the command line.

The parameter notmuch-show-max-text-part-size exists, but is currently
ineffective for this task because it only hides attachments, not
part 0.

In future commits, the parameter notmuch-show-{depth,height}-limit
will trigger a similar kind of hiding for bodies as
n-s-m-text-part-size already does for attachments.
2022-07-14 04:50:33 -03:00
David Bremner
09fa6bcc0d debian: add git as a build-dependency, for the test suite
This is needed to run (and test) notmuch-git.
2022-07-07 07:24:58 -03:00
David Bremner
bf5eacbe7e CLI/git: add --format-version argument to init subcommand
This is primarily intended to support testing upward compatibility
with legacy repos.
2022-07-07 07:05:55 -03:00
David Bremner
6219e7380a CL/git: add format version 1
The original nmbug format (now called version 0) creates 1
subdirectory of 'tags/' per message. This causes problems for more
than (roughly) 100k messages.

Version 1 introduces 2 layers of hashed directories. This scheme was
chose to balance the number of subdirectories with the number of extra
directories (and git objects) created via hashing.

This should be upward compatible in the sense that old repositories
will continue to work with the updated notmuch-git.
2022-07-07 06:56:05 -03:00
David Bremner
b07e121923 CLI/git: replace most mentions of nmbug
Particularly in help messages, nmbug is confusing for users who may
have never heard of it.
2022-07-07 06:11:04 -03:00
David Bremner
15b940d26a test: known broken test for top level .notmuch in split configs
In split configurations there is no special significance to a top
level directory called .notmuch in the mail root. Users should
therefore be able to have mail stored underneath it.
2022-07-05 08:09:57 -03:00
David Bremner
db44af75ad bindings/python-cffi: fix docstring
the method Database.get_message does exist any more (if it ever
did). This makes the docstring unhelpful as an example.
2022-07-05 07:34:25 -03:00