Commit graph

7454 commits

Author SHA1 Message Date
David Bremner
8eabd6388e test: add known broken test for indexing text/* attachments
The general problem of indexing attachments requires some help to turn
things into text, but (most?) text/* should be doable internally,
possibly with optimizations as for the text/html case.
2022-09-03 09:06:08 -03:00
David Bremner
a832f940e1 test: rename indexing corpus
The corpus is not really suitable for general indexing test since the
sole message is ignored (and will most likely continue to be ignored)
by notmuch-new.
2022-09-03 09:05:44 -03:00
David Bremner
2e5ef69fbf lib: add field processor for lastmod: prefix
By sharing the existing logic used by the sexp query parser, this
allows negative lastmod revisions to be interpreted as relative to the
most recent revision.
2022-09-03 08:43:33 -03:00
David Bremner
93c602a82f lib: factor out lastmod range handling from sexp parser.
This will permit the re-use of the same logic in the infix query
parser. The location of the shared code in the infix side is for
consistency with the other shared parsing logic. It will make more
sense when a Xapian field processor is added for the lastmod prefix.
2022-09-03 08:36:53 -03:00
David Bremner
606d9b02e4 lib/sexp: provide relative lastmod queries
Test the relatively trivial logic changes for the sexp query parser
first before refactoring that logic to share with the infix query
parser.
2022-09-03 08:36:53 -03:00
David Bremner
84e4e130e2 lib/open: create database path in some cases
There is some duplication of code here, but not all of the locations
valid to find a database make sense to create. Furthermore we nead two
passes, so the control flow in _choose_database_path would get a bit
convoluted.
2022-09-03 08:24:43 -03:00
David Bremner
8ba3057d01 lib/open: return non-SUCCESS on missing database path
This simplifies the logic of creating the directory path when it doesn't
exist.
2022-09-03 08:24:43 -03:00
David Bremner
25e2790e30 lib/open: refactor call to mkdir into function
This makes the error handling available for re-use. Using
g_mkdir_with_parents also handles the case of a pre-existing
directory. This introduces new functionality, namely creating the
parent directories, which will be useful for creating directories like
'.local/share/notmuch/default'.
2022-09-03 08:24:43 -03:00
David Bremner
44c9338061 test/path-config: set database.mail_root but not database.path
The failing "create database" test replicates a bug reported by Sean
Whitton [1]. The other two failures also look related to the database
being (re)created in the wrong place.

[1]: id:87y1wqkw13.fsf@athena.silentflame.com.
2022-09-03 08:24:43 -03:00
David Bremner
687866111a test: add test for creating database in various configurations.
The existing database creation (via add_email_corpus) was always done
in the traditional configuration. The use of xapian-metadata is just
to portably ensure that there is a database created where we expect
there to be.
2022-09-03 08:24:43 -03:00
Antoine Beaupré
a3b46fa8bb emacs/show: use read-shell-command instead of read-string
This enables auto-completion of commands, something which plain
read-string does not do. It's otherwise a drop-in
replacement. According to `C-h f`, read-shell-command was introduced
in Emacs 23.1 or earlier.
2022-09-03 08:12:16 -03:00
jao
684eeb65c7 emacs: new notmuch-tree-process-exit-functions
Hook run when the tree insertion process finishes its job.

--
This patch supersedes <id:20220816214023.1523322-1-jao@gnu.org>, but
changing the new variable name.

Right now, it can be used for silly things like removing or changing
the the "End of search." hardcoded message in the tree buffer.  But
also for more sophisticated things like folding all threads in add-ons
like my outline mode for tree buffers (to be submitted).

Signed-off-by: jao <jao@gnu.org>
2022-09-03 08:11:37 -03:00
David Bremner
76c3147613 debian: update changelog for new build-depends 2022-08-24 09:12:57 -07:00
David Bremner
5e44b74446 debian: build-depend on emacs-el
This is hopefully temporary, to work around some bugs related to emacs
28 in Debian.
2022-08-24 09:10:02 -07:00
David Bremner
c864b59942 NEWS: set release date for 0.37 2022-08-21 13:21:40 -07:00
David Bremner
88ea8619f4 debian: changelog for 0.37-1 2022-08-21 13:21:40 -07:00
David Bremner
6d53ee99b3 version: update to 0.37 2022-08-21 13:21:40 -07:00
David Bremner
4efe50b492 NEWS: minimal entries for two emacs changes. 2022-08-21 13:21:40 -07:00
Michael J Gruber
760431c0a3 test: increase cffi timeout
By default, the test suite uses 2min for other tests and 5s for cffi
tests. Sporadically, this leads to test failures caused by the timeout
on slower or loaded test infrastructure (as seen on ppc64le in Fedora's
infrastructure during branch time).

Increase the cffi timeout to the same 2m=120s.

Signed-off-by: Michael J Gruber <git@grubix.eu>
2022-08-16 04:29:39 -03:00
David Bremner
cf21ad2e79 changelog for 0.37~rc0-3 2022-08-14 11:49:54 -03:00
David Bremner
f563f5ab66 debian: changelog for 0.37~rc0-2 2022-08-14 10:56:15 -03:00
David Bremner
5ea2b25e33 debian: upload release candidate to experimental, not unstable
Oops, tagged "upstream" version is incorrect, but it's a minor issue.
2022-08-14 07:28:40 -03:00
David Bremner
b3243d1ac6 debian: changelog stanza for 0.37~rc0-1 2022-08-14 06:55:40 -03:00
David Bremner
676a470821 version: update to 0.37~rc0 2022-08-14 06:53:41 -03:00
David Bremner
b76f73efe3 doc/emacs: use define-key instead of hard-coding markup
Add keys to index. Allow indexing of both keys and commands. Use
standard typesetting for multiple keybindings.
2022-08-11 07:48:54 -03:00
David Bremner
aebf5b6d84 doc/emacs: replace use of emacsvar with el:defcustom
Mainly this allows dropping the ad-hoc directive emacsvar
2022-08-11 07:48:54 -03:00
David Bremner
0f3b196144 doc/emacs: replace emacscmd with el:define-key
This allows us to eliminate the ad-hoc emacscmd directive / role, and
improve indexing.

doc/emacs: convert remaining uses of emacscmd to define-key

This allows us to remove the no-longer used object type.
2022-08-11 07:48:54 -03:00
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