unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Some further ideas for Isearch
@ 2021-04-25  8:20 Augusto Stoffel
  2021-04-25 17:36 ` Juri Linkov
  0 siblings, 1 reply; 5+ messages in thread
From: Augusto Stoffel @ 2021-04-25  8:20 UTC (permalink / raw)
  To: emacs-devel

Here are some further ideas for Isearch, partially inspired by the
alternative buffer search packages out there:

Future history
--------------

Pressing `C-s M-n M-n ...' could present a few useful search
candidates, controlled for instance by the
`isearch-forward-thing-at-point' variable.  This would be more
flexible and more mnemonic than the recently introduced
`isearch-forward-thing-at-point' command.

Resume canceled searches
------------------------

`C-s C-s' recovers the last history element, so it's more or less
equivalent to `C-s M-p'.  It would be nice to have the ability to
resume a canceled search, i.e., make `C-s C-s' look into
`isearch-cmds' instead.

Fuzzy search
------------

By this I mean a search mode where `search-whitespace-regexp' is set
to ".*?".

Implementing this wouldn't be completely trivial because, unlike case
sensitivity, the whitespace laxness settings are not local to each
Isearch session.  (As a quick check, note that `M-s c' changes
case-sensitivity for the current search only, but `M-s SPC' changes
whitespace laxness for future searches as well.)

The whitespace regexp should also be saved as a property in the
search-ring elements.

Whole words vs lax whitespace
-----------------------------

The word search mode (M-s w) does two things at once: it wraps the
search string around "\\< ... \\>" and treats whitespace as "\\W+".  It
would be nice to make these two aspects orthogonal.

Sometimes, one might want to search whole words with literal spaces.
Much more often, however, one might want "\\W+" whitespace but not the
whole-word restriction.

I'm not sure what a good UI would be, but one idea is to make `M-s SPC'
cycle between a few useful whitespace regexps (e.g., nil, "\\s-+",
"\\W+" and ".*?").



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-04-28 21:55 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-25  8:20 Some further ideas for Isearch Augusto Stoffel
2021-04-25 17:36 ` Juri Linkov
2021-04-26  5:32   ` Augusto Stoffel
2021-04-28 21:11     ` Juri Linkov
2021-04-28 21:55       ` Augusto Stoffel

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).