* C-x 3 C-s foo Only window with cursor "lights up" foo
@ 2005-01-29 6:38 David Combs
2005-01-29 11:27 ` Peter Dyballa
[not found] ` <mailman.16030.1106999971.27204.help-gnu-emacs@gnu.org>
0 siblings, 2 replies; 11+ messages in thread
From: David Combs @ 2005-01-29 6:38 UTC (permalink / raw)
Funny, I thought this worked ok -- I guess not.
(at least not today, it doesn't!)
What, starting with 21.2 -- or was it 21.3 --
when you search for something, all the occurences
of it in the current window "light up", are displayed
in a different color.
Very, very nice.
However, when I get two side-by-side windows, via C-x 3,
with follow-mode on for "them", the lighting-up doesn't
seem to propagate across to the other side, which is
of course (in my case) just as visible.
That is, if in the left window, and search forward,
I'd expect all visible "foo" occurrences to light up.
Ditto for being in the right one and searching backwards.
(Actually, the direction of search seems not to matter;
*all* visible foos (in the current window) light up,
both above and below the cursor.)
Anyway, it'd sure be nice if the lighting-up would show
up in all windows into a given buffer, when follow-mode
is in effect.
Question: am I doing something wrong?
Thanks,
David
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-01-29 6:38 C-x 3 C-s foo Only window with cursor "lights up" foo David Combs
@ 2005-01-29 11:27 ` Peter Dyballa
[not found] ` <mailman.16030.1106999971.27204.help-gnu-emacs@gnu.org>
1 sibling, 0 replies; 11+ messages in thread
From: Peter Dyballa @ 2005-01-29 11:27 UTC (permalink / raw)
Cc: help-gnu-emacs
Am 29.01.2005 um 07:38 schrieb David Combs:
> Question: am I doing something wrong?
You're presuming that GNU Emacs has a list that points it to all
buffers this file is visiting.
isearch works only in the active buffer and there it highlights all
that matches the search string. In the other buffer you could search
for something different ...
--
Greetings
Pete
“Computers are good at following instructions, but not at reading your
mind.”
- D. E. Knuth, The TeXbook, Addison-Wesley 1984, 1986, 1996, p. 9
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
[not found] ` <mailman.16030.1106999971.27204.help-gnu-emacs@gnu.org>
@ 2005-01-31 16:07 ` Stefan Monnier
2005-02-01 13:25 ` Mathias Dahl
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-01-31 16:07 UTC (permalink / raw)
>> Question: am I doing something wrong?
> You're presuming that GNU Emacs has a list that points it to all buffers
> this file is visiting.
Actually, in his case there's only 1 buffer. But it's displayed in
two windows. And yes, isearch's highlighting doesn't bother to look for all
the windows that display the current buffer.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-01-31 16:07 ` Stefan Monnier
@ 2005-02-01 13:25 ` Mathias Dahl
2005-02-01 19:10 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Mathias Dahl @ 2005-02-01 13:25 UTC (permalink / raw)
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >> Question: am I doing something wrong? You're presuming that GNU
> > Emacs has a list that points it to all buffers this file is
> > visiting.
>
> Actually, in his case there's only 1 buffer. But it's displayed in
> two windows. And yes, isearch's highlighting doesn't bother to look
> for all the windows that display the current buffer.
It is highlighting the *current* match in all windows though.
/Mathias
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-02-01 13:25 ` Mathias Dahl
@ 2005-02-01 19:10 ` Stefan Monnier
2005-02-03 8:39 ` Mathias Dahl
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-02-01 19:10 UTC (permalink / raw)
> It is highlighting the *current* match in all windows though.
The highlighting is applied to the buffer, not to the window.
So, yes, it's visible in all windows that currently display that part of
the buffer.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-02-01 19:10 ` Stefan Monnier
@ 2005-02-03 8:39 ` Mathias Dahl
2005-02-03 15:17 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Mathias Dahl @ 2005-02-03 8:39 UTC (permalink / raw)
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > It is highlighting the *current* match in all windows though.
>
> The highlighting is applied to the buffer, not to the window. So,
> yes, it's visible in all windows that currently display that part of
> the buffer.
Curious, why is just the "primary" text marked in the buffer in all
windows it is displayed and not the "future" marks?
/Mathias
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-02-03 8:39 ` Mathias Dahl
@ 2005-02-03 15:17 ` Stefan Monnier
2005-02-04 10:36 ` Mathias Dahl
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-02-03 15:17 UTC (permalink / raw)
>> > It is highlighting the *current* match in all windows though.
>>
>> The highlighting is applied to the buffer, not to the window. So,
>> yes, it's visible in all windows that currently display that part of
>> the buffer.
> Curious, why is just the "primary" text marked in the buffer in all
> windows it is displayed and not the "future" marks?
It is also marked in all windows (i.e. the highlighting of the "future
marks" is also applied to the buffer, not just the window), AFAIK.
But it's only applied to the region of the buffer that's visible in the main
window, so other windows won't see any of it unless they show an overlapping
part of the buffer.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-02-03 15:17 ` Stefan Monnier
@ 2005-02-04 10:36 ` Mathias Dahl
2005-02-04 18:27 ` Steinar Børmer
0 siblings, 1 reply; 11+ messages in thread
From: Mathias Dahl @ 2005-02-04 10:36 UTC (permalink / raw)
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > Curious, why is just the "primary" text marked in the buffer in
> > all windows it is displayed and not the "future" marks?
>
> It is also marked in all windows (i.e. the highlighting of the
> "future marks" is also applied to the buffer, not just the window),
> AFAIK. But it's only applied to the region of the buffer that's
> visible in the main window, so other windows won't see any of it
> unless they show an overlapping part of the buffer.
In my Emacs it is not the case. I'm running CVS Emacs from July 2004
in Windows XP. Not that it is very important for me, I just wanted to
present this fact.
I did this:
* emacs --no-init-file
* When in the *scratch* buffer, C-x 2
* C-s a (just search for an "a" in there)
The highligting for the "future" marks is only visible in one of the
windows.
/Mathias
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-02-04 10:36 ` Mathias Dahl
@ 2005-02-04 18:27 ` Steinar Børmer
2005-02-04 23:49 ` Stefan Monnier
0 siblings, 1 reply; 11+ messages in thread
From: Steinar Børmer @ 2005-02-04 18:27 UTC (permalink / raw)
Mathias Dahl wrote:
| Stefan Monnier <monnier@iro.umontreal.ca> writes:
|
| > It is also marked in all windows (i.e. the highlighting of the
| > "future marks" is also applied to the buffer, not just the window),
| > AFAIK. But it's only applied to the region of the buffer that's
| > visible in the main window, so other windows won't see any of it
| > unless they show an overlapping part of the buffer.
|
| In my Emacs it is not the case. I'm running CVS Emacs from July 2004
| in Windows XP. Not that it is very important for me, I just wanted to
| present this fact.
[ snip ]
| The highligting for the "future" marks is only visible in one of the
| windows.
Same behavior here, Emacs 21.3.50 on FreeBSD, built 15 minutes ago.
--
SB
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-02-04 18:27 ` Steinar Børmer
@ 2005-02-04 23:49 ` Stefan Monnier
2005-02-05 0:21 ` David Kastrup
0 siblings, 1 reply; 11+ messages in thread
From: Stefan Monnier @ 2005-02-04 23:49 UTC (permalink / raw)
> | > It is also marked in all windows (i.e. the highlighting of the
> | > "future marks" is also applied to the buffer, not just the window),
> | > AFAIK. But it's only applied to the region of the buffer that's
> | > visible in the main window, so other windows won't see any of it
> | > unless they show an overlapping part of the buffer.
> |
> | In my Emacs it is not the case. I'm running CVS Emacs from July 2004
> | in Windows XP. Not that it is very important for me, I just wanted to
> | present this fact.
> [ snip ]
> | The highligting for the "future" marks is only visible in one of the
> | windows.
> Same behavior here, Emacs 21.3.50 on FreeBSD, built 15 minutes ago.
Oops, you're right, isearch actually goes to the trouble to make the
"lazy hilighting" only active in the main window.
This was done apparently on-purpose, by RMS in the following change:
revision 1.172
date: 2001/01/03 00:18:53; author: rms; state: Exp; lines: +76 -86
Do highlighting of alternative matches all at once,
but only do it in the text that's visible in the selected window.
(isearch-lazy-highlight-cleanup): Arg now says
to remove all the current alternative-match highlighting.
If nil, remove only what's outside the current window.
(isearch-lazy-highlight-remove-overlays): Take optional
region within which NOT to remove them.
(isearch-lazy-highlight-new-loop): Greatly simplified.
(isearch-lazy-highlight-update): Find all the other occurrences
visible in the window, in just one call.
(isearch-lazy-highlight-start): Now holds start of region to scan.
(isearch-lazy-highlight-end): Now holds end of region to scan.
(isearch-lazy-highlight-wrapped): Variable deleted.
(isearch-lazy-highlight-search): Function deleted.
----------------------------
The relevant pat of the corresponding diff is:
@@ -1989,26 +1995,10 @@
(overlay-put ov 'face isearch-lazy-highlight-face))
(overlay-put ov 'priority 0)
+ ;; Don't highlight on any other windows.
+ (overlay-put ov 'window isearch-lazy-highlight-window)
This code has changed, but the `window' property on the overlay has been
preserved since.
If you don't like it, you should send a bug report about it with M-x
report-emacs-bug.
Stefan
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: C-x 3 C-s foo Only window with cursor "lights up" foo
2005-02-04 23:49 ` Stefan Monnier
@ 2005-02-05 0:21 ` David Kastrup
0 siblings, 0 replies; 11+ messages in thread
From: David Kastrup @ 2005-02-05 0:21 UTC (permalink / raw)
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> The relevant pat of the corresponding diff is:
>
> @@ -1989,26 +1995,10 @@
> (overlay-put ov 'face isearch-lazy-highlight-face))
>
> (overlay-put ov 'priority 0)
> + ;; Don't highlight on any other windows.
> + (overlay-put ov 'window isearch-lazy-highlight-window)
>
>
> This code has changed, but the `window' property on the overlay has been
> preserved since.
>
> If you don't like it, you should send a bug report about it with M-x
> report-emacs-bug.
It is not just a simple case of changing the property here: the lazy
highlighting searches and highlights just an area around point for its
work, I guess. To highlight consistently in more than one window, you
would need to extend this search around _all_ window-point values of
windows showing the buffer.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2005-02-05 0:21 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-29 6:38 C-x 3 C-s foo Only window with cursor "lights up" foo David Combs
2005-01-29 11:27 ` Peter Dyballa
[not found] ` <mailman.16030.1106999971.27204.help-gnu-emacs@gnu.org>
2005-01-31 16:07 ` Stefan Monnier
2005-02-01 13:25 ` Mathias Dahl
2005-02-01 19:10 ` Stefan Monnier
2005-02-03 8:39 ` Mathias Dahl
2005-02-03 15:17 ` Stefan Monnier
2005-02-04 10:36 ` Mathias Dahl
2005-02-04 18:27 ` Steinar Børmer
2005-02-04 23:49 ` Stefan Monnier
2005-02-05 0:21 ` David Kastrup
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).