[Top][All Lists]

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

Re: Simple isearch concerns

From: Ergus
Subject: Re: Simple isearch concerns
Date: Mon, 5 Apr 2021 03:41:40 +0200

On Sun, Apr 04, 2021 at 07:27:13PM -0400, Stefan Monnier wrote:
-(defvar isearch-mode-end-hook nil
+(defcustom isearch-mode-end-hook nil
   "Function(s) to call after terminating an incremental search.
 When these functions are called, `isearch-mode-end-hook-quit'
-is non-nil if the user quits the search.")
+is non-nil if the user quits the search."
+  :type 'hook
+  :options '(isearch-exit-other-end)
+  :version "28.1")

FWIW, I can't imagine why someone would like that option.  I can see it
being useful *sometimes*, but I think it'd be harmful at least as often
as it is useful.


Hi Stefan:

Swiper provides this option and after trying it I found it very
useful and some other users seems they do too.
Specially when the idea is to select a word C-M-SPC after it is found is
very handy. Another use case is when the word looks like my_var or
my-var it requires M-b twice to go to the beginning and then select.

In any case, if you think this option is not desirable for any reason,
another alternative may be to add a command in the isearch map (bind to
C-RET, or M-RET) to end the search and go to the other end... something
like isearch-exit-go-other-end. This alternative is actually a bit more
interesting; and maybe equivalent to pressing C-r before RET... but

reply via email to

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