all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Combining (and obsoleting) isearch-regexp and isearch-word into a new var
@ 2015-07-28 23:48 Artur Malabarba
  2015-07-29 22:22 ` Juri Linkov
  0 siblings, 1 reply; 2+ messages in thread
From: Artur Malabarba @ 2015-07-28 23:48 UTC (permalink / raw)
  To: emacs-devel

Currently `isearch-word' is a variable that can be a boolean
(indicating if word searching is on or off) or it can hold a function
(which is called on the search string before passing it to a regexp
search).
Both symbol-searching and char-folding are implemented as function
values of this variable, while word-searching is implemented as a
boolean value even though it could just as well be another function
value.

In addition to that, we also have regexp-searching, which *could* be
just another function value for that variable (the #'identity), but
instead it's implemented as a whole new boolean variable
(`isearch-regexp').

All of these 4 functionalities are mutually exclusive, so it makes
sense for them to be implemented as different values of a single
variable in a consisten manner (all functions).


I'd like to propose that the `isearch-word' variable be aliased to
`isearch-special' (or something like this), and that its use as a
boolean also be obsoleted.
Then also obsolete `isearch-regexp', which is just a special case of
`isearch-special'.

If we don't want an extra var, then we can just use one of the
existing vars for this purpose and obsolete the other.
I'd just like to condense it all in a single variable and obsolete the
boolean usage.



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

* Re: Combining (and obsoleting) isearch-regexp and isearch-word into a new var
  2015-07-28 23:48 Combining (and obsoleting) isearch-regexp and isearch-word into a new var Artur Malabarba
@ 2015-07-29 22:22 ` Juri Linkov
  0 siblings, 0 replies; 2+ messages in thread
From: Juri Linkov @ 2015-07-29 22:22 UTC (permalink / raw)
  To: Artur Malabarba; +Cc: emacs-devel

> All of these 4 functionalities are mutually exclusive, so it makes
> sense for them to be implemented as different values of a single
> variable in a consisten manner (all functions).

I welcome your changes since I had the same thoughts about ‘isearch-word’
overgrowing its initial purpose of word-searching only.

> I'd like to propose that the `isearch-word' variable be aliased to
> `isearch-special' (or something like this), and that its use as a
> boolean also be obsoleted.

A better name would be ‘isearch-regexp-based’ that will support all
regexp-based search modes including word, symbol, lax-whitespace,
char-folding, etc.

> Then also obsolete `isearch-regexp', which is just a special case of
> `isearch-special'.

I'd rather leave ‘isearch-regexp’ alone since the normal regexp search
needs special input processing (‘isearch-fallback’, etc.)



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

end of thread, other threads:[~2015-07-29 22:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-28 23:48 Combining (and obsoleting) isearch-regexp and isearch-word into a new var Artur Malabarba
2015-07-29 22:22 ` Juri Linkov

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.