Re: [PATCH v2] emacs: add notmuch-expr, sexp-style queries

2020-11-16 Thread David Edmondson
On Friday, 2020-11-13 at 23:01:22 +11, Tom Fitzhenry wrote: > From: Tom Fitzhenry > > notmuch-expr allows you to write notmuch search queries in sexp style like: > > (notmuch-expr > '(and > (to "emacs-devel") > "info manual" > (or > (not (is "spam")) > (is

Why some characters are not displayed correctly when setting mm-text-html-renderer to links

2020-11-16 Thread Wenlong Dai
I'm using gccemcs under WSL2 and trying to switch from mu4e to notmuch. One thing I immediately like about notmuch is that it's much more faster than mu4e. But I also almost immediately ran into some issues. The one that bothers me the most is, when I hit ENTER to open a long thread from

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

2020-11-16 Thread Jonas Bernoulli
David Edmondson writes: > On Sunday, 2020-11-08 at 20:02:57 +01, Jonas Bernoulli wrote: > > With a suggested rewording below... > > Reviewed-by: David Edmondson > >> --- >> emacs/notmuch-crypto.el | 3 +-- >> emacs/notmuch-hello.el | 3 +-- >> emacs/notmuch-mua.el| 11 --- >> 3

[PATCH v2 13/23] emacs: remove unnecessary notmuch-remove-if-not

2020-11-16 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 v2 06/23] emacs: define notmuch-hello-url as a constant

2020-11-16 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 v2 02/23] emacs: fix old bug in notmuch-mua-mail

2020-11-16 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 v2 01/23] emacs: remove redundant notmuch-hello-trim

2020-11-16 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 v2 03/23] emacs: remove kludge for Emacs 23 from notmuch-mua-mail

2020-11-16 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 v2 04/23] emacs: more cleanup since dropping support for Emacs 24

2020-11-16 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 v2 08/23] emacs: place only first sentence on first doc-string line

2020-11-16 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

[PATCH v2 07/23] emacs: shorten/replace first sentence of a few doc-strings

2020-11-16 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 00/23] Another set up Emacs cleanup

2020-11-16 Thread Jonas Bernoulli
This remove the first four commits, which have already been applied to master. It also makes requested minor changes to the three marked commits. Jonas Bernoulli (23): emacs: remove redundant notmuch-hello-trim emacs: fix old bug in notmuch-mua-mail emacs: remove kludge for Emacs 23 from

[PATCH v2 05/23] emacs: sanitize function that displays version

2020-11-16 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 v2 19/23] emacs: use setq-local

2020-11-16 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 v2 17/23] emacs: inline notmuch-split-content-type

2020-11-16 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 v2 11/23] emacs: misc doc-string improvements

2020-11-16 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..2c51e89b 100644 --- a/emacs/notmuch-address.el +++

[PATCH v2 12/23] emacs: remove deprecated notmuch-folder command

2020-11-16 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 v2 09/23] emacs: place complete first sentence on first doc-string line

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

Re: [PATCH 00/23] Another set up Emacs cleanup

2020-11-16 Thread David Edmondson
On Monday, 2020-11-16 at 22:28:20 +01, Jonas Bernoulli wrote: > This remove the first four commits, which have already been > applied to master. It also makes requested minor changes > to the three marked commits. For the set... Reviewed-by: David Edmondson > Jonas Bernoulli (23): > emacs:

Re: [PATCH v2] emacs: add notmuch-expr, sexp-style queries

2020-11-16 Thread Jonas Bernoulli
Tom Fitzhenry writes: > From: Tom Fitzhenry > > notmuch-expr allows you to write notmuch search queries in sexp style like: > > (notmuch-expr > '(and > (to "emacs-devel") > "info manual" > (or > (not (is "spam")) > (is "important" > > which will generate the

[PATCH v2 23/23] emacs: various cosmetic improvements

2020-11-16 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 v2 10/23] emacs: always use elisp quoting style in doc-strings

2020-11-16 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 v2 14/23] emacs: remove unused notmuch-address-locate-command

2020-11-16 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 v2 16/23] emacs: inline notmuch-documentation-first-line

2020-11-16 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 v2 21/23] emacs: do not quote self-quoting t

2020-11-16 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 v2 22/23] emacs: avoid binding unnamed commands in keymaps

2020-11-16 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 v2 18/23] emacs: use defvar-local

2020-11-16 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 v2 15/23] emacs: remove unnecessary notmuch-tree-button-activate

2020-11-16 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 v2 20/23] emacs: use setq instead set

2020-11-16 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

Re: [PATCH 27/27] emacs: various cosmetic improvements

2020-11-16 Thread Jonas Bernoulli
David Edmondson writes: > On Sunday, 2020-11-08 at 20:03:11 +01, Jonas Bernoulli wrote: > > There were some places here where you capitalised comments (more > generally, turned them into English prose) when they were moving for > $reasons, and others where you left them alone. Was there a