Re: emacs: error decrypting s/mime

2020-12-14 Thread Alexander Adolf
Alexander Adolf writes: > [...] > (defalias notmuch-show-insert-part-application/x-pkcs7-mime > notmuch-show-insert-part-application/pkcs7-mime) > [...] Err, this should be: (fset 'notmuch-show-insert-part-application/x-pkcs7-mime 'notmuch-show-insert-part-application/pkcs7-mime)

Re: emacs: error decrypting s/mime

2020-12-14 Thread Alexander Adolf
Hello David, David Bremner writes: > David Bremner writes: > >> >> It's not perfect (the encryption status for S/MIME needs some new UI >> code on the emacs end), but it's better than the status quo, as far as I >> can tell. > > I think this might be a deeper issue. Looking at the structure of

Re: consistent database corruption with notmuch new

2020-12-14 Thread Gregor Zattler
Hi notmuch developers, * Gregor Zattler [13. Dez. 2020]: > * Gregor Zattler [13. Dez. 2020]: >> I now do a notmuch new with libxapian30 version 1.4.17-1 >> and will report back in a few hours. > > The result is only slightly different from version 1.4.11: actually now I realized, that notmuch

Re: consistent database corruption with notmuch new

2020-12-14 Thread David Bremner
David Bremner writes: > David Bremner writes: > >> Gregor Zattler writes: >>> >>> I now do a notmuch new with libxapian30 version 1.4.17-1 >>> and will report back in a few hours. >>> >> >> I have just uploaded 0.31.3 to buster-backports > > Sorry, I meant 0.31.2-3. version 0.31.2-3~bpo10+2

[PATCH 31/32] emacs: use string-empty-p

2020-12-14 Thread Jonas Bernoulli
Unfortunately that means we have to explicitly require subr-x, which arguably should always be loaded without packages having to require it, but the Emacs developers decided otherwise. Loading it explicitly most likely comes without any additional cost because almost certainly some other packages

[PATCH 32/32] emacs: notmuch-tree-get-match: No longer define as command

2020-12-14 Thread Jonas Bernoulli
When called from code, then this function returns non-nil when the message at point is a matched message. However it does nothing at all to present that information to the user when it called interactively. It is therefore safe to conclude that nobody is using this as a command. ---

[PATCH 25/32] emacs: various doc-string improvements

2020-12-14 Thread Jonas Bernoulli
--- emacs/notmuch-draft.el | 12 ++- emacs/notmuch-maildir-fcc.el | 21 +- emacs/notmuch-mua.el | 9 emacs/notmuch-tag.el | 41 ++-- emacs/notmuch-tree.el| 10 - emacs/notmuch.el |

[PATCH 23/32] emacs: various cosmetic improvements

2020-12-14 Thread Jonas Bernoulli
--- emacs/notmuch-address.el | 22 -- emacs/notmuch-hello.el | 24 --- emacs/notmuch-jump.el| 4 +- emacs/notmuch-lib.el | 26 +-- emacs/notmuch-maildir-fcc.el | 61 +++--- emacs/notmuch-mua.el | 28 ++--

[PATCH 30/32] emacs: avoid unnecessary let-bindings

2020-12-14 Thread Jonas Bernoulli
To some extend this is a personal preference, but the preference is strongly dependent on whether one is used to a language that makes it necessary to use variables like this. This makes it perfectly clear that we are first getting and then using a "foo": (use-foo (get-foo)) Sure this has to

[PATCH 29/32] emacs: reorder notmuch.el a bit

2020-12-14 Thread Jonas Bernoulli
--- emacs/notmuch.el | 41 - 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index 0fb9874b..24b930bf 100644 --- a/emacs/notmuch.el +++ b/emacs/notmuch.el @@ -70,6 +70,8 @@ (eval-when-compile (require

[PATCH 10/32] emacs: make headings outline-minor-mode compatible

2020-12-14 Thread Jonas Bernoulli
`outline-minor-mode' treats comments that begin with three or more semicolons as headings. That makes it very convenient to navigate code and to show/hide parts of a file. Elips libraries typically have four top-level sections, e.g.: ;;; notmuch.el --- run notmuch within emacs... ;;;

[PATCH 27/32] emacs: define a few variables as automatically buffer-local

2020-12-14 Thread Jonas Bernoulli
Define these variables as automatically buffer-local, meaning that they always become buffer-local when set unless explicitly told otherwise using `setq-default' or when using the Custom interface. Previously they were declared, which keeps the byte-compiler quiet but is not actually the same as

[PATCH 26/32] emacs: remove variable notmuch-search-disjunctive-regexp

2020-12-14 Thread Jonas Bernoulli
The value is the only possible value, it is only used in one place, and using a global variable serves no purpose but to make things more complicated. --- emacs/notmuch.el | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/emacs/notmuch.el b/emacs/notmuch.el index

[PATCH 28/32] emacs: notmuch-search-stash-thread-id: use notmuch-search-query-string

2020-12-14 Thread Jonas Bernoulli
No longer use the function `notmuch-search-get-query', which does nothing but return the value of that variable. That function was added in [1: f47eeac0] for use in `notmuch-read-query' along-side related `notmuch-show-get-query' and `notmuch-tree-get-query' but using it here makes little sense.

[PATCH 22/32] emacs: notmuch-crypto-status-button-type: fix potential bug

2020-12-14 Thread Jonas Bernoulli
The "help-echo" can potentially contain an unintended %-spec so we have to make sure it would not be treated as such. --- emacs/notmuch-crypto.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el index 50a3de46..db7cb75d 100644

[PATCH 20/32] emacs: notmuch-mua-prompt-for-sender: don't force Ido on users

2020-12-14 Thread Jonas Bernoulli
We shouldn't force `ido-completion-read' on users who do not otherwise use Ido. Unfortunately simply turning on `ido-mode' does not change every `completing-read' into a `ido-completing-read', instead it only changes file and buffer completion. I do realize that existing Ido users will initially

[PATCH 24/32] emacs: various comment improvements

2020-12-14 Thread Jonas Bernoulli
--- emacs/notmuch-address.el | 5 ++--- emacs/notmuch-hello.el | 4 +--- emacs/notmuch-lib.el | 6 +++--- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el index 2f0ec9b3..1f22e377 100644 --- a/emacs/notmuch-address.el +++

[PATCH 18/32] emacs: notmuch-message-apply-queued-tag-changes: cosmetics

2020-12-14 Thread Jonas Bernoulli
--- emacs/notmuch-message.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el index 9dc8d056..abeff53a 100644 --- a/emacs/notmuch-message.el +++ b/emacs/notmuch-message.el @@ -62,9 +62,8 @@ (defvar-local

[PATCH 15/32] emacs: notmuch-wash-region-to-button: remove unused MSG argument

2020-12-14 Thread Jonas Bernoulli
--- emacs/notmuch-wash.el | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index 36041904..4fbb4e12 100644 --- a/emacs/notmuch-wash.el +++ b/emacs/notmuch-wash.el @@ -200,7 +200,7 @@ (defun notmuch-wash-button-label

[PATCH 17/32] emacs: define notmuch-message-queued-tag-changes as buffer-local

2020-12-14 Thread Jonas Bernoulli
Also improve the doc-string. --- emacs/notmuch-message.el | 14 +++--- emacs/notmuch-mua.el | 12 ++-- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/emacs/notmuch-message.el b/emacs/notmuch-message.el index f0e9ffcc..9dc8d056 100644 ---

[PATCH 21/32] emacs: notmuch-mua.el: move all options into "Options" section

2020-12-14 Thread Jonas Bernoulli
This is how we do it in other libraries. --- emacs/notmuch-mua.el | 32 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el index 2d0b7169..74ffd8f2 100644 --- a/emacs/notmuch-mua.el +++

[PATCH 19/32] emacs: notmuch-wash.el: require diff-mode at beginning of code

2020-12-14 Thread Jonas Bernoulli
That's what we usually do. Also do not declare variable `diff-file-header-re' because it is defined in `diff-mode.el', which we always require. --- emacs/notmuch-wash.el | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/emacs/notmuch-wash.el b/emacs/notmuch-wash.el index

[PATCH 12/32] emacs: deal with unused lexical arguments and variables

2020-12-14 Thread Jonas Bernoulli
The previous commit switched to lexical-binding but without dealing with the new warnings about unused lexical arguments and variables. This commit deals with most of them, in most cases by either removing leftover bindings that are actually unnecessary, or by marking certain arguments as "known

[PATCH 16/32] emacs: silence compiler wrt notmuch-show-insert-part-text/plain

2020-12-14 Thread Jonas Bernoulli
`notmuch-show-insert-part-text/plain' calls `notmuch-show-insert-text/plain-hook' with two arguments MSG and DEPTH. Currently all hook functions ignore MSG but third-party functions may not. One hook function uses DEPTH. --- emacs/notmuch-wash.el | 8 1 file changed, 4 insertions(+), 4

[PATCH 14/32] emacs: inline notmuch-sexp-eof into only caller

2020-12-14 Thread Jonas Bernoulli
This function had a few issues. - Neither its name nor the old comment before it is called made it clear what it does. - It took one argument but didn't do anything with it. - It's doc-string made a few claims, which are untrue and generally focused on details instead of that its purpose is.

[PATCH 13/32] emacs: notmuch-tag--get-formats: silence byte-compiler

2020-12-14 Thread Jonas Bernoulli
`format-alist' is a global variable and the byte-compiler is unhappy when a lexical function argument shadows a global (dynamic) binding. --- emacs/notmuch-tag.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el index

[PATCH 11/32] emacs: use lexical-bindings in all libraries

2020-12-14 Thread Jonas Bernoulli
Doing so causes many new compile warnings. Some of these warnings concern genuine changes in behavior that have to be addressed right away. Many other warnings are due to unused variables. Nothing has changed here, except that the byte-compiler can now detect these pre-existing and harmless

[PATCH 08/32] emacs: avoid passing around some redundant information

2020-12-14 Thread Jonas Bernoulli
When running "notmuch" we use its full path but when displaying the command to the user we show just its name for readability reasons. Avoid passing around both representations because it is very easy to get the name from the path. Notmuch itself uses the involved functions just for "notmuch" but

[PATCH 06/32] emacs: notmuch-start-notmuch-sentinel: assert buffer is alive

2020-12-14 Thread Jonas Bernoulli
--- emacs/notmuch-lib.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 21fa2582..06ca8cdc 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -917,7 +917,8 @@ (defun notmuch-start-notmuch (name buffer sentinel

[PATCH 05/32] emacs: notmuch-start-notmuch-error-sentinel: assert buffer is alive

2020-12-14 Thread Jonas Bernoulli
--- emacs/notmuch-lib.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el index 76387779..21fa2582 100644 --- a/emacs/notmuch-lib.el +++ b/emacs/notmuch-lib.el @@ -956,7 +956,8 @@ (defun notmuch-start-notmuch-sentinel (proc event)

[PATCH 07/32] emacs: notmuch-start-notmuch: avoid storing process buffer twice

2020-12-14 Thread Jonas Bernoulli
The buffer of the error process is accessible using `process-buffer'. We still have to store the error-buffer in the non-error process because for that process `process-buffer' obviously returns its own buffer. --- emacs/notmuch-lib.el | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)

[PATCH 09/32] emacs: avoid killing process buffer when process is still alive

2020-12-14 Thread Jonas Bernoulli
In practice this probably does not make a difference or we would have heard about it many times, but better be safe than sorry. Process sentinels are called not only when the process has finished but also on other state changes. --- emacs/notmuch-lib.el | 7 --- 1 file changed, 4

[PATCH 03/32] emacs: define new notmuch-search-item widget type

2020-12-14 Thread Jonas Bernoulli
This is complex enough to warrant a dedicated widget type, which will make future improvements less messy to implement. --- emacs/notmuch-hello.el | 92 +- 1 file changed, 45 insertions(+), 47 deletions(-) diff --git a/emacs/notmuch-hello.el

[PATCH 02/32] emacs: sanitize dedicated widget action/notify functions

2020-12-14 Thread Jonas Bernoulli
These functions are used as action/notify functions. That dictates the appropriate function signatures but even though these functions are not used for anything else they use incompatible signatures, forcing the callers to use lambda expressions to deal with these incompatibilities. Fix that by

[PATCH 04/32] emacs: notmuch-start-notmuch: remove backward compatibility code

2020-12-14 Thread Jonas Bernoulli
We no longer support Emacs releases before version 25.1. Also adjust the sentinels which only had to deal with an error file when using an older Emacs release was used. --- emacs/notmuch-lib.el | 64 1 file changed, 17 insertions(+), 47 deletions(-)

[PATCH 01/32] emacs: use setq instead of set

2020-12-14 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 00/32] [emacs] Add outline headings and switch to lexical scope

2020-12-14 Thread Jonas Bernoulli
Hello, This patch serious changes a number of things, including boring cleanup, but the big changes are the following. The respective commits are also marked in the list below. See these commits for longer descriptions. 1. Split all libraries into sections by adding new headings or

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

2020-12-14 Thread David Bremner
Jonas Bernoulli writes: > David Bremner writes: > > You seem to have accidentally dropped another commits, which is why > this commit did not apply. I have another series with a "few" commits > waiting for submissions and will just lead that with these two commits > from the last series.

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

2020-12-14 Thread Jonas Bernoulli
David Bremner writes: > Apologies for the delay, I missed the second review. No problem, I probably should just have pinged after a week or so. Will do that next time. Sorry for being slow to respond myself! By the way, you seem to have missed some more patch series of mine: -

Re: consistent database corruption with notmuch new

2020-12-14 Thread Gregor Zattler
Hi David, notmuch developers, * David Edmondson [14. Dez. 2020]: > Which filesystem are you using for the mail store? > > I had similar looking problems when using ZFS and never got to the > bottom of it. this is a ext4 file system, which gets checked every time I boot my laptop. I also run

Re: consistent database corruption with notmuch new

2020-12-14 Thread David Edmondson
Which filesystem are you using for the mail store? I had similar looking problems when using ZFS and never got to the bottom of it. dme. -- Why does it have to be like this? I can never tell. ___ notmuch mailing list -- notmuch@notmuchmail.org To