notmuch release 0.31.1 now available

2020-11-08 Thread David Bremner
Where to obtain notmuch 0.31.1 === https://notmuchmail.org/releases/notmuch-0.31.1.tar.xz Which can be verified with: https://notmuchmail.org/releases/notmuch-0.31.1.tar.xz.sha256.asc -BEGIN PGP SIGNED MESSAGE- Hash: SHA256

[PATCH] Revert "emacs: notmuch-search: avoid wiping out buffer-local variables"

2020-11-08 Thread Jonas Bernoulli
This reverts commit f9fbd1ee3bfd679175d88af403752d87a730349f. Emacs provides a mechanism for avoiding wiping out buffer-local variables: marking them as "permanent local", which essentially means "don't wip out the local value when enabling major-mode". (put 'the-variable 'permanent-local t)

[PATCH 00/27] Another set up Emacs cleanup

2020-11-08 Thread Jonas Bernoulli
I did it again; looked at some code and cleaned it up along the way. Cheers, Jonas Jonas Bernoulli (27): emacs: silence byte-compiler emacs: define notmuch-message-mode-map explicitly emacs: add doc-string to notmuch-tree-mode-map emacs: don't fset keymaps emacs: remove

[PATCH 02/27] emacs: define notmuch-message-mode-map explicitly

2020-11-08 Thread Jonas Bernoulli
Key bindings should not be defined at the top-level but inside a `defvar' form. Doing it at the top-level makes it harder to reliably customize key bindings. --- emacs/notmuch-mua.el | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-mua.el

[PATCH 07/27] emacs: remove kludge for Emacs 23 from notmuch-mua-mail

2020-11-08 Thread Jonas Bernoulli
Notmuch requires at least Emacs version 25. The `return-action' argument was added prior to Emacs 24.1 in 25ca2e61403f97b5a023164f2924d5f8aca2492a. --- emacs/notmuch-mua.el | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el

[PATCH 09/27] emacs: sanitize function that displays version

2020-11-08 Thread Jonas Bernoulli
Previously it was defined in "notmuch-hello.el" and its name contained "hello" solely because it replaced an anonymous function that was mistakenly only bound in `notmuch-hello-mode-map'. But it makes more sense to bind it in all notmuch modes and even if we did not change that aspect it still

[PATCH 15/27] emacs: misc doc-string improvements

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-address.el | 6 +++--- emacs/notmuch-crypto.el | 4 ++-- emacs/notmuch-mua.el | 7 --- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index 561cc140..04353522 100644 --- a/emacs/notmuch-address.el +++

[PATCH 08/27] emacs: more cleanup since dropping support for Emacs 24

2020-11-08 Thread Jonas Bernoulli
Notmuch requires at least version 25 of Emacs now. Adjust comments that previously referenced version 24 specifically, even though they also apply to later releases. Remove documentation and code that no longer applies. - `mm-shr' no longer references `gnus-inhibit-images'. ---

[PATCH 06/27] emacs: fix old bug in notmuch-mua-mail

2020-11-08 Thread Jonas Bernoulli
This fixes a regression introduced in [1: 7e20d264]. If the argument RETURN-ACTION was non-nil then we should pass along the value of that argument. Instead we passed along the constant symbol `return-action'. 1: 7e20d26480553f57d53bd9ec28cae163c1ac91e3 emacs: Fix mail composition under

[PATCH 01/27] emacs: silence byte-compiler

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-tree.el | 5 + 1 file changed, 5 insertions(+) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index f342f85a..7b1e34ca 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -42,6 +42,11 @@ (declare-function notmuch-read-query "notmuch" (prompt))

[PATCH 25/27] emacs: do not quote self-quoting t

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-draft.el | 6 +++--- emacs/notmuch-maildir-fcc.el | 10 +- emacs/notmuch-mua.el | 6 +++--- emacs/notmuch-show.el| 2 +- emacs/notmuch-tag.el | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/emacs/notmuch-draft.el

[PATCH 27/27] emacs: various cosmetic improvements

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-address.el | 31 ++ emacs/notmuch-hello.el | 28 + emacs/notmuch-lib.el | 38 + emacs/notmuch-mua.el | 10 ++--- emacs/notmuch-tag.el | 2 +- emacs/notmuch.el | 88 6 files

[PATCH 22/27] emacs: use defvar-local

2020-11-08 Thread Jonas Bernoulli
It is available since Emacs 24.3 and we require at least Emacs 25. --- emacs/coolj.el | 4 +--- emacs/notmuch-company.el | 4 ++-- emacs/notmuch-draft.el | 3 +-- emacs/notmuch-lib.el | 8 ++-- emacs/notmuch-show.el| 18 ++ emacs/notmuch-tree.el| 27

[PATCH 14/27] emacs: always use elisp quoting style in doc-strings

2020-11-08 Thread Jonas Bernoulli
Emacs doc-strings use neither markdown nor lisp symbol quoting. --- emacs/notmuch-address.el | 2 +- emacs/notmuch-draft.el | 8 emacs/notmuch-hello.el | 4 ++-- emacs/notmuch-maildir-fcc.el | 2 +- emacs/notmuch-tag.el | 20 ++--

[PATCH 10/27] emacs: define notmuch-hello-url as a constant

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-hello.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index 69d0ad64..003bec33 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -282,7 +282,7 @@ (defcustom notmuch-hello-refresh-hook nil

[PATCH 17/27] emacs: remove unnecessary notmuch-remove-if-not

2020-11-08 Thread Jonas Bernoulli
We could just have switched to using `cl-remove-if-not' instead, but the two uses of the *remove-if-not function are pretty strange to begin with so we refactor to not use any such function at all. --- emacs/notmuch-hello.el | 43 -- emacs/notmuch-lib.el

[PATCH 26/27] emacs: avoid binding unnamed commands in keymaps

2020-11-08 Thread Jonas Bernoulli
One should never bind unnamed commands in keymaps because doing that makes it needlessly hard for users to change these bindings. Replace such anonymous bindings with named commands that are generated using macros and some boilerplate. Using macros is better than using a simple loop because that

[PATCH 23/27] emacs: use setq-local

2020-11-08 Thread Jonas Bernoulli
It is available since Emacs 24.3 and we require at least Emacs 25. It makes the variable buffer-local if it isn't always buffer-local anyway. --- emacs/notmuch-company.el | 3 +-- emacs/notmuch-parser.el | 5 ++--- emacs/notmuch.el | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-)

[PATCH 21/27] emacs: inline notmuch-split-content-type

2020-11-08 Thread Jonas Bernoulli
This trivial helper function actually made things slightly *less* readable by adding an unnecessary indirection. --- emacs/notmuch-lib.el | 8 ++-- emacs/notmuch-show.el | 16 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/emacs/notmuch-lib.el

[PATCH 24/27] emacs: use setq instead set

2020-11-08 Thread Jonas Bernoulli
Commonly `set' is only used if there is no way around it; i.e. when the variable cannot be known until runtime. --- emacs/notmuch-tree.el | 2 +- emacs/notmuch.el | 14 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/emacs/notmuch-tree.el

[PATCH 18/27] emacs: remove unused notmuch-address-locate-command

2020-11-08 Thread Jonas Bernoulli
We stopped using it in [1: 0e671478]. 1: 0e671478c6f37018973392f049979da5e1a8ff99 emacs: replace use of notmuch-address-message-insinuate --- emacs/notmuch-address.el | 19 --- 1 file changed, 19 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el

[PATCH 19/27] emacs: remove unnecessary notmuch-tree-button-activate

2020-11-08 Thread Jonas Bernoulli
Since [1: f8bdba37] no key is bound to this command and it is redundant because the behavior of `push-command' is identical when called as a command. 1: f8bdba37d3f4c877e05e17b5b1c7d2d512106538 emacs: tree: remove binding for pressing button in message pane --- emacs/notmuch-tree.el | 8

[PATCH 20/27] emacs: inline notmuch-documentation-first-line

2020-11-08 Thread Jonas Bernoulli
Inline a simplified version of `notmuch-documentation-first-line' into its only caller. The new code snippet differs from the removed function in that it returns nil instead of the empty string for symbols that have no function documentation. That value is ultimately used as an argument to

[PATCH 16/27] emacs: remove deprecated notmuch-folder command

2020-11-08 Thread Jonas Bernoulli
It has been deprecated for a decade and it's time to let go. --- emacs/notmuch-hello.el | 5 - 1 file changed, 5 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index bc07c29c..f5d9e0ec 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@ -987,11

[PATCH 04/27] emacs: don't fset keymaps

2020-11-08 Thread Jonas Bernoulli
These keymaps are never invoked as commands so the function definitions serve no purpose. --- emacs/notmuch-show.el | 1 - emacs/notmuch-tree.el | 1 - emacs/notmuch.el | 1 - 3 files changed, 3 deletions(-) diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el index b08ceb97..ec22fd94

[PATCH 13/27] emacs: place complete first sentence on first doc-string line

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-crypto.el | 3 +-- emacs/notmuch-hello.el | 3 +-- emacs/notmuch-mua.el| 11 --- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index 276c9859..4fab215a 100644 --- a/emacs/notmuch-crypto.el +++

[PATCH 11/27] emacs: shorten/replace first sentence of a few doc-strings

2020-11-08 Thread Jonas Bernoulli
The first sentence should fit on the first line. It is okay if the first sentence/line does not contain all the information that the rest of the doc-string covers. --- emacs/notmuch-show.el | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-show.el

[PATCH 03/27] emacs: add doc-string to notmuch-tree-mode-map

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-tree.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el index 7b1e34ca..ea6a5cf3 100644 --- a/emacs/notmuch-tree.el +++ b/emacs/notmuch-tree.el @@ -359,7 +359,8 @@ (defvar notmuch-tree-mode-map (define-key

[PATCH 05/27] emacs: remove redundant notmuch-hello-trim

2020-11-08 Thread Jonas Bernoulli
Use `string-trim', which exists since Emacs 24.4. --- emacs/notmuch-hello.el | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el index bb60a890..b67a5e19 100644 --- a/emacs/notmuch-hello.el +++ b/emacs/notmuch-hello.el @@

[PATCH 12/27] emacs: place only first sentence on first doc-string line

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-mua.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 49bad00d..9d08c2c9 100644 --- a/emacs/notmuch-mua.el +++ b/emacs/notmuch-mua.el @@ -62,8 +62,8 @@ (defcustom notmuch-mua-compose-in 'current-window

notmuch release 0.31.2 now available

2020-11-08 Thread David Bremner
Where to obtain notmuch 0.31.2 === https://notmuchmail.org/releases/notmuch-0.31.2.tar.xz Which can be verified with: https://notmuchmail.org/releases/notmuch-0.31.2.tar.xz.sha256.asc -BEGIN PGP SIGNED MESSAGE- Hash: SHA256

[PATCH 2/3] emacs: allow opting out of notmuch's address completion

2020-11-08 Thread Jonas Bernoulli
IMO Notmuch should not override the default completion mechanism by default, at least not globally. But since users are already used to this behavior it is probably too late to change it. Do the next best thing and at least allow users to opt out. --- emacs/notmuch-address.el | 48

[PATCH 0/3] emacs: allow opting out of notmuch's address completion

2020-11-08 Thread Jonas Bernoulli
Hello Notmuch's address completion didn't work well for me. I read the respective code and found some issues, some of which are difficult to address. I wrote my own implementation, which might eventually be suitable as a replacement for the current implementation, but it is not ready yet. In a

[PATCH 1/3] emacs: notmuch-address-setup: cosmetics

2020-11-08 Thread Jonas Bernoulli
--- emacs/notmuch-address.el | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index 8a6d299c..3518beef 100644 --- a/emacs/notmuch-address.el +++ b/emacs/notmuch-address.el @@ -21,6 +21,8 @@ ;;; Code:

[PATCH 3/3] emacs: notmuch-address-expand-name: use the actual initial-input

2020-11-08 Thread Jonas Bernoulli
Users may type some text into the buffer on an address line, before actually invoking address completion. We now use that text as the initial input when we begin address completion. Previously we did knowingly replace the actual initial input with some completion candidate that happens to match.

Re: [PATCH 01/27] emacs: silence byte-compiler

2020-11-08 Thread William Casarin
Jonas Bernoulli writes: > --- > emacs/notmuch-tree.el | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el > index f342f85a..7b1e34ca 100644 > --- a/emacs/notmuch-tree.el > +++ b/emacs/notmuch-tree.el > @@ -42,6 +42,11 @@ (declare-function

Re: [PATCH] Revert "emacs: notmuch-search: avoid wiping out buffer-local variables"

2020-11-08 Thread Sean Whitton
Hello, On Sun 08 Nov 2020 at 06:49PM +01, Jonas Bernoulli wrote: > This reverts commit f9fbd1ee3bfd679175d88af403752d87a730349f. > > Emacs provides a mechanism for avoiding wiping out buffer-local > variables: marking them as "permanent local", which essentially > means "don't wip out the local