emacs-devel
[Top][All Lists]
Advanced

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

RE: ASCII-folded search [was: Re: Upcoming loss of usability ...]


From: Drew Adams
Subject: RE: ASCII-folded search [was: Re: Upcoming loss of usability ...]
Date: Fri, 26 Jun 2015 08:19:14 -0700 (PDT)

> Using the modeline is a very neat idea!
>
> There is one package (anzu) I know of that makes partial use of the
> mode line to display the search pattern counts.

And for years isearch+.el has used the mode-line lighter to indicate
case-sensitivity.  And it uses faces on the prompt (and on the lighter,
for wraparound) to indicate word, regexp-vs-literal, and multi-buffer
search, as well as search wraparound.  (See my previous message.)

> We will need a solution that doesn't break these other packages.
> Or should the info be simply added to `minor-mode-alist` with
> "button click properties"? (I forgot the exact property name).
>
> abo-abo creates a pseudo minibuffer on top of the actual minibuffer
> to display the hints in his hydra.el package. That could also work
> here?
>
> My earlier suggestion was simply based in the current code. I saw
> that a `sleep-for` was used to flash the isearch setting change
> momentarily. I wondered if we just keep that isearch setting change
> display static and then remove that at the next search character
> input by the user.
>
> Let's say that the user is search for "abc" and he has already
> typed "ab".                      Isearch: ab|
> Now the user decides to toggle one of the isearch toggles, let's
> say case-fold toggle and hits `M-c`. Then the minibuffer can
> display this                     Isearch: ab| [case-sensitive]
> That should stay like that till the user continues typing 
>                                  Isearch: abc| 
> But, showing the isearch settings persistently in a separate area
> is a better idea.

My suggestion:

Isearch should *not* take over the mode-line.  Certainly not by
default.  At the same time that Isearch is used, users typically
need to see lots of other stuff in the mode-line as well.

Any other persistent (i.e., always visible while Isearching)
display of search info that is more verbose than a lighter
should be optional, turned off by default, and perhaps
toggleable by users during Isearch.

In Isearch+ I use different faces in the *prompt* to indicate
search wraparound, word, regexp-vs-literal, and multi-buffer
search.  This reminder is sufficient, I think, and it does not
sacrifice any space.

Wrt the current issue being discussed: Character folding could,
like case folding, be indicated in the lighter.  Something like
this, for example:

 Isearch - case sensitive
 ISEARCH - case folding
 Isearcĥ - char folding
 ISEARCĤ - char folding & case folding

However, as has been discussed in several threads in the past,
here and in the bug list, there are several char-folding
possibilities that we might want to offer.

There are any number of reasonable, default character equivalence
classes that you can think of.  And users themselves can come up
with any number of other such equivalence classes, some of which
are specific to a particular context.

Then bring multiple scripts and languages into the picture...
The possibilities are virtually limitless.

One person's common or useful char-folding use case is another's
YAGNI, and vice versa.

Succinct visual representation of the possible foldings is
clearly untenable in the general case.  That way lies folly.

It might be possible to instead offer a general visual indication
facility, which users themselves can develop or customize.

But I do not think it makes a lot of sense for Emacs to add any
such indication by default (and certainly not by hard-coding).



reply via email to

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