GNU bug report logs - #74287
[PATCH] Rework history Isearch for Eshell

Previous Next

Package: emacs;

Reported by: Pengji Zhang <me <at> pengjiz.com>

Date: Sun, 10 Nov 2024 01:23:02 UTC

Severity: normal

Tags: patch

Done: Jim Porter <jporterbugs <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #50 received at 74287 <at> debbugs.gnu.org (full text, mbox):

From: Pengji Zhang <me <at> pengjiz.com>
To: Juri Linkov <juri <at> linkov.net>
Cc: Jim Porter <jporterbugs <at> gmail.com>, 74287 <at> debbugs.gnu.org
Subject: Re: bug#74287: [PATCH] Rework history Isearch for Eshell
Date: Tue, 10 Dec 2024 08:55:27 +0800
Juri Linkov <juri <at> linkov.net> writes:

> [...]
>
> So do you propose to add an internal variable that duplicates the user
> option?

Yes, sort of. It does not fully duplicates the user option though.
Because we only need to force turning *on* history search, it is made to
override the user option only when it is non-nil. Basically, it is
something like:

--8<---------------cut here---------------start------------->8---
@@ -951,7 +954,8 @@ eshell--isearch-setup
   (when (and
          ;; Eshell is busy running a foreground process
          (not eshell-foreground-command)
-         (or (eq eshell-history-isearch t)
+         (or eshell--force-history-isearch
+             (eq eshell-history-isearch t)
              (and (eq eshell-history-isearch 'dwim)
                   (>= (point) eshell-last-output-end))))
     (setq isearch-message-prefix-add "history ")
@@ -975,7 +979,7 @@ eshell-history-isearch-end
   (remove-hook 'isearch-mode-end-hook #'eshell-history-isearch-end t)
   (setq isearch-opoint (point))
   (unless isearch-suspended
-    (custom-reevaluate-setting 'eshell-history-isearch)))
+    (setq eshell--force-history-isearch nil)))
--8<---------------cut here---------------end--------------->8---




This bug report was last modified 165 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.