bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#74287: [PATCH] Rework history Isearch for Eshell


From: Juri Linkov
Subject: bug#74287: [PATCH] Rework history Isearch for Eshell
Date: Tue, 10 Dec 2024 09:46:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)

>> 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:
>
> @@ -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)))

I agree this would be the right thing, because even in Isearch
we have variables that duplicate the user options such as e.g.
the option 'search-invisible' and the internal variable 'isearch-invisible'.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]