Commit graph

7104 commits

Author SHA1 Message Date
Ralph Seichter
981d5a0168 Rename version to version.txt
Building Notmuch on macOS is known to cause problems because the Notmuch
distribution archive contains two files named "version". These names
clash with the <version> header as defined in C++20. Therefore, the
existing naming will likely become a problem on other platforms as well,
once compilers adopt the new standard.

Signed-off-by: Ralph Seichter <github@seichter.de>
Amended-by: db s/keyword/header/ in commit message.
2020-10-30 16:14:24 -03:00
David Bremner
582e919e27 lib/config: don't set destructor until iterator is initialized.
As diagnosed by Olivier Taïbi in
id:20201027100916.emry3k2wujod4xnl@galois.lan, if an exception is
thrown while the initialization is happening (e.g. if the function is
called on a closed database), then the destructor is (sometimes)
invoked on an uninitialized Xapian object.

Solve the problem by moving the setting of the destructor until after
the placement new successfully completes. It is conceivable this might
cause a memory leak, but that seems preferable to crashing, and in any
case, there seems to be nothing better to be done if the
initialization is failing things are in an undefined state by
definition.
2020-10-29 21:13:01 -03:00
Tomi Ollila
b042a59cdf configure: replace $(realpath emacs) with $(cd emacs && pwd -P)
For portability; the realpath command (e.g. from GNU coreutils)
is not so common outside Linux systems.

The "$(cd emacs && pwd -P)" replaces that realpath(1) execution
suitably in this context (using just bash(1) builtins).
2020-10-21 07:01:37 -03:00
Tomi Ollila
bdb6956afd emacs docs: rstdoc.el: consistent single quote conversions
With text-quoting-style 'grave keeps "'" and "`" quotes unaltered
for further processing done by this code (regardless of locale...).
The tools that read the reStructuredText markup generated can do
their styling instead.

Added temporary conversions of ' and ` to \001 and \002 so that
's and `s outside of `...' and `...` are converted separately
('s restored back to ' and `s converted to \`).

Both `...' and `...` are finally "converted" to `...` (not ``...``).
https://docutils.sourceforge.io/docs/user/rst/quickref.html documents
that as `interpreted text`:

 "The rendering and meaning of interpreted text is domain- or
  application-dependent. It can be used for things like index
  entries or explicit descriptive markup (like program identifiers)."

Which looks pretty much right.
2020-10-21 06:55:39 -03:00
Tim Quelch
45193bab16 emacs: Remove notmuch-mua-message-send-hook
Currently `message-send-hook` functions are being called twice: In
notmuch send common when `notmuch-mua-send-hook` functions are
run (which by default includes `notmuch-mua-message-send-hook`) and in
`message-send` itself.

Because `message-send-hook` functions are run in `message-send` itself,
we don't need also need to run them before we delegate to `message-send`

Calling `notmuch-mua-message-send-hook` resulted in functions in
`message-send-hook` to be called twice. This causes bugs in
non-idempotent hook functions.
2020-09-19 06:49:17 -03:00
David Bremner
d127b16afe notmuch 0.31 release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAl9UMq8ACgkQA0U5G1Wq
 FSFrzQ//SOg+QEXCtBMZxRTwCdeUwhCAznhmuQW+gD6M+/0RzgNwB+LuXrgK4E8i
 h30Veb92bLjUiGBtCVwGgQt4uQ8OFStZQQoaP/d2YDIwSj83MRyi4rEdn71afC2I
 qptFCKK+qBMMdYPojTfX6hs1LySvGmCubSwJpavcdeksFS14I4+ibRejCji7oQj0
 OkcxRSAIpOnrTpRYGOqe+I4xkTGa8H2yhsTFVjTJAEvGYHpvAPiaQj53CL3jN0jq
 PAaS+w4oJdjwtVCtjebgf5ouhDLft2vyPQrVCzjSVlOv5HoDYWocXK1Zzf1YcHRV
 m3jYn13PUiocQE+Pn/TEaI2MOI+Yl9NYT2Su1H2nvgVEyntIvPJkfBi9K30FgVpw
 UBMFMxyTNnGsIGbv6sxDOxtTWiczRT/cKGBOCabq7daHDlpCFT/pH9/7WpAu9cfk
 04gMZP1m6Q8VV8TseCmBdnRJM+x2JjVRcrRFXB5jlvGrGl+ZfaJ0CaOR0eVOSQS/
 K/YR7YIbrR8tnp/8n3g+KXUDk2Ufamy9r/h8kzVr/5G0xgfZmuVRhpn0a0fDe4D+
 rDnucuG4wlmxsWSwSDxVbYwK5LBm9qzaw9Xg7h2UsyCpKYSQgCRFmejbUTFGu6T3
 5St1V7tHj/WczQr39dYkf6soyx0CGEoGke8zSgINWHR+BCVB18Y=
 =slOY
 -----END PGP SIGNATURE-----

Merge tag '0.31' into master

notmuch 0.31 release
2020-09-05 22:27:32 -03:00
David Bremner
4175d5cb91 NEWS: set release date 2020-09-05 21:50:03 -03:00
David Bremner
0b4490c82c debian: changelog for 0.31-1 2020-09-05 21:48:27 -03:00
David Bremner
008b8b0574 version: bump to 0.31 2020-09-05 21:26:36 -03:00
Mark Walters
f43ea63953 News: add entry for unthreaded mode
A belated NEWS entry for the new un-threaded mode introduced in Notmuch
0.30.
2020-09-05 21:22:09 -03:00
David Bremner
85b5803869 test: fix syntax errors in erroring calls to notmuch insert
notmuch insert does not currently support passing a filename for the
input, so all of these tests have an extra error in addition to the
one being tested for.

Currently this does not make a difference because the error being
tested for is caught before the error of an extra command line
argument. In the future it might make a difference, and in any case it
is confusing.
2020-09-04 21:04:33 -03:00
David Bremner
81b3909509 NEWS: mention reproducibility fix 2020-08-30 08:18:47 -03:00
David Bremner
ee26cae093 NEWS: mention Emacs 27.1 compatibility fixes 2020-08-30 08:16:03 -03:00
David Bremner
c8c0304d77 version: bump to 0.31~rc2 2020-08-29 09:32:36 -03:00
David Bremner
d9385113ef debian: drop notmuch-emacs dependency package
elpa-notmuch is now present in oldstable, and we don't need to support
direct upgrades from older releases than that.
2020-08-29 09:28:36 -03:00
David Bremner
d54b7ae049 debian: suggest mailscripts
These contain several useful tools for the notmuch user, particularly
on Debian.
2020-08-29 09:28:24 -03:00
David Bremner
c0d340778c debian: suggest elpa-mailscripts
These contain some useful functions for notmuch users, mainly wrappers
for scripts from mailscripts.
2020-08-29 09:28:15 -03:00
David Bremner
a623f6b50a NEWS: remaining user visible library changes
These could both cause / fix crashes for user code.
2020-08-23 20:25:30 -03:00
David Bremner
0f90b2eceb NEWS: mention new API entries 2020-08-23 20:25:30 -03:00
David Bremner
16ac5dbaaf NEWS: mention port to Xapian 1.5 2020-08-23 20:25:30 -03:00
David Bremner
2fd1a878c7 NEWS: mention exception handling changes 2020-08-23 20:25:30 -03:00
David Bremner
1d74065955 NEWS: mention merging of documentation for python bindings 2020-08-23 08:53:37 -03:00
William Casarin
68bff37dd7 NEWS: add news entry for tree navigation changes
Signed-off-by: William Casarin <jb55@jb55.com>
Amended-by: db, add verb
2020-08-23 08:24:01 -03:00
Teemu Likonen
3512e2bc83 Emacs: Fix notmuch-message-summary-face definition
Emacs face definition forms are either

    ((DISPLAY . PLIST)
     (DISPLAY . PLIST))

or

    ((DISPLAY PLIST)   ;For backward compatibility.
     (DISPLAY PLIST))

Commit a2388bc56e (2020-08-08) follows
neither of the correct formats. It defines:

    `((((class color) (background light))
       ,@(and (>= emacs-major-version 27) '(:extend t))
       (:background "#f0f0f0"))
      (((class color) (background dark))
       ,@(and (>= emacs-major-version 27) '(:extend t))
       (:background "#303030")))

which produces:

    ((DISPLAY
      :extend t (:background "#f0f0f0"))
     (DISPLAY
      :extend t (:background "#303030")))

And that is wrong format.

This change fixes the face definition form to produce:

    ((DISPLAY
      :extend t :background "#f0f0f0")
     (DISPLAY
      :extend t :background "#303030"))

which follows the (DISPLAY . PLIST) format (see above).
2020-08-22 09:23:26 -03:00
David Bremner
d6f3694188 AUTHORS: update for 0.31
Just shuffles existing authors around, mainly due to Jonas's
enthusiastic cleanup work.
2020-08-22 09:13:26 -03:00
Sean Whitton
88ae4f0251 emacs: Use pop-to-buffer-same-window rather than switch-to-buffer
This means that notmuch commands obey display-buffer-alist so the user
can customize how buffers show up.

It also permits the use of C-x 4 4, C-x 5 5 and C-x t t, available in
Emacs 28.  For example, one can use C-x 4 4 M-x notmuch-jump-search RET
to open a saved search in another window rather than the current window.
Or in notmuch-search mode, C-x 5 5 RET to view the message at point in
a new frame.

notmuch-tree has custom buffer display logic, so bind
display-buffer-overriding-action to make pop-to-buffer-same-window
behave exactly as switch-to-buffer while that function is running.
2020-08-22 09:11:06 -03:00
David Bremner
d7732b2b6a debian/changelog: fix typo 2020-08-18 08:48:19 -03:00
David Bremner
75ec89dfb4 update changelog for 0.31~rc1-1 2020-08-18 07:58:28 -03:00
David Bremner
e6f95910b3 version: bump to 0.31~rc1 2020-08-17 21:02:30 -03:00
Tomi Ollila
f41148f010 NEWS: notmuch-mutt: system(shell pipeline) replaced internally 2020-08-17 21:01:01 -03:00
David Bremner
fe449f779d test: fix uninitialized variable use in T562-lib-database
Fix a copy paste error of using the boolean ret as a notmuch_status_t,
and uninitialized.
2020-08-16 14:04:36 -03:00
David Bremner
a1b1fe85c2 build: clean up sphinx.config
Follow the existing practice and remove it under "distclean", same as
sh.config and Makefile.config
2020-08-16 12:27:11 -03:00
David Bremner
8776faf6d5 devel/release-checks.sh: use grep to find copyright year.
This is quite fragile, but it works for now, unlike the python
version.

In general it seems conf.py is not intended to be evaluated outside of
sphinx, as it assumes certain global names (in particular "tags") are
defined.
2020-08-16 11:34:03 -03:00
David Bremner
557aa2d75f debian: update symbols for 0.31
Two new API entries for better error handling
2020-08-16 11:12:59 -03:00
David Bremner
e86b3e230e debian: start changelog for 0.31~rc0-1 2020-08-16 11:09:18 -03:00
David Bremner
efb135bed1 version: bump to 0.31~rc0
Start the release process for 0.31
2020-08-16 11:06:13 -03:00
William Casarin
bcfd8575e5 emacs/tree: add notmuch-tree-archive-thread-then-next
Now that notmuch-tree-next-thread acts more like its notmuch-show
counterpart, let's update the binding to move to the next thread after
archiving.

Signed-off-by: William Casarin <jb55@jb55.com>
2020-08-16 10:42:27 -03:00
William Casarin
874f14ec2b emacs/tree: enable moving to next thread in search results
This introduces a new function called
notmuch-tree-next-thread-from-search which is analogous to
notmuch-show-next-thread. It will switch to the next or previous
thread from the parent search results.

We rename notmuch-tree-{prev,next}-thread to a more descriptive
notmuch-tree-{prev,next}-thread-in-tree to reflect the fact that it
only moves to the next thread in the current tree.

notmuch-tree-next-thread now switches to the next thread in the
current tree first, but if there are none, it looks for the next tree
in the search results.

This makes notmuch-tree feel more like notmuch-show when using the
M-Enter, M-n and M-p bindings.

Signed-off-by: William Casarin <jb55@jb55.com>
2020-08-16 10:42:17 -03:00
William Casarin
189175ecd6 emacs/tree: introduce notmuch-tree-parent-buffer variable
This variable will be used in a similar fashion to
notmuch-show-parent-buffer. It will be used to navigate between
threads from the parent search buffer.

Signed-off-by: William Casarin <jb55@jb55.com>
2020-08-16 10:42:02 -03:00
David Bremner
25f9a42287 test: update README to reflect dropping upgrade tests
These test databases have been unneeded since ee897cab8.
2020-08-16 10:41:44 -03:00
Teemu Likonen
adb90b9bb6 Emacs: Indent first header line only when indentation is turned on
Previously in message-show mode message's first header line (From
header) was always indented, even if user had turned thread
indentation off with "<" (notmuch-show-toggle-thread-indentation)
command.

This change modifies notmuch-show-insert-headerline function so that
it doesn't indent the first header line if notmuch-show-indent-content
variable is nil.

This change also modifies tests so that they expect this new output
format:
test/emacs-show.expected-output/notmuch-show-indent-thread-content-off
2020-08-15 09:16:34 -03:00
Tomi Ollila
0d4a3c7185 notmuch-mutt: replace shell pipeline with internal pipe processing
The shell pipeline used to symlink files based in search results
to "cache" directory for mutt(1) to use was prone to portability
problems (due to /bin/sh differences).

The replacement executes `notmuch search` without intermediate shell
(so shell_quote was removed in this case), reads the filenames from
piped output and symlinks files internally.
2020-08-12 20:40:46 -03:00
Tomi Ollila
00dc5dd824 configure: Check if emacs >= 25 (instead of >= 24) is available
"The minimum supported major version of GNU Emacs is now 25.1."

25.1 is the first "released" version of Emacs 25.
2020-08-12 20:24:29 -03:00
Jonas Bernoulli
1c80020e70 try-emacs-mua: Trim `require' advice for Emacs 25
- Since Emacs 25 comes with `load-prefer-newer' we can remove the
  complicated variant of the advice, which implemented a poorman's
  version of that.

- Since Emacs 25 comes with the new advice mechanism, we can use
  that now for the simple variant of the advice, which just informs
  about the library that is being required.
2020-08-09 21:17:50 -03:00
Jonas Bernoulli
6336c26d23 emacs: Use new advice mechanism do advice mm-shr
Also because we now only support Emacs >= 25,
we can remove the check for Emacs >= 24.
2020-08-09 21:17:39 -03:00
Jonas Bernoulli
3665914f71 emacs: Do not abuse advice to monkey patch while testing
Use `cl-letf*' instead.
2020-08-09 21:17:06 -03:00
Jonas Bernoulli
96baa22318 emacs: Drop old advices that were only need for Emacs 23 2020-08-09 21:16:12 -03:00
Jonas Bernoulli
08b26f449d emacs: Remove notmuch-read-char-choice
Just use `read-char-choice', which existed since Emacs 24.1.
2020-08-09 21:15:54 -03:00
Jonas Bernoulli
2156517d90 emacs: Remove notmuch-setq-local
Just use setq-local, which existed since Emacs 24.3.
2020-08-09 21:15:27 -03:00
Jonas Bernoulli
9946380e47 emacs: Use cl-incf where appropriate
It's shorter.  That's it pretty much.
2020-08-09 21:15:27 -03:00