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 value when enabling major-mode".
>
>   (put 'the-variable 'permanent-local t)
>
> See (info "(elisp)Creating Buffer-Local").
>
> Whether refreshing the buffer contents should involve re-enable the
> mode is a different question, which should not be decided based on
> the fact that we want keep the value of some random variable, not
> least because some other (e.g. cache) variables are likely expected
> to be wiped.

Nice, thank you for the info.  I've tested that my usecase works after
reverting the patch so I support reverting it.

Reviewed-by: Sean Whitton 

-- 
Sean Whitton
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


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 notmuch-read-query "notmuch" (prompt))
>  (declare-function notmuch-search-find-thread-id "notmuch" (&optional bare))
>  (declare-function notmuch-search-find-subject "notmuch" ())
>  
> +;; For `notmuch-tree-next-thread-from-search'.
> +(declare-function notmuch-search-next-thread "notmuch" ())
> +(declare-function notmuch-search-previous-thread "notmuch" ())
> +(declare-function notmuch-tree-from-search-thread "notmuch" ())
> +
>  ;; the following variable is defined in notmuch.el
>  (defvar notmuch-search-query-string)

LGTM, I have a similar patch here: id:20200908171536.20679-1-j...@jb55.com

Reviewed-by: William Casarin 
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 +++-
 1 file changed, 28 insertions(+), 20 deletions(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index 3518beef..6e29b99a 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -52,21 +52,28 @@ (defun notmuch-address--harvest-ready ()
 (defcustom notmuch-address-command 'internal
   "Determines how address completion candidates are generated.
 
-If it is a string then that string should be an external program
-which must take a single argument (searched string) and output a
-list of completion candidates, one per line.
-
-Alternatively, it can be the symbol `internal', in which case
-internal completion is used; the variable
-`notmuch-address-internal-completion' can be used to customize
-this case.
-
-Finally, if this variable is nil then address completion is
-disabled."
+If this is a string, then that string should be an external
+program, which must take a single argument (searched string)
+and output a list of completion candidates, one per line.
+
+If this is the symbol `internal', then an implementation is used
+that relies on the \"notmuch address\" command, but does not use
+any third-party (i.e. \"external\") programs.
+
+If this is the symbol `as-is', then Notmuch does not modify the
+value of `message-completion-alist'. This option has to be set to
+this value before `notmuch' is loaded, otherwise the modification
+to `message-completion-alist' may already have taken place. This
+setting obviously does not prevent `message-completion-alist'
+from being modified at all; the user or some third-party package
+may still modify it.
+
+Finally, if this is nil, then address completion is disabled."
   :type '(radio
- (const :tag "Use internal address completion" internal)
- (const :tag "Disable address completion" nil)
- (string :tag "Use external completion command"))
+ (const  :tag "Use internal address completion" internal)
+ (string :tag "Use external completion command")
+ (const  :tag "Disable address completion" nil)
+ (const  :tag "Use default or third-party mechanism" as-is))
   :group 'notmuch-send
   :group 'notmuch-address
   :group 'notmuch-external)
@@ -156,12 +163,13 @@ (defcustom notmuch-address-use-company t
   :group 'notmuch-address)
 
 (defun notmuch-address-setup ()
-  (when (and notmuch-address-use-company
-(require 'company nil t))
-(notmuch-company-setup))
-  (cl-pushnew (cons notmuch-address-completion-headers-regexp
-   #'notmuch-address-expand-name)
- message-completion-alist :test #'equal))
+  (unless (eq notmuch-address-command 'as-is)
+(when (and notmuch-address-use-company
+  (require 'company nil t))
+  (notmuch-company-setup))
+(cl-pushnew (cons notmuch-address-completion-headers-regexp
+ #'notmuch-address-expand-name)
+   message-completion-alist :test #'equal)))
 
 (defun notmuch-address-toggle-internal-completion ()
   "Toggle use of internal completion for current buffer.
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 first step I would like to make it possible to use notmuch and
some other address completion mechanism without having to advice a
notmuch-address.el function to prevent it making destructive changes.
The second commit in this series does that.  Here is the hack I am
currently using instead:

,
| ;;; Counteract notmuch-address.el
| 
| (defun notmuch-address-setup--noop (_fn)
|   "Prevent modification of `message-completion-alist'.")
| (advice-add 'notmuch-address-setup :around
| 'notmuch-address-setup--noop)
`

You can find my implementation (named notmuch-addr.el because it is
like notmuch-address.el, but "smaller") here:

,
| https://git.sr.ht/~tarsius/notmuch-addr
`

The main reason I am not trying to improve that until it can serve as
a replacement for notmuch-address.el is that it depends on Emacs 27.1,
which was just released. (Aside from that it also omits features that
*I* don't need.)

The main reason I am listing defects of notmuch-address.el below is
that by the time we can fix all of them (when we drop support for
Emacs releases before 27.1) I will have forgotten about them, so it
seem like a good idea to document them.

* Emacs' address completion API used to be rather wacky and that was
  not fixed until version 27.1. "Callers" didn't merely have to
  provide a list of completion candidate, instead they actually had to
  perform completion themselves.  Starting with 27.1 the completion-
  at-point API is respected but there are kludges to support the old
  style as well, see https://git.savannah.gnu.org/cgit/emacs.git/com
  mit/?id=47a767c24e9cc4323432e29103b0a2cc46f8f3e4.

  Using capf API has the advantage that many things don't have to be
  re-implemented.  For example `company-mode' just works.  Notmuch
  currently has to implement support explicitly in notmuch-company.el.

* Some essentially random completion candidate is used as the "initial
  input".  The last commit in this series (which see) fixes that.

* The special cases when there is not matching candidate or just a
  single match are handled specifically, which IMO is an optimization
  that makes things worse.  That should also be an easy fix, but since
  it might also be a controversial change, I did not implement it.

* Completion candidates are pre-filered based on the text that was
  already at-point before at-point completion was invoked, which makes
  it possible to choose candidates that that initial text does not
  match.  IMO that's another optimization that badly back fires.

  I was surprised to learn that notmuch shared this feature/defect
  with the current default address implementation in Emacs 27.1.

  The initial commit of my implementation also shares this defect;
  but only so that I can use the second commit to demonstrate how
  that can be fixed.

 Cheers,
 Jonas

Jonas Bernoulli (3):
  emacs: notmuch-address-setup: cosmetics
  emacs: allow opting out of notmuch's address completion
  emacs: notmuch-address-expand-name: use the actual initial-input

 emacs/notmuch-address.el | 57 
 1 file changed, 29 insertions(+), 28 deletions(-)

-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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:
 
+(eval-when-compile (require 'cl-lib))
+
 (require 'message)
 (require 'notmuch-parser)
 (require 'notmuch-lib)
@@ -154,15 +156,12 @@ (defcustom notmuch-address-use-company t
   :group 'notmuch-address)
 
 (defun notmuch-address-setup ()
-  (let* ((setup-company (and notmuch-address-use-company
-(require 'company nil t)))
-(pair (cons notmuch-address-completion-headers-regexp
-#'notmuch-address-expand-name)))
-(when setup-company
-  (notmuch-company-setup))
-(unless (member pair message-completion-alist)
-  (setq message-completion-alist
-   (push pair message-completion-alist)
+  (when (and notmuch-address-use-company
+(require 'company nil t))
+(notmuch-company-setup))
+  (cl-pushnew (cons notmuch-address-completion-headers-regexp
+   #'notmuch-address-expand-name)
+ message-completion-alist :test #'equal))
 
 (defun notmuch-address-toggle-internal-completion ()
   "Toggle use of internal completion for current buffer.
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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. Which candidate is used is
essentially random, at least when the actual initial input is short.
As a result users very often had to begin completion by deleting the
less than helpful "initial input".
---
 emacs/notmuch-address.el | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index 6e29b99a..591ad7ae 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -238,14 +238,8 @@ (defun notmuch-address-expand-name ()
(t
 (funcall notmuch-address-selection-function
  (format "Address (%s matches): " num-options)
- ;; We put the first match as the initial
- ;; input; we put all the matches as
- ;; possible completions, moving the
- ;; first match to the end of the list
- ;; makes cursor up/down in the list work
- ;; better.
- (append (cdr options) (list (car options)))
- (car options))
+ options
+ orig)
   (if chosen
  (progn
(push chosen notmuch-address-history)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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
 (const :tag "Compose mail in a new frame"   new-frame)))
 
 (defcustom notmuch-mua-user-agent-function nil
-  "Function used to generate a `User-Agent:' string. If this is
-`nil' then no `User-Agent:' will be generated."
+  "Function used to generate a `User-Agent:' string.
+If this is `nil' then no `User-Agent:' will be generated."
   :type '(choice (const :tag "No user agent string" nil)
 (const :tag "Full" notmuch-mua-user-agent-full)
 (const :tag "Notmuch" notmuch-mua-user-agent-notmuch)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 makes it possible for `find-function' to find
the definitions. Eat your boilerplate--it forms character.

Admittedly this approach is quite ugly and it might be better to teach
the original commands to support different buffers directly instead of
requiring wrapper commands to do just that.

Never-the-less as a short-term solution this is better than what we
had before.
---
 emacs/notmuch-tree.el | 126 --
 1 file changed, 72 insertions(+), 54 deletions(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 7cc28b62..17863f6a 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -238,57 +238,83 @@ (defvar-local notmuch-tree-message-buffer nil
 if the user has loaded a different buffer in that window.")
 (put 'notmuch-tree-message-buffer 'permanent-local t)
 
-(defun notmuch-tree-to-message-pane (func)
-  "Execute FUNC in message pane.
-
-This function returns a function (so can be used as a keybinding)
-which executes function FUNC in the message pane if it is
-open (if the message pane is closed it does nothing)."
-  `(lambda ()
- ,(concat "(In message pane) " (documentation func t))
+(defmacro notmuch-tree--define-do-in-message-window (name cmd)
+  "Define NAME as a command that calls CMD interactively in the message window.
+If the message pane is closed then this command does nothing.
+Avoid using this macro in new code; it will be removed."
+  `(defun ,name ()
+ ,(concat "(In message window) " (documentation cmd t))
  (interactive)
  (when (window-live-p notmuch-tree-message-window)
(with-selected-window notmuch-tree-message-window
-(call-interactively #',func)
-
-(defun notmuch-tree-inherit-from-message-pane (sym)
-  "Return value of SYM in message-pane if open, or tree-pane if not."
+(call-interactively #',cmd)
+
+(notmuch-tree--define-do-in-message-window
+ notmuch-tree-previous-message-button
+ notmuch-show-previous-button)
+(notmuch-tree--define-do-in-message-window
+ notmuch-tree-next-message-button
+ notmuch-show-next-button)
+(notmuch-tree--define-do-in-message-window
+ notmuch-tree-toggle-message-process-crypto
+ notmuch-show-toggle-process-crypto)
+
+(defun notmuch-tree--message-process-crypto ()
+  "Return value of `notmuch-show-process-crypto' in the message window.
+If that window isn't alive, then return the current value.
+Avoid using this function in new code; it will be removed."
   (if (window-live-p notmuch-tree-message-window)
   (with-selected-window notmuch-tree-message-window
-   (symbol-value sym))
-(symbol-value sym)))
-
-(defun notmuch-tree-close-message-pane-and (func)
-  "Close message pane and execute FUNC.
-
-This function returns a function (so can be used as a keybinding)
-which closes the message pane if open and then executes function
-FUNC."
-  `(lambda ()
- ,(concat "(Close message pane and) " (documentation func t))
+   notmuch-show-process-crypto)
+notmuch-show-process-crypto))
+
+(defmacro notmuch-tree--define-close-message-window-and (name cmd)
+  "Define NAME as a variant of CMD.
+
+NAME determines the value of `notmuch-show-process-crypto' in the
+message window, closes the window, and then call CMD interactively
+with that value let-bound.  If the message window does not exist,
+then NAME behaves like CMD."
+  `(defun ,name ()
+ ,(concat "(Close message pane and) " (documentation cmd t))
  (interactive)
  (let ((notmuch-show-process-crypto
-   (notmuch-tree-inherit-from-message-pane 
'notmuch-show-process-crypto)))
+   (notmuch-tree--message-process-crypto)))
(notmuch-tree-close-message-window)
-   (call-interactively #',func
+   (call-interactively #',cmd
+
+(notmuch-tree--define-close-message-window-and
+ notmuch-tree-help
+ notmuch-help)
+(notmuch-tree--define-close-message-window-and
+ notmuch-tree-new-mail
+ notmuch-mua-new-mail)
+(notmuch-tree--define-close-message-window-and
+ notmuch-tree-jump-search
+ notmuch-jump-search)
+(notmuch-tree--define-close-message-window-and
+ notmuch-tree-forward-message
+ notmuch-show-forward-message)
+(notmuch-tree--define-close-message-window-and
+ notmuch-tree-reply-sender
+ notmuch-show-reply-sender)
+(notmuch-tree--define-close-message-window-and
+ notmuch-tree-reply
+ notmuch-show-reply)
+(notmuch-tree--define-close-message-window-and
+ notmuch-tree-view-raw-message
+ notmuch-show-view-raw-message)
 
 (defvar notmuch-tree-mode-map
   (let ((map (make-sparse-keymap)))
 (set-keymap-parent map notmuch-common-keymap)
-;; The following override the global keymap.
-;; Override because we want to close message pane first.
-(defi

[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 changed, 91 insertions(+), 106 deletions(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index 21d1d82f..0dedd5d5 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -21,6 +21,8 @@
 
 ;;; Code:
 
+(eval-when-compile (require 'cl-lib))
+
 (require 'message)
 (require 'notmuch-parser)
 (require 'notmuch-lib)
@@ -154,15 +156,12 @@ (defcustom notmuch-address-use-company t
   :group 'notmuch-address)
 
 (defun notmuch-address-setup ()
-  (let* ((setup-company (and notmuch-address-use-company
-(require 'company nil t)))
-(pair (cons notmuch-address-completion-headers-regexp
-#'notmuch-address-expand-name)))
-(when setup-company
-  (notmuch-company-setup))
-(unless (member pair message-completion-alist)
-  (setq message-completion-alist
-   (push pair message-completion-alist)
+  (when (and notmuch-address-use-company
+(require 'company nil t))
+(notmuch-company-setup))
+  (cl-pushnew (cons notmuch-address-completion-headers-regexp
+   #'notmuch-address-expand-name)
+ message-completion-alist :test #'equal))
 
 (defun notmuch-address-toggle-internal-completion ()
   "Toggle use of internal completion for current buffer.
@@ -251,11 +250,8 @@ (defun notmuch-address-expand-name ()
(t nil)))
 
 (defun notmuch-address-harvest-addr (result)
-  (let ((name-addr (plist-get result :name-addr)))
-(puthash name-addr t notmuch-address-completions)))
-
-(defun notmuch-address-harvest-handle-result (obj)
-  (notmuch-address-harvest-addr obj))
+  (puthash (plist-get result :name-addr)
+  t notmuch-address-completions))
 
 (defun notmuch-address-harvest-filter (proc string)
   (when (buffer-live-p (process-buffer proc))
@@ -264,7 +260,7 @@ (defun notmuch-address-harvest-filter (proc string)
(goto-char (point-max))
(insert string))
   (notmuch-sexp-parse-partial-list
-   'notmuch-address-harvest-handle-result (process-buffer proc)
+   'notmuch-address-harvest-addr (process-buffer proc)
 
 (defvar notmuch-address-harvest-procs '(nil . nil)
   "The currently running harvests.
@@ -375,7 +371,7 @@ (defun notmuch-address--load-address-hash ()
 (defun notmuch-address--save-address-hash ()
   (when notmuch-address-save-filename
 (if (or (not (file-exists-p notmuch-address-save-filename))
-   ;; The file exists, check it is a file we saved
+   ;; The file exists, check it is a file we saved.
(notmuch-address--get-address-hash))
(with-temp-file notmuch-address-save-filename
  (let ((save-plist
@@ -398,8 +394,7 @@ (defun notmuch-address-harvest-trigger ()
nil nil
(lambda (proc event)
 ;; If harvest fails, we want to try
-;; again when the trigger is next
-;; called
+;; again when the trigger is next called.
 (if (string= event "finished\n")
 (progn
   (notmuch-address--save-address-hash)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index fa31694f..80af7544 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -402,8 +402,7 @@ (defun notmuch-hello-add-saved-search (widget)
 ;; If an existing saved search with this name exists, remove it.
 (setq notmuch-saved-searches
  (cl-loop for elem in notmuch-saved-searches
-  if (not (equal name
- (notmuch-saved-search-get elem :name)))
+  unless (equal name (notmuch-saved-search-get elem :name))
   collect elem))
 ;; Add the new one.
 (customize-save-variable 'notmuch-saved-searches
@@ -446,18 +445,14 @@ (defun notmuch-hello-reflect (list ncols)
 append (notmuch-hello-reflect-generate-row ncols nrows row list
 
 (defun notmuch-hello-widget-search (widget &rest ignore)
-  (cond
-   ((eq (widget-get widget :notmuch-search-type) 'tree)
-(notmuch-tree (widget-get widget
- :notmuch-search-terms)))
-   ((eq (widget-get widget :notmuch-search-type) 'unthreaded)
-(notmuch-unthreaded (widget-get widget
-   :notmuch-search-terms)))
+  (cl-case (widget-get widget :notmuch-search-type)
+   (tree
+(notmuch-tree (widget-get widget :notmuch-search-terms)))
+   (unthreaded
+(notmuch-unthreaded (widget-get widget :notmuch-search-terms)))
(t
-(notmuch-search (widget-get widget
-   :notmuch-search-terms)
-   (widget-get widget
-   :notmuch-search-oldest-first)
+(notmuch-search (

[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 +--
 6 files changed, 21 insertions(+), 43 deletions(-)

diff --git a/emacs/coolj.el b/emacs/coolj.el
index 39a8de2b..0385872f 100644
--- a/emacs/coolj.el
+++ b/emacs/coolj.el
@@ -50,9 +50,7 @@ (defcustom coolj-line-prefix-regexp "^\\(>+ \\)*"
   :group 'coolj
   :type 'regexp)
 
-(defvar coolj-wrap-point nil)
-
-(make-variable-buffer-local 'coolj-wrap-point)
+(defvar-local coolj-wrap-point nil)
 
 (defun coolj-determine-prefix ()
   "Determine the prefix for the current line."
diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el
index 9ee8ceca..9e743029 100644
--- a/emacs/notmuch-company.el
+++ b/emacs/notmuch-company.el
@@ -36,8 +36,8 @@ (eval-when-compile (require 'cl-lib))
 
 (require 'notmuch-lib)
 
-(defvar notmuch-company-last-prefix nil)
-(make-variable-buffer-local 'notmuch-company-last-prefix)
+(defvar-local notmuch-company-last-prefix nil)
+
 (declare-function company-begin-backend "company")
 (declare-function company-grab "company")
 (declare-function company-mode "company")
diff --git a/emacs/notmuch-draft.el b/emacs/notmuch-draft.el
index b13eb51c..ca720384 100644
--- a/emacs/notmuch-draft.el
+++ b/emacs/notmuch-draft.el
@@ -89,9 +89,8 @@ (defvar notmuch-draft-encryption-tag-regex
   "<#\\(part encrypt\\|secure.*mode=.*encrypt>\\)"
   "Regular expression matching mml tags indicating encryption of part or 
message.")
 
-(defvar notmuch-draft-id nil
+(defvar-local notmuch-draft-id nil
   "Message-id of the most recent saved draft of this message.")
-(make-variable-buffer-local 'notmuch-draft-id)
 
 (defun notmuch-draft--mark-deleted ()
   "Tag the last saved draft deleted.
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 2c8de328..e23999ad 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -435,9 +435,8 @@ (defun notmuch-subkeymap-help ()
  (insert desc)))
   (pop-to-buffer (help-buffer)
 
-(defvar notmuch-buffer-refresh-function nil
+(defvar-local notmuch-buffer-refresh-function nil
   "Function to call to refresh the current buffer.")
-(make-variable-buffer-local 'notmuch-buffer-refresh-function)
 
 (defun notmuch-refresh-this-buffer ()
   "Refresh the current buffer."
@@ -989,10 +988,7 @@ (defun notmuch-start-notmuch-error-sentinel (proc event)
 (find-file-noselect err-file
 (when err-buffer (kill-buffer err-buffer
 
-;; This variable is used only buffer local, but it needs to be
-;; declared globally first to avoid compiler warnings.
-(defvar notmuch-show-process-crypto nil)
-(make-variable-buffer-local 'notmuch-show-process-crypto)
+(defvar-local notmuch-show-process-crypto nil)
 
 (defun notmuch-interactive-region ()
   "Return the bounds of the current interactive region.
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 09cdeaaa..c9b1e966 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -162,23 +162,17 @@ (defcustom notmuch-show-text/html-blocked-images "."
   :type '(choice (const nil) regexp)
   :group 'notmuch-show)
 
-(defvar notmuch-show-thread-id nil)
-(make-variable-buffer-local 'notmuch-show-thread-id)
+(defvar-local notmuch-show-thread-id nil)
 
-(defvar notmuch-show-parent-buffer nil)
-(make-variable-buffer-local 'notmuch-show-parent-buffer)
+(defvar-local notmuch-show-parent-buffer nil)
 
-(defvar notmuch-show-query-context nil)
-(make-variable-buffer-local 'notmuch-show-query-context)
+(defvar-local notmuch-show-query-context nil)
 
-(defvar notmuch-show-process-crypto nil)
-(make-variable-buffer-local 'notmuch-show-process-crypto)
+(defvar-local notmuch-show-process-crypto nil)
 
-(defvar notmuch-show-elide-non-matching-messages nil)
-(make-variable-buffer-local 'notmuch-show-elide-non-matching-messages)
+(defvar-local notmuch-show-elide-non-matching-messages nil)
 
-(defvar notmuch-show-indent-content t)
-(make-variable-buffer-local 'notmuch-show-indent-content)
+(defvar-local notmuch-show-indent-content t)
 
 (defvar notmuch-show-attachment-debug nil
   "If t log stdout and stderr from attachment handlers.
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 71b6387a..3b5dab3e 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -51,9 +51,8 @@ (declare-function notmuch-tree-from-search-thread "notmuch" 
())
 (defvar notmuch-search-query-string)
 
 ;; this variable distinguishes the unthreaded display from the normal tree 
display
-(defvar notmuch-tree-unthreaded nil
+(defvar-local notmuch-tree-unthreaded nil
   "A buffer local copy of argument unthreaded to the function notmuch-tree.")
-(make-variable-buffer-local 'notmuch-tree-unthreaded)
 
 (defgroup notmuch-tree nil
   "Showing message and thread structure

[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 ++--
 emacs/notmuch.el |  4 ++--
 6 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/emacs/notmuch-address.el b/emacs/notmuch-address.el
index 8a6d299c..561cc140 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -294,7 +294,7 @@ (defun notmuch-address-harvest (&optional addr-prefix 
synchronous callback)
   "Collect addresses completion candidates.
 
 It queries the notmuch database for messages sent/received (as
-configured with `notmuch-address-command`) by the user, collects
+configured with `notmuch-address-command') by the user, collects
 destination/source addresses from those messages and stores them
 in `notmuch-address-completions'.
 
diff --git a/emacs/notmuch-draft.el b/emacs/notmuch-draft.el
index 283830ad..b13eb51c 100644
--- a/emacs/notmuch-draft.el
+++ b/emacs/notmuch-draft.el
@@ -101,7 +101,7 @@ (defun notmuch-draft--mark-deleted ()
 (notmuch-tag notmuch-draft-id '("+deleted"
 
 (defun notmuch-draft-quote-some-mml ()
-  "Quote the mml tags in `notmuch-draft-quoted-tags`."
+  "Quote the mml tags in `notmuch-draft-quoted-tags'."
   (save-excursion
 ;; First we deal with any secure tag separately.
 (message-goto-body)
@@ -122,7 +122,7 @@ (defun notmuch-draft-quote-some-mml ()
  (insert "!"))
 
 (defun notmuch-draft-unquote-some-mml ()
-  "Unquote the mml tags in `notmuch-draft-quoted-tags`."
+  "Unquote the mml tags in `notmuch-draft-quoted-tags'."
   (save-excursion
 (when notmuch-draft-quoted-tags
   (let ((re (concat "<#!+/?\\("
@@ -174,7 +174,7 @@ (defun notmuch-draft-save ()
   "Save the current draft message in the notmuch database.
 
 This saves the current message in the database with tags
-`notmuch-draft-tags` (in addition to any default tags
+`notmuch-draft-tags' (in addition to any default tags
 applied to newly inserted messages)."
   (interactive)
   (when (notmuch-draft--has-encryption-tag)
@@ -185,7 +185,7 @@ (defun notmuch-draft-save ()
  ;; so that it is easier to search for the message, and the
  ;; latter so we have a way of accessing the saved message (for
  ;; example to delete it at a later time). We check that the
- ;; user has these in `message-deletable-headers` (the default)
+ ;; user has these in `message-deletable-headers' (the default)
  ;; as otherwise they are doing something strange and we
  ;; shouldn't interfere. Note, since we are doing this in a new
  ;; buffer we don't change the version in the compose buffer.
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 28784345..bc07c29c 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -138,8 +138,8 @@ (defcustom notmuch-saved-searches
shown. If not present then the :query property
is used.
   :sort-order  Specify the sort order to be used for the search.
-   Possible values are 'oldest-first 'newest-first or
-   nil. Nil means use the default sort order.
+   Possible values are `oldest-first', `newest-first'
+   or nil. Nil means use the default sort order.
   :search-type Specify whether to run the search in search-mode,
tree mode or unthreaded mode. Set to 'tree to specify tree
mode, 'unthreaded to specify unthreaded mode, and set to nil
diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el
index a9103a20..b1da93e6 100644
--- a/emacs/notmuch-maildir-fcc.el
+++ b/emacs/notmuch-maildir-fcc.el
@@ -196,7 +196,7 @@ (defun notmuch-maildir-message-do-fcc ()
 (defun notmuch-fcc-handler (fcc-header)
   "Store message with notmuch insert or normal (file) fcc.
 
-If `notmuch-maildir-use-notmuch-insert` is set then store the
+If `notmuch-maildir-use-notmuch-insert' is set then store the
 message using notmuch insert. Otherwise store the message using
 normal fcc."
   (message "Doing Fcc...")
diff --git a/emacs/notmuch-tag.el b/emacs/notmuch-tag.el
index 5d4a6865..dc9a2186 100644
--- a/emacs/notmuch-tag.el
+++ b/emacs/notmuch-tag.el
@@ -68,15 +68,15 @@ (defcustom notmuch-tagging-keys
 be used (either as a key, or as the start of a key sequence) as
 it is already bound: it switches the menu to a menu of the
 reverse tagging operations. The reverse of a tagging operation is
-the same list of individual tag-ops but with `+tag` replaced by
-`-tag` and vice versa.
+the same list of individual tag-ops but with `+tag' replaced by
+`-tag' and vice versa.
 
 If setting this variable outside of customize then it should be a
 list of triples (lists of three elements). Each triple should be
 of the form (key-binding tagging-operations name). KEY-BI

[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
   :group 'notmuch-hello
   :group 'notmuch-hooks)
 
-(defvar notmuch-hello-url "https://notmuchmail.org";
+(defconst notmuch-hello-url "https://notmuchmail.org";
   "The `notmuch' web site.")
 
 (defvar notmuch-hello-custom-section-options
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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   |  9 -
 2 files changed, 20 insertions(+), 32 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index f5d9e0ec..fa31694f 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -21,8 +21,7 @@
 
 ;;; Code:
 
-(eval-when-compile (require 'cl-lib))
-
+(require 'cl-lib)
 (require 'widget)
 (require 'wid-edit) ; For `widget-forward'.
 
@@ -542,21 +541,19 @@ (defun notmuch-hello-query-counts (query-list &rest 
options)
 --batch'. In general we recommend running matching versions of
 the CLI and emacs interface."))
 (goto-char (point-min))
-(notmuch-remove-if-not
- #'identity
- (mapcar
-  (lambda (elem)
-   (let* ((elem-plist (notmuch-hello-saved-search-to-plist elem))
-  (search-query (plist-get elem-plist :query))
-  (filtered-query (notmuch-hello-filtered-query
-   search-query (plist-get options :filter)))
-  (message-count (prog1 (read (current-buffer))
-   (forward-line 1
- (when (and filtered-query (or (plist-get options :show-empty-searches)
-   (> message-count 0)))
-   (setq elem-plist (plist-put elem-plist :query filtered-query))
-   (plist-put elem-plist :count message-count
-  query-list
+(cl-mapcan
+ (lambda (elem)
+   (let* ((elem-plist (notmuch-hello-saved-search-to-plist elem))
+ (search-query (plist-get elem-plist :query))
+ (filtered-query (notmuch-hello-filtered-query
+  search-query (plist-get options :filter)))
+ (message-count (prog1 (read (current-buffer))
+  (forward-line 1
+(when (and filtered-query (or (plist-get options :show-empty-searches)
+  (> message-count 0)))
+  (setq elem-plist (plist-put elem-plist :query filtered-query))
+  (list (plist-put elem-plist :count message-count)
+ query-list)))
 
 (defun notmuch-hello-insert-buttons (searches)
   "Insert buttons for SEARCHES.
@@ -698,12 +695,12 @@ (define-derived-mode notmuch-hello-mode fundamental-mode 
"notmuch-hello"
 
 (defun notmuch-hello-generate-tag-alist (&optional hide-tags)
   "Return an alist from tags to queries to display in the all-tags section."
-  (mapcar (lambda (tag)
-   (cons tag (concat "tag:" (notmuch-escape-boolean-term tag
- (notmuch-remove-if-not
-  (lambda (tag)
-(not (member tag hide-tags)))
-  (process-lines notmuch-command "search" "--output=tags" "*"
+  (cl-mapcan (lambda (tag)
+  (and (not (member tag hide-tags))
+   (list (cons tag
+   (concat "tag:"
+   (notmuch-escape-boolean-term tag))
+(process-lines notmuch-command "search" "--output=tags" "*")))
 
 (defun notmuch-hello-insert-header ()
   "Insert the default notmuch-hello header."
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 8ee3f17f..d7c6b737 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -534,15 +534,6 @@ (defun notmuch-common-do-stash (text)
 
 ;;
 
-(defun notmuch-remove-if-not (predicate list)
-  "Return a copy of LIST with all items not satisfying PREDICATE removed."
-  (let (out)
-(while list
-  (when (funcall predicate (car list))
-   (push (car list) out))
-  (setq list (cdr list)))
-(nreverse out)))
-
 (defun notmuch-plist-delete (plist property)
   (let* ((xplist (cons nil plist))
 (pred xplist))
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 b/emacs/notmuch-draft.el
index ca720384..f928be87 100644
--- a/emacs/notmuch-draft.el
+++ b/emacs/notmuch-draft.el
@@ -135,7 +135,7 @@ (defun notmuch-draft-unquote-some-mml ()
 (let (secure-tag)
   (save-restriction
(message-narrow-to-headers)
-   (setq secure-tag (message-fetch-field "X-Notmuch-Emacs-Secure" 't))
+   (setq secure-tag (message-fetch-field "X-Notmuch-Emacs-Secure" t))
(message-remove-header "X-Notmuch-Emacs-Secure"))
   (message-goto-body)
   (when secure-tag
@@ -145,7 +145,7 @@ (defun notmuch-draft--has-encryption-tag ()
   "Returns t if there is an mml secure tag."
   (save-excursion
 (message-goto-body)
-(re-search-forward notmuch-draft-encryption-tag-regex nil 't)))
+(re-search-forward notmuch-draft-encryption-tag-regex nil t)))
 
 (defun notmuch-draft--query-encryption ()
   "Checks if we should save a message that should be encrypted.
@@ -207,7 +207,7 @@ (defun notmuch-draft-save ()
  (notmuch-draft-quote-some-mml)
  (notmuch-maildir-setup-message-for-saving)
  (notmuch-maildir-notmuch-insert-current-buffer
-  notmuch-draft-folder 't notmuch-draft-tags))
+  notmuch-draft-folder t notmuch-draft-tags))
 ;; We are now back in the original compose buffer. Note the
 ;; function notmuch-call-notmuch-process (called by
 ;; notmuch-maildir-notmuch-insert-current-buffer) signals an error
diff --git a/emacs/notmuch-maildir-fcc.el b/emacs/notmuch-maildir-fcc.el
index b1da93e6..32b8100e 100644
--- a/emacs/notmuch-maildir-fcc.el
+++ b/emacs/notmuch-maildir-fcc.el
@@ -76,7 +76,7 @@ (defcustom notmuch-fcc-dirs "sent"
   :require 'notmuch-fcc-initialization
   :group 'notmuch-send)
 
-(defcustom notmuch-maildir-use-notmuch-insert 't
+(defcustom notmuch-maildir-use-notmuch-insert t
   "Should fcc use notmuch insert instead of simple fcc."
   :type '(choice :tag "Fcc Method"
 (const :tag "Use notmuch insert" t)
@@ -246,8 +246,8 @@ (defun notmuch-maildir-fcc-with-notmuch-insert (fcc-header 
&optional create)
 \(r)etry, (c)reate folder, (i)gnore, or (e)dit the header? " '(?r ?c ?i ?e
 (cl-case response
   (?r (notmuch-maildir-fcc-with-notmuch-insert fcc-header))
-  (?c (notmuch-maildir-fcc-with-notmuch-insert fcc-header 't))
-  (?i 't)
+  (?c (notmuch-maildir-fcc-with-notmuch-insert fcc-header t))
+  (?i t)
   (?e (notmuch-maildir-fcc-with-notmuch-insert
(read-from-minibuffer "Fcc header: " fcc-header)
 
@@ -322,7 +322,7 @@ (defun notmuch-maildir-fcc-file-fcc (fcc-header)
 It offers the user a chance to correct the header, or filesystem,
 if needed."
   (if (notmuch-maildir-fcc-dir-is-maildir-p fcc-header)
-  (notmuch-maildir-fcc-write-buffer-to-maildir fcc-header 't)
+  (notmuch-maildir-fcc-write-buffer-to-maildir fcc-header t)
 ;; The fcc-header is not a valid maildir see if the user wants to
 ;; fix it in some way.
 (let* ((prompt (format "Fcc %s is not a maildir: \
@@ -335,7 +335,7 @@ (defun notmuch-maildir-fcc-file-fcc (fcc-header)
  (message "No permission to create %s." fcc-header)
  (sit-for 2))
(notmuch-maildir-fcc-file-fcc fcc-header))
-   (?i 't)
+   (?i t)
(?e (notmuch-maildir-fcc-file-fcc
 (read-from-minibuffer "Fcc header: " fcc-header)))
 
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 821bb324..f9843546 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -538,11 +538,11 @@ (defun notmuch-mua-check-no-misplaced-secure-tag ()
   (goto-char (point-max))
   (or
;; We are always fine if there is no secure tag.
-   (not (search-backward "<#secure" nil 't))
+   (not (search-backward "<#secure" nil t))
;; There is a secure tag, so it must be at the start of the
;; body, with no secure tag earlier (i.e., in the headers).
(and (= (point) body-start)
-   (not (search-backward "<#secure" nil 't)))
+   (not (search-backward "<#secure" nil t)))
;; The user confirms they means it.
(yes-or-no-p "\
 There is a <#secure> tag not at the start of the body. It is
@@ -582,7 +582,7 @@ (defun notmuch-mua-send-common (arg &optional exit)
 
 (defun notmuch-mua-send-and-exit (&optional arg)
   (interactive "P")
-  (notmuch-mua-send-common arg 't))
+  (notmuch-mua-send-common arg t))
 
 (defun notmuch-mua-send (&optional arg)
   (interactive "P")
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index c9b1e966..056c4e30 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1751,7 +1751,7 @@ (defun notmuch-show-command-hook ()
  

[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 b/emacs/notmuch-tree.el
index 3b5dab3e..7cc28b62 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -1115,7 +1115,7 @@ (defun notmuch-tree (&optional query query-context target 
buffer-name open-targe
(inhibit-read-only t))
 (pop-to-buffer-same-window buffer))
   ;; Don't track undo information for this buffer
-  (set 'buffer-undo-list t)
+  (setq buffer-undo-list t)
   (notmuch-tree-worker query query-context target open-target unthreaded)
   (setq notmuch-tree-parent-buffer parent-buffer)
   (setq truncate-lines t))
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 95770fc3..b221be05 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -693,7 +693,7 @@ (defun notmuch-search-process-sentinel (proc msg)
(throw 'return nil))
  (when (and atbob
 (not (string= notmuch-search-target-thread 
"found")))
-   (set 'never-found-target-thread t)
+   (setq never-found-target-thread t)
(when (and never-found-target-thread
   notmuch-search-target-line)
  (goto-char (point-min))
@@ -1000,11 +1000,11 @@ (defun notmuch-search (&optional query oldest-first 
target-thread target-line no
 (unless (eq major-mode 'notmuch-search-mode)
   (notmuch-search-mode))
 ;; Don't track undo information for this buffer
-(set 'buffer-undo-list t)
-(set 'notmuch-search-query-string query)
-(set 'notmuch-search-oldest-first oldest-first)
-(set 'notmuch-search-target-thread target-thread)
-(set 'notmuch-search-target-line target-line)
+(setq buffer-undo-list t)
+(setq notmuch-search-query-string query)
+(setq notmuch-search-oldest-first oldest-first)
+(setq notmuch-search-target-thread target-thread)
+(setq notmuch-search-target-line target-line)
 (notmuch-tag-clear-cache)
 (let ((proc (get-buffer-process (current-buffer)))
  (inhibit-read-only t))
@@ -1052,7 +1052,7 @@ (defun notmuch-search-toggle-order ()
 This command toggles the sort order for the current search. The
 default sort order is defined by `notmuch-search-oldest-first'."
   (interactive)
-  (set 'notmuch-search-oldest-first (not notmuch-search-oldest-first))
+  (setq notmuch-search-oldest-first (not notmuch-search-oldest-first))
   (notmuch-search-refresh-view))
 
 (defun notmuch-group-disjunctive-query-string (query-string)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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(-)

diff --git a/emacs/notmuch-company.el b/emacs/notmuch-company.el
index 9e743029..b50e73c8 100644
--- a/emacs/notmuch-company.el
+++ b/emacs/notmuch-company.el
@@ -55,8 +55,7 @@ (defvar notmuch-address-command)
 ;;;###autoload
 (defun notmuch-company-setup ()
   (company-mode)
-  (make-local-variable 'company-backends)
-  (setq company-backends '(notmuch-company))
+  (setq-local company-backends '(notmuch-company))
   ;; Disable automatic company completion unless an internal
   ;; completion method is configured. Company completion (using
   ;; internal completion) can still be accessed via standard company
diff --git a/emacs/notmuch-parser.el b/emacs/notmuch-parser.el
index 3aa5bd8f..4a437016 100644
--- a/emacs/notmuch-parser.el
+++ b/emacs/notmuch-parser.el
@@ -168,9 +168,8 @@ (defun notmuch-sexp-parse-partial-list (result-function 
result-buffer)
 move point in the input buffer."
   ;; Set up the initial state
   (unless (local-variable-p 'notmuch-sexp--parser)
-(set (make-local-variable 'notmuch-sexp--parser)
-(notmuch-sexp-create-parser))
-(set (make-local-variable 'notmuch-sexp--state) 'begin))
+(setq-local notmuch-sexp--parser (notmuch-sexp-create-parser))
+(setq-local notmuch-sexp--state 'begin))
   (let (done)
 (while (not done)
   (cl-case notmuch-sexp--state
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 3ca27b26..95770fc3 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -391,7 +391,7 @@ (define-derived-mode notmuch-search-mode fundamental-mode 
"notmuch-search"
   (make-local-variable 'notmuch-search-target-thread)
   (make-local-variable 'notmuch-search-target-line)
   (setq notmuch-buffer-refresh-function #'notmuch-search-refresh-view)
-  (set (make-local-variable 'scroll-preserve-screen-position) t)
+  (setq-local scroll-preserve-screen-position t)
   (add-to-invisibility-spec (cons 'ellipsis t))
   (setq truncate-lines t)
   (setq buffer-read-only t)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 b/emacs/notmuch-lib.el
index 61107e38..2c8de328 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -534,14 +534,10 @@ (defun notmuch-plist-delete (plist property)
   (setq pred (cddr pred)))
 (cdr xplist)))
 
-(defun notmuch-split-content-type (content-type)
-  "Split content/type into 'content' and 'type'."
-  (split-string content-type "/"))
-
 (defun notmuch-match-content-type (t1 t2)
   "Return t if t1 and t2 are matching content types, taking wildcards into 
account."
-  (let ((st1 (notmuch-split-content-type t1))
-   (st2 (notmuch-split-content-type t2)))
+  (let ((st1 (split-string t1 "/"))
+   (st2 (split-string t2 "/")))
 (if (or (string= (cadr st1) "*")
(string= (cadr st2) "*"))
;; Comparison of content types should be case insensitive.
diff --git a/emacs/notmuch-show.el b/emacs/notmuch-show.el
index 14250d34..09cdeaaa 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -573,12 +573,13 @@ (defun notmuch-show--register-cids (msg part)
   ;; alternative (even if we can't render it).
   (push (list content-id msg part) notmuch-show--cids)))
   ;; Recurse on sub-parts
-  (let ((ctype (notmuch-split-content-type
-   (downcase (plist-get part :content-type)
-(cond ((equal (car ctype) "multipart")
+  (pcase-let ((`(,content ,type)
+  (split-string (downcase (plist-get part :content-type)) "/")))
+(cond ((equal content "multipart")
   (mapc (apply-partially #'notmuch-show--register-cids msg)
 (plist-get part :content)))
- ((equal ctype '("message" "rfc822"))
+ ((and (equal content "message")
+   (equal type "rfc822"))
   (notmuch-show--register-cids
msg
(car (plist-get (car (plist-get part :content)) :body)))
@@ -851,10 +852,9 @@ (defun notmuch-show-handlers-for (content-type)
  (push func result)))
  ;; Reverse order of prefrence.
  (list (intern (concat "notmuch-show-insert-part-*/*"))
-   (intern (concat
-"notmuch-show-insert-part-"
-(car (notmuch-split-content-type content-type))
-"/*"))
+   (intern (concat "notmuch-show-insert-part-"
+   (car (split-string content-type "/"))
+   "/*"))
(intern (concat "notmuch-show-insert-part-" content-type
 result))
 
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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
index 04353522..21d1d82f 100644
--- a/emacs/notmuch-address.el
+++ b/emacs/notmuch-address.el
@@ -250,25 +250,6 @@ (defun notmuch-address-expand-name ()
(ding
(t nil)))
 
-;; Copied from `w3m-which-command'.
-(defun notmuch-address-locate-command (command)
-  "Return non-nil if `command' is an executable either on
-`exec-path' or an absolute pathname."
-  (and (stringp command)
-   (if (and (file-name-absolute-p command)
-   (file-executable-p command))
-  command
-(setq command (file-name-nondirectory command))
-(catch 'found-command
-  (let (bin)
-(dolist (dir exec-path)
-  (setq bin (expand-file-name command dir))
-  (when (or (and (file-executable-p bin)
- (not (file-directory-p bin)))
-(and (file-executable-p (setq bin (concat bin ".exe")))
- (not (file-directory-p bin
-(throw 'found-command bin
-
 (defun notmuch-address-harvest-addr (result)
   (let ((name-addr (plist-get result :name-addr)))
 (puthash name-addr t notmuch-address-completions)))
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 b/emacs/notmuch-show.el
index 6a757687..14250d34 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -2347,7 +2347,9 @@ (defun notmuch-show-stash-mlarchive-link-and-go 
(&optional mla)
   (browse-url (current-kill 0 t)))
 
 (defun notmuch-show-stash-git-helper (addresses prefix)
-  "Escape, trim, quote, and add PREFIX to each address in list of ADDRESSES, 
and return the result as a single string."
+  "Normalize all ADDRESSES while adding PREFIX.
+Escape, trim, quote and add PREFIX to each address in list
+of ADDRESSES, and return the result as a single string."
   (mapconcat (lambda (x)
   (concat prefix "\""
   ;; escape double-quotes
@@ -2360,10 +2362,12 @@ (defun notmuch-show-stash-git-helper (addresses prefix)
 addresses " "))
 
 (put 'notmuch-show-stash-git-send-email 'notmuch-prefix-doc
- "Copy From/To/Cc of current message to kill-ring in a form suitable for 
pasting to git send-email command line.")
+ "Copy From/To/Cc of current message to kill-ring.
+Use a form suitable for pasting to git send-email command line.")
 
 (defun notmuch-show-stash-git-send-email (&optional no-in-reply-to)
-  "Copy From/To/Cc/Message-Id of current message to kill-ring in a form 
suitable for pasting to git send-email command line.
+  "Copy From/To/Cc/Message-Id of current message to kill-ring.
+Use a form suitable for pasting to git send-email command line.
 
 If invoked with a prefix argument (or NO-IN-REPLY-TO is non-nil),
 omit --in-reply-to=."
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 map " " 'notmuch-tree-scroll-or-next)
 (define-key map (kbd "DEL") 'notmuch-tree-scroll-message-window-back)
 (define-key map "e" 'notmuch-tree-resume-message)
-map))
+map)
+  "Keymap for \"notmuch tree\" buffers.")
 (fset 'notmuch-tree-mode-map notmuch-tree-mode-map)
 
 (defun notmuch-tree-get-message-properties ()
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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
@@ -387,15 +387,9 @@ (defun notmuch-hello-nice-number (n)
 (format "%s%03d" notmuch-hello-thousands-separator elem))
   (cdr result)
 
-(defun notmuch-hello-trim (search)
-  "Trim whitespace."
-  (if (string-match "^[[:space:]]*\\(.*[^[:space:]]\\)[[:space:]]*$" search)
-  (match-string 1 search)
-search))
-
 (defun notmuch-hello-search (&optional search)
   (unless (null search)
-(setq search (notmuch-hello-trim search))
+(setq search (string-trim search))
 (let ((history-delete-duplicates t))
   (add-to-history 'notmuch-search-history search)))
   (notmuch-search search notmuch-search-oldest-first))
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 
 1 file changed, 8 deletions(-)

diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index 28c9372e..71b6387a 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -267,14 +267,6 @@ (defun notmuch-tree-inherit-from-message-pane (sym)
(symbol-value sym))
 (symbol-value sym)))
 
-(defun notmuch-tree-button-activate (&optional button)
-  "Activate BUTTON or button at point.
-
-This function does not give an error if there is no button."
-  (interactive)
-  (let ((button (or button (button-at (point)
-(when button (button-activate button
-
 (defun notmuch-tree-close-message-pane-and (func)
   "Close message pane and execute FUNC.
 
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 `concat', which treats nil like
the empty string.  So we can do the logical thing without changing
the behavior.
---
 emacs/notmuch-lib.el | 17 -
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index d7c6b737..61107e38 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -287,18 +287,6 @@ (defun notmuch-bury-or-kill-this-buffer ()
   (bury-buffer)
 (kill-buffer)))
 
-(defun notmuch-documentation-first-line (symbol)
-  "Return the first line of the documentation string for SYMBOL."
-  (let ((doc (documentation symbol)))
-(if doc
-   (with-temp-buffer
- (insert (documentation symbol t))
- (goto-char (point-min))
- (let ((beg (point)))
-   (end-of-line)
-   (buffer-substring beg (point
-  "")))
-
 (defun notmuch-prefix-key-description (key)
   "Given a prefix key code, return a human-readable string representation.
 
@@ -331,7 +319,10 @@ (defun notmuch-describe-key (actual-key binding prefix 
ua-keys tail)
  (or (and (symbolp binding)
   (get binding 'notmuch-doc))
  (and (functionp binding)
-  (notmuch-documentation-first-line binding
+  (let ((doc (documentation binding)))
+(and doc
+ (string-match "\\`.+" doc)
+ (match-string 0 doc))
tail)))
   tail)
 
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 +987,6 @@ (defun notmuch-hello (&optional no-display)
   (run-hooks 'notmuch-hello-refresh-hook)
   (setq notmuch-hello-first-run nil))
 
-(defun notmuch-folder ()
-  "Deprecated function for invoking notmuch---calling `notmuch' is preferred 
now."
-  (interactive)
-  (notmuch-hello))
-
 ;;
 
 (provide 'notmuch-hello)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 100644
--- a/emacs/notmuch-show.el
+++ b/emacs/notmuch-show.el
@@ -1485,7 +1485,6 @@ (defvar notmuch-show-mode-map
 (define-key map "B" 'notmuch-show-browse-urls)
 map)
   "Keymap for \"notmuch show\" buffers.")
-(fset 'notmuch-show-mode-map notmuch-show-mode-map)
 
 (define-derived-mode notmuch-show-mode fundamental-mode "notmuch-show"
   "Major mode for viewing a thread with notmuch.
diff --git a/emacs/notmuch-tree.el b/emacs/notmuch-tree.el
index ea6a5cf3..ad08f7c6 100644
--- a/emacs/notmuch-tree.el
+++ b/emacs/notmuch-tree.el
@@ -361,7 +361,6 @@ (defvar notmuch-tree-mode-map
 (define-key map "e" 'notmuch-tree-resume-message)
 map)
   "Keymap for \"notmuch tree\" buffers.")
-(fset 'notmuch-tree-mode-map notmuch-tree-mode-map)
 
 (defun notmuch-tree-get-message-properties ()
   "Return the properties of the current message as a plist.
diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 83bcee57..165aaa43 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -194,7 +194,6 @@ (defvar notmuch-search-mode-map
 (define-key map "U" 'notmuch-unthreaded-from-search-current-query)
 map)
   "Keymap for \"notmuch search\" buffers.")
-(fset 'notmuch-search-mode-map notmuch-search-mode-map)
 
 (defvar notmuch-search-stash-map
   (let ((map (make-sparse-keymap)))
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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
+++ b/emacs/notmuch-crypto.el
@@ -103,8 +103,7 @@ (define-button-type 'notmuch-crypto-status-button-type
   :supertype 'notmuch-button-type)
 
 (defun notmuch-crypto-insert-sigstatus-button (sigstatus from)
-  "Insert a button describing the signature status SIGSTATUS sent
-by user FROM."
+  "Insert a button describing the signature status SIGSTATUS sent by user 
FROM."
   (let* ((status (plist-get sigstatus :status))
 (show-button t)
 (face 'notmuch-crypto-signature-unknown)
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index 003bec33..28784345 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -372,8 +372,7 @@ (defvar notmuch-hello-hidden-sections nil
   "List of sections titles whose contents are hidden.")
 
 (defvar notmuch-hello-first-run t
-  "True if `notmuch-hello' is run for the first time, set to nil
-afterwards.")
+  "True if `notmuch-hello' is run for the first time, set to nil afterwards.")
 
 (defun notmuch-hello-nice-number (n)
   (let (result)
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 9d08c2c9..62d615d1 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -73,8 +73,7 @@ (defcustom notmuch-mua-user-agent-function nil
   :group 'notmuch-send)
 
 (defcustom notmuch-mua-hidden-headers nil
-  "Headers that are added to the `message-mode' hidden headers
-list."
+  "Headers that are added to the `message-mode' hidden headers list."
   :type '(repeat string)
   :group 'notmuch-send)
 
@@ -167,8 +166,7 @@ (defun notmuch-mua-get-switch-function ()
(t (error "Invalid value for `notmuch-mua-compose-in'"
 
 (defun notmuch-mua-maybe-set-window-dedicated ()
-  "Set the selected window as dedicated according to
-`notmuch-mua-compose-in'."
+  "Set the selected window as dedicated according to `notmuch-mua-compose-in'."
   (when (or (eq notmuch-mua-compose-in 'new-frame)
(eq notmuch-mua-compose-in 'new-window))
 (set-window-dedicated-p (selected-window) t)))
@@ -335,9 +333,8 @@ (define-derived-mode notmuch-message-mode message-mode 
"Message[Notmuch]"
 (put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
 
 (defun notmuch-mua-pop-to-buffer (name switch-function)
-  "Pop to buffer NAME, and warn if it already exists and is
-modified. This function is notmuch adaptation of
-`message-pop-to-buffer'."
+  "Pop to buffer NAME, and warn if it already exists and is modified.
+This function is notmuch adaptation of `message-pop-to-buffer'."
   (let ((buffer (get-buffer name)))
 (if (and buffer
 (buffer-name buffer))
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 redundant notmuch-hello-trim
  emacs: fix old bug in notmuch-mua-mail
  emacs: remove kludge for Emacs 23 from notmuch-mua-mail
  emacs: more cleanup since dropping support for Emacs 24
  emacs: sanitize function that displays version
  emacs: define notmuch-hello-url as a constant
  emacs: shorten/replace first sentence of a few doc-strings
  emacs: place only first sentence on first doc-string line
  emacs: place complete first sentence on first doc-string line
  emacs: always use elisp quoting style in doc-strings
  emacs: misc doc-string improvements
  emacs: remove deprecated notmuch-folder command
  emacs: remove unnecessary notmuch-remove-if-not
  emacs: remove unused notmuch-address-locate-command
  emacs: remove unnecessary notmuch-tree-button-activate
  emacs: inline notmuch-documentation-first-line
  emacs: inline notmuch-split-content-type
  emacs: use defvar-local
  emacs: use setq-local
  emacs: use setq instead set
  emacs: do not quote self-quoting t
  emacs: avoid binding unnamed commands in keymaps
  emacs: various cosmetic improvements

 emacs/coolj.el   |   4 +-
 emacs/notmuch-address.el |  58 
 emacs/notmuch-company.el |   7 +-
 emacs/notmuch-compat.el  |   9 +-
 emacs/notmuch-crypto.el  |   7 +-
 emacs/notmuch-draft.el   |  17 ++--
 emacs/notmuch-hello.el   | 123 
 emacs/notmuch-jump.el|   5 -
 emacs/notmuch-lib.el | 108 +
 emacs/notmuch-maildir-fcc.el |  12 +--
 emacs/notmuch-mua.el |  77 +++
 emacs/notmuch-parser.el  |   5 +-
 emacs/notmuch-show.el|  57 +--
 emacs/notmuch-tag.el |  24 ++---
 emacs/notmuch-tree.el| 179 ++-
 emacs/notmuch.el | 109 +++--
 16 files changed, 346 insertions(+), 455 deletions(-)

-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 b/emacs/notmuch-mua.el
index 03c7cc97..616b625c 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -324,17 +324,21 @@ (defun notmuch-mua-reply (query-string &optional sender 
reply-all)
   (message-goto-body)
   (set-buffer-modified-p nil))
 
+(defvar notmuch-message-mode-map
+  (let ((map (make-sparse-keymap)))
+(define-key map (kbd "C-c C-c") #'notmuch-mua-send-and-exit)
+(define-key map (kbd "C-c C-s") #'notmuch-mua-send)
+(define-key map (kbd "C-c C-p") #'notmuch-draft-postpone)
+(define-key map (kbd "C-x C-s") #'notmuch-draft-save)
+map)
+  "Keymap for `notmuch-message-mode'.")
+
 (define-derived-mode notmuch-message-mode message-mode "Message[Notmuch]"
   "Notmuch message composition mode. Mostly like `message-mode'."
   (notmuch-address-setup))
 
 (put 'notmuch-message-mode 'flyspell-mode-predicate 'mail-mode-flyspell-verify)
 
-(define-key notmuch-message-mode-map (kbd "C-c C-c") 
#'notmuch-mua-send-and-exit)
-(define-key notmuch-message-mode-map (kbd "C-c C-s") #'notmuch-mua-send)
-(define-key notmuch-message-mode-map (kbd "C-c C-p") #'notmuch-draft-postpone)
-(define-key notmuch-message-mode-map (kbd "C-x C-s") #'notmuch-draft-save)
-
 (defun notmuch-mua-pop-to-buffer (name switch-function)
   "Pop to buffer NAME, and warn if it already exists and is
 modified. This function is notmuch adaptation of
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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
index 1204fb6a..869ec51a 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -394,16 +394,10 @@ (defun notmuch-mua-mail (&optional to subject 
other-headers continue
  (dolist (h other-headers other-headers)
(when (stringp (car h))
  (setcar h (intern (capitalize (car h
-   (args (list yank-action send-actions))
;; Cause `message-setup-1' to do things relevant for mail,
;; such as observe `message-default-mail-headers'.
(message-this-is-mail t))
-;; message-setup-1 in Emacs 23 does not accept return-action
-;; argument. Pass it only if it is supplied by the caller. This
-;; will never be the case when we're called by `compose-mail' in
-;; Emacs 23.
-(when return-action (nconc args (list return-action)))
-(apply 'message-setup-1 headers args))
+(message-setup-1 headers yank-action send-actions return-action))
   (notmuch-fcc-header-setup)
   (message-sort-headers)
   (message-hide-headers)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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 would make no sense to have "hello" in its name.
---
 emacs/notmuch-hello.el | 14 --
 emacs/notmuch-lib.el   | 16 
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index af170dd4..69d0ad64 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -652,26 +652,12 @@ (defun notmuch-hello-window-configuration-change ()
   (remove-hook 'window-configuration-change-hook
   #'notmuch-hello-window-configuration-change
 
-;; the following variable is defined as being defconst in notmuch-version.el
-(defvar notmuch-emacs-version)
-
-(defun notmuch-hello-versions ()
-  "Display the notmuch version(s)."
-  (interactive)
-  (let ((notmuch-cli-version (notmuch-cli-version)))
-(message "notmuch version %s"
-(if (string= notmuch-emacs-version notmuch-cli-version)
-notmuch-cli-version
-  (concat notmuch-cli-version
-  " (emacs mua version " notmuch-emacs-version ")")
-
 (defvar notmuch-hello-mode-map
   ;; Inherit both widget-keymap and notmuch-common-keymap.  We have
   ;; to use make-sparse-keymap to force this to be a new keymap (so
   ;; that when we modify map it does not modify widget-keymap).
   (let ((map (make-composed-keymap (list (make-sparse-keymap) widget-keymap
 (set-keymap-parent map notmuch-common-keymap)
-(define-key map "v" 'notmuch-hello-versions)
 (define-key map (kbd "") 'widget-backward)
 map)
   "Keymap for \"notmuch hello\" buffers.")
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index edb40533..8ee3f17f 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -147,6 +147,7 @@ (defcustom notmuch-archive-tags '("-inbox")
 (defvar notmuch-common-keymap
   (let ((map (make-sparse-keymap)))
 (define-key map "?" 'notmuch-help)
+(define-key map "v" 'notmuch-version)
 (define-key map "q" 'notmuch-bury-or-kill-this-buffer)
 (define-key map "s" 'notmuch-search)
 (define-key map "t" 'notmuch-search-by-tag)
@@ -218,6 +219,21 @@ (defun notmuch-cli-version ()
(match-string 2 long-string)
   "unknown")))
 
+(defvar notmuch-emacs-version)
+
+(defun notmuch-version ()
+  "Display the notmuch version.
+The versions of the Emacs package and the `notmuch' executable
+should match, but if and only if they don't, then this command
+displays both values separately."
+  (interactive)
+  (let ((cli-version (notmuch-cli-version)))
+(message "notmuch version %s"
+(if (string= notmuch-emacs-version cli-version)
+cli-version
+  (concat cli-version
+  " (emacs mua version " notmuch-emacs-version ")")
+
 (defun notmuch-config-get (item)
   "Return a value from the notmuch configuration."
   (let* ((val (notmuch-command-to-string "config" "get" item))
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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
+++ b/emacs/notmuch-address.el
@@ -36,9 +36,9 @@ (defvar notmuch-address-completions (make-hash-table :test 
'equal)
 This variable is set by calling `notmuch-address-harvest'.")
 
 (defvar notmuch-address-full-harvest-finished nil
-  "t indicates that full completion address harvesting has been finished.
-Use notmuch-address--harvest-ready to access as that will load a
-saved hash if necessary (and available).")
+  "Whether full completion address harvesting has finished.
+Use notmuch-address--harvest-ready to access as that will load
+a saved hash if necessary (and available).")
 
 (defun notmuch-address--harvest-ready ()
   "Return t if there is a full address hash available.
diff --git a/emacs/notmuch-crypto.el b/emacs/notmuch-crypto.el
index 4fab215a..9e6f3a9d 100644
--- a/emacs/notmuch-crypto.el
+++ b/emacs/notmuch-crypto.el
@@ -27,7 +27,7 @@ (require 'notmuch-lib)
 (declare-function notmuch-show-get-message-id "notmuch-show" (&optional bare))
 
 (defcustom notmuch-crypto-process-mime t
-  "Should cryptographic MIME parts be processed?
+  "Whether to process cryptographic MIME parts.
 
 If this variable is non-nil signatures in multipart/signed
 messages will be verified and multipart/encrypted parts will be
@@ -46,7 +46,7 @@ (defcustom notmuch-crypto-process-mime t
   :group 'notmuch-crypto)
 
 (defcustom notmuch-crypto-get-keys-asynchronously t
-  "Retrieve gpg keys asynchronously."
+  "Whether to retrieve openpgp keys asynchronously."
   :type 'boolean
   :group 'notmuch-crypto)
 
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 62d615d1..821bb324 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -82,10 +82,11 @@ (defgroup notmuch-reply nil
   :group 'notmuch)
 
 (defcustom notmuch-mua-cite-function 'message-cite-original
-  "*Function for citing an original message.
+  "Function for citing an original message.
+
 Predefined functions include `message-cite-original' and
-`message-cite-original-without-signature'.
-Note that these functions use `mail-citation-hook' if that is non-nil."
+`message-cite-original-without-signature'.  Note that these
+functions use `mail-citation-hook' if that is non-nil."
   :type '(radio (function-item message-cite-original)
(function-item message-cite-original-without-signature)
(function-item sc-cite-original)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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'.
---
 emacs/notmuch-compat.el |  9 +
 emacs/notmuch-hello.el  | 16 +---
 emacs/notmuch-jump.el   |  5 -
 emacs/notmuch-lib.el| 12 
 emacs/notmuch-mua.el| 17 ++---
 emacs/notmuch-show.el   | 10 --
 emacs/notmuch-tree.el   |  7 ---
 7 files changed, 24 insertions(+), 52 deletions(-)

diff --git a/emacs/notmuch-compat.el b/emacs/notmuch-compat.el
index 3ede6b36..2975f4c2 100644
--- a/emacs/notmuch-compat.el
+++ b/emacs/notmuch-compat.el
@@ -21,10 +21,11 @@
 
 ;;; Code:
 
-;; emacs master has a bugfix for folding long headers when sending
-;; messages. Include the fix for earlier versions of emacs. To avoid
-;; interfering with gnus we only run the hook when called from
-;; notmuch-message-mode.
+;; Before Emacs 26.1 lines that are longer than 998 octets were not.
+;; folded. Commit 77bbca8c82f6e553c42abbfafca28f55fc995d00 fixed
+;; that. Until we drop support for Emacs 25 we have to backport that
+;; fix. To avoid interfering with Gnus we only run the hook when
+;; called from notmuch-message-mode.
 
 (declare-function mail-header-fold-field "mail-parse" nil)
 
diff --git a/emacs/notmuch-hello.el b/emacs/notmuch-hello.el
index b67a5e19..af170dd4 100644
--- a/emacs/notmuch-hello.el
+++ b/emacs/notmuch-hello.el
@@ -645,6 +645,7 @@ (defun notmuch-hello-window-configuration-change ()
   ;; Refresh hello as soon as we get back to redisplay.  On Emacs
   ;; 24, we can't do it right here because something in this
   ;; hook's call stack overrides hello's point placement.
+  ;; FIXME And on Emacs releases that we still support?
   (run-at-time nil nil #'notmuch-hello t))
 (unless hello-buf
   ;; Clean up hook
@@ -665,17 +666,10 @@ (defun notmuch-hello-versions ()
   " (emacs mua version " notmuch-emacs-version ")")
 
 (defvar notmuch-hello-mode-map
-  (let ((map (if (fboundp 'make-composed-keymap)
-;; Inherit both widget-keymap and
-;; notmuch-common-keymap. We have to use
-;; make-sparse-keymap to force this to be a new
-;; keymap (so that when we modify map it does not
-;; modify widget-keymap).
-(make-composed-keymap (list (make-sparse-keymap) 
widget-keymap))
-  ;; Before Emacs 24, keymaps didn't support multiple
-  ;; inheritance,, so just copy the widget keymap since
-  ;; it's unlikely to change.
-  (copy-keymap widget-keymap
+  ;; Inherit both widget-keymap and notmuch-common-keymap.  We have
+  ;; to use make-sparse-keymap to force this to be a new keymap (so
+  ;; that when we modify map it does not modify widget-keymap).
+  (let ((map (make-composed-keymap (list (make-sparse-keymap) widget-keymap
 (set-keymap-parent map notmuch-common-keymap)
 (define-key map "v" 'notmuch-hello-versions)
 (define-key map (kbd "") 'widget-backward)
diff --git a/emacs/notmuch-jump.el b/emacs/notmuch-jump.el
index 1e2d0497..ff622055 100644
--- a/emacs/notmuch-jump.el
+++ b/emacs/notmuch-jump.el
@@ -29,11 +29,6 @@ (eval-when-compile
 (require 'notmuch-lib)
 (require 'notmuch-hello)
 
-(eval-and-compile
-  (unless (fboundp 'window-body-width)
-;; Compatibility for Emacs pre-24
-(defalias 'window-body-width 'window-width)))
-
 ;;;###autoload
 (defun notmuch-jump-search ()
   "Jump to a saved search by shortcut key.
diff --git a/emacs/notmuch-lib.el b/emacs/notmuch-lib.el
index 118faf1e..edb40533 100644
--- a/emacs/notmuch-lib.el
+++ b/emacs/notmuch-lib.el
@@ -653,18 +653,6 @@ (defun notmuch-get-bodypart-text (msg part process-crypto 
&optional cache)
 MSG (if it isn't already)."
   (notmuch--get-bodypart-raw msg part process-crypto nil cache))
 
-;; Workaround: The call to `mm-display-part' below triggers a bug in
-;; Emacs 24 if it attempts to use the shr renderer to display an HTML
-;; part with images in it (demonstrated in 24.1 and 24.2 on Debian and
-;; Fedora 17, though unreproducible in other configurations).
-;; `mm-shr' references the variable `gnus-inhibit-images' without
-;; first loading gnus-art, which defines it, resulting in a
-;; void-variable error.  Hence, we advise `mm-shr' to ensure gnus-art
-;; is loaded.
-(define-advice mm-shr (:before (_handle) notmuch--load-gnus-args)
-  "Require `gnus-art' since we use its variables."
-  (require 'gnus-art nil t))
-
 (defun notmuch-mm-display-part-inline (msg part content-type process-crypto)
   "Use the mm-decode/mm-view functions to display a part in the
 current buffer, if possible."
diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 869ec51a..49bad00d 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/n

[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 Emacs 23
---
 emacs/notmuch-mua.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/emacs/notmuch-mua.el b/emacs/notmuch-mua.el
index 616b625c..1204fb6a 100644
--- a/emacs/notmuch-mua.el
+++ b/emacs/notmuch-mua.el
@@ -402,7 +402,7 @@ (defun notmuch-mua-mail (&optional to subject other-headers 
continue
 ;; argument. Pass it only if it is supplied by the caller. This
 ;; will never be the case when we're called by `compose-mail' in
 ;; Emacs 23.
-(when return-action (nconc args '(return-action)))
+(when return-action (nconc args (list return-action)))
 (apply 'message-setup-1 headers args))
   (notmuch-fcc-header-setup)
   (message-sort-headers)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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))
 (declare-function notmuch-search-find-thread-id "notmuch" (&optional bare))
 (declare-function notmuch-search-find-subject "notmuch" ())
 
+;; For `notmuch-tree-next-thread-from-search'.
+(declare-function notmuch-search-next-thread "notmuch" ())
+(declare-function notmuch-search-previous-thread "notmuch" ())
+(declare-function notmuch-tree-from-search-thread "notmuch" ())
+
 ;; the following variable is defined in notmuch.el
 (defvar notmuch-search-query-string)
 
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


[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)

See (info "(elisp)Creating Buffer-Local").

Whether refreshing the buffer contents should involve re-enable the
mode is a different question, which should not be decided based on
the fact that we want keep the value of some random variable, not
least because some other (e.g. cache) variables are likely expected
to be wiped.
---
 emacs/notmuch.el | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/emacs/notmuch.el b/emacs/notmuch.el
index 83bcee57..c4078bd3 100644
--- a/emacs/notmuch.el
+++ b/emacs/notmuch.el
@@ -995,11 +995,7 @@ (defun notmuch-search (&optional query oldest-first 
target-thread target-line no
 (if no-display
(set-buffer buffer)
   (pop-to-buffer-same-window buffer))
-;; avoid wiping out third party buffer-local variables in the case
-;; where we're just refreshing or changing the sort order of an
-;; existing search results buffer
-(unless (eq major-mode 'notmuch-search-mode)
-  (notmuch-search-mode))
+(notmuch-search-mode)
 ;; Don't track undo information for this buffer
 (set 'buffer-undo-list t)
 (set 'notmuch-search-query-string query)
-- 
2.29.1
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


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

1456b63e04637094eefe7e6f9a45812ed419392a0322fe8b0f452dd06a4cfbef  
notmuch-0.31.2.tar.xz
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAl+oL20ACgkQA0U5G1Wq
FSGWtw/9EqjyvNfxwNCPIUVOzW+ZWGk5VOS2eSkhKvWX8fN0VP3g23CXSAf8ofZw
kM9oOPQcllJAZJTtUkOoEXUnfIBzvsqsZNRA3IwnF5sAuGr0WsPxZSqYAkysbWiF
mkfOcFbufTk6I0SPqEnDT6Yw7RbUM8OSPe1Bd0squcdDcEy6PxVlej9kcSU5630u
6mWmkb7W5lDF9TM//wSSS0ddyhxjcsMsyBnSRgQ/+AF6OOypMUHA/ScL/yyC2nf8
Ipq6obkqqDUGXUFD07E+etBMREfJ9gGEHFdiHy2qX+wHJP72/mVTjs11F+mCz9xR
SNPYAs0ea99Fy3UFtA1yHoVX9bh3IusASXjEvTt4fLmpdzPLhMft47gwBZ4FWZ+y
lk5YUVkkNvTt9grQQKK9NpCO2MEET/qCqlDc5dnP95/Eb3WG9iBmjGHOQoxdymSW
fVvir+UZvLeqiGfLTCHtZqxIWys6eQNBuy8gN+gCXMsLiE2WomCsAj1DJWEaJZ9s
LSUisEh9vDLcyW1nKUhmqYp+WMmV5yRt0sOn2H/nri1j35N63ncTMtl5HZcGX/zx
RXVx3ZrFRtkf3yPZX3FuCi9DT5WxQqmXJesZiUqnXnqIjy3vdpI7jsXfb/RI91vl
sWnyz3SBIypiKJpv4iDlIrw06YogJjQPnh6Fw3Z+MXvBjDyIrtY=
=0Uvt
-END PGP SIGNATURE-

  https://notmuchmail.org/releases/notmuch-0.31.2.tar.xz.asc
  (signed by David Bremner)

What's new in notmuch 0.31.2
=

Build
-

Catch one more occurence of "version" in the build system, which
caused the file to be regenerated in the release tarball.

What is notmuch
===
Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages in maildir or mh format. It uses
the Xapian library to provide fast, full-text search with a convenient
search syntax.

For more about notmuch, see https://notmuchmail.org



signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org


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

328be79034e74487a33faa25662729085320680db5b4a7d0c89338d2ace7bb5e  
notmuch-0.31.1.tar.xz
-BEGIN PGP SIGNATURE-

iQIzBAEBCAAdFiEEkiyHYXwaY0SiY6fqA0U5G1WqFSEFAl+n+woACgkQA0U5G1Wq
FSFaVw//en+x/QTJeizFYGGVO4WXINQfcyw9yZKO0PaOWhJ9+GmN0RVBdYv1uS1X
f3UMFYBSNLTEPHKIRjKIs9sixIKT5Pq6fcWKgN9qIQJpf2iGhGQwDhxLJSzeXpul
VGTjCM0k6GdeX/Qz1x/BOjoFpTmxQj4Z9vMmsjYy2D6gU/Uqsqs8ApBIVNmuPc4i
ulvv7Lb+QzanQX8MdvQrABVs8ic2PblzxhCI7YqghzaEJCfUSyMWaIEsUQz/T6iJ
4MEoDpT576EpbZwOnC5EOxJBtxQSptjekxdVnfCULGukuiWqbFQN0zrlTk5/cuNX
wcZTJO8IhSscopSqkBAY/tDDrpe7VXulb95FFyG3mg/O93HGj6uljYxmzb1E4lon
kVG/Rtr5cTTBz9qEN3LfD59akJloSfZRhnEmW94tF/IYi8AaSQhHu+VsM+H2pUcG
8Cam4YyrtDlgG1AAfV+N47czV1Km7VXxy8cstlrvEJaeiKCvBCr0Az+Scs4NIdvy
alFqlKOnK/xzdPOoMr0fCVEaD3hP0EDzOKLCdbVKoa85o2Q+A+wmN46HKRhR/n+y
4Lx/WkFJf2/nu9xc7Srcw05Lb4x1qoRf3g4h/HEHDTlV+DEjMpQLWt1Klkw/wmDY
niMdjDUypfJhYbxKh242jsjG/kLXrLyjWBwKfbOzbY0D/mCDo0g=
=j5s4
-END PGP SIGNATURE-

  https://notmuchmail.org/releases/notmuch-0.31.1.tar.xz.asc
  (signed by David Bremner)

What's new in notmuch 0.31.1
=

Library
---

Fix a memory initialization bug in notmuch_database_get_config_list.

Build
-

Rename file 'version' to 'version.txt'. The old file name conflicted
with a C++ header for some compilers.

Replace use of coreutils `realpath` in configure.

What is notmuch
===
Notmuch is a system for indexing, searching, reading, and tagging
large collections of email messages in maildir or mh format. It uses
the Xapian library to provide fast, full-text search with a convenient
search syntax.

For more about notmuch, see https://notmuchmail.org



signature.asc
Description: PGP signature
___
notmuch mailing list -- notmuch@notmuchmail.org
To unsubscribe send an email to notmuch-le...@notmuchmail.org