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

From: Juri Linkov <[email-masked]>
Date: Wed, 11 Dec 2024 09:06:38 +0200

>> Please also see the commit 98f8c5fb07dcb4e20b8ba6648bdabf5c0d3b5145
>> that fixed this in dired by using a buffer-local variable. Do you
>> agree it's a good fix? Otherwise using a separate variable is also
>> fine.
>
> My concern with using a local variable is that users may also set the
> user option locally. That is perhaps not a problem for eshell or dired,
> but for comint, e.g., I may set 'comint-history-isearch' to 'dwim' only
> in 'M-x shell' via the mode hook.

Indeed, this is a valid use case.

> IMO, changing an internal variable feels a bit cleaner and safer than
> manipulating a user option. So I would prefer using a separate variable.

I agree that a separate variable is better.  So now I added to comint.el
'comint--force-history-isearch' extracted from your Eshell patch.

Thanks for the fix!