From 9d06d72d6e14963645415dd3c12b32230db8ad41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20Benn=C3=A9e?= Date: Fri, 16 Jun 2017 14:17:28 +0100 Subject: [PATCH] mu4e: don't loose search history when editing search Even though the user may be editing this expression there is no reason to not have the mu4e~headers-search-hist present for the prompt. Emacs will only replace it with system wide history which would likely contain irrelevant history for the action. --- mu4e/mu4e-headers.el | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mu4e/mu4e-headers.el b/mu4e/mu4e-headers.el index be04aae1..9c3abd97 100644 --- a/mu4e/mu4e-headers.el +++ b/mu4e/mu4e-headers.el @@ -1387,11 +1387,10 @@ searching. If SHOW is non-nil, show the message with MSGID." ;; `mu4e~headers-query-next' or `mu4e~headers-query-prev'." (interactive) (let* ((prompt (mu4e-format (or prompt "Search for: "))) - (expr - (if edit - (read-string prompt expr) - (or expr - (read-string prompt nil 'mu4e~headers-search-hist))))) + (expr + (read-string prompt + (if edit expr nil) + 'mu4e~headers-search-hist))) (mu4e-mark-handle-when-leaving) (mu4e~headers-search-execute expr ignore-history) (setq mu4e~headers-msgid-target msgid