help-gnu-emacs
[Top][All Lists]
Advanced

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

RE: killing the result of isearch


From: Drew Adams
Subject: RE: killing the result of isearch
Date: Tue, 7 Nov 2017 14:54:40 -0800 (PST)


> >> I am actually talking about expectations from using emacs where regions
> >> are highlighted, like what isearch seems like doing. What I am seeing is
> >> what looks like a region (and except for the active match, all the
> others
> >> are highlighted exactly as a region would be), but it doesn't act like a
> >> region. So there is a UI promise that's broken.
> >
> > That's not what I see in vanilla Emacs: `emacs -Q'.
> 
> Interesting. When I do that on one of my local files (with an emacs I built
> a few days ago) I do get the current match highlighted in purple and the
> other matches highlighted in blue (after testing a region is highlighted in
> a slightly different color). The cursor is blinking at the end of the first
> match.
> 
> So it looks as I wrote: this looks like a region, with a cursor blinking
> where point it, but it does not act as one.
> 
> What matters here is not the color, but the fact that point has moved and
> something that looks like a region is formed. Hence the expectation. And
> really, if that "object" exists on screen, I'd love to be able to capture
> it somehow.

OK, so you feel that any highlighting that shows a different
background from the default background, and where the cursor
is at one end of a stretch of such highlighting, "looks like
a region".  To you it looks as if that text has been selected,
available to act on (e.g. cut, copy, replace).

Emacs uses background highlighting for lots of different things,
and sometimes the cursor is at the end of such a highlighted
stretch of text.  If you use your interpretation then you are
likely to be disappointed from time to time - such highlighting
does not, in general, indicate "the" Emacs region.

Fortunately, you can customize Emacs faces, so you could, in
order not to be confused, customize all faces that by default
highlight the background, so that they no longer do so.  You
can easily change them to highlight the foreground instead,
for example.  There are not that many, and changing them all
is easily done.  Use `M-x list-faces-display' to see which
faces you use have that problem.

The ones I see, by default (`emacs -Q') are:

cursor
fringe
header-line
header-line-highlight
isearch
isearch-fail
lazy-highlight
match
menu
mode-line
mode-line-highlight
mode-line-inactive
next-error
query-replace
secondary-selection
show-paren-match
show-paren-match-expression
show-paren-mismatch
tool-bar
tooltip
trailing-whitespace
tty-menu-disabled-face
tty-enabled-face
tty-menu-selected-face

Some of those (e.g., fringe, the mode-line ones) are used
in non-buffer-position places, where you cannot place the
cursor anyway, so you need not change them - no possible
confusion with region highlighting there.



reply via email to

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