* how and why does keyboard input unhighlight the mouse-selected region?
@ 2003-09-04 15:50 Kevin Rodgers
2003-09-05 1:40 ` Sandip Chitale
0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2003-09-04 15:50 UTC (permalink / raw)
If I select the region with the mouse (with transient mark mode
disabled), it is highlighted using the `region' face. I think that is
implemented via `mouse-drag-overlay' in lisp/mouse.el. Then any
subsequent keyboard input -- even typing a prefix key like `C-x' --
causes it to be unhighlighted; `C-h v' shows
| mouse-drag-overlay's value is
| #<overlay in no buffer>
I don't see any references to mouse-drag-overlay in the src/*.c files,
or anywhere outside of lisp/mouse.el and lisp/mouse-sel.el for that
matter. So how is the unhighlighting of the selected region
implemented? And why is that the default behavior -- no command has
been executed, certainly not any command that modifies the buffer or
alters the region. Finally, can the unhighlighting be disabled?
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-04 15:50 how and why does keyboard input unhighlight the mouse-selected region? Kevin Rodgers
@ 2003-09-05 1:40 ` Sandip Chitale
2003-09-05 18:43 ` Kevin Rodgers
0 siblings, 1 reply; 10+ messages in thread
From: Sandip Chitale @ 2003-09-05 1:40 UTC (permalink / raw)
This may be the answer.
deactivate-mark's value is t
Documentation:
If an editing command sets this to t, deactivate the mark afterward.
The command loop sets this to nil before each command,
and tests the value when the command returns.
Buffer modification stores t in this variable.
Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3F575F5D.3040600@yahoo.com>...
> If I select the region with the mouse (with transient mark mode
> disabled), it is highlighted using the `region' face. I think that is
> implemented via `mouse-drag-overlay' in lisp/mouse.el. Then any
> subsequent keyboard input -- even typing a prefix key like `C-x' --
> causes it to be unhighlighted; `C-h v' shows
>
> | mouse-drag-overlay's value is
> | #<overlay in no buffer>
>
> I don't see any references to mouse-drag-overlay in the src/*.c files,
> or anywhere outside of lisp/mouse.el and lisp/mouse-sel.el for that
> matter. So how is the unhighlighting of the selected region
> implemented? And why is that the default behavior -- no command has
> been executed, certainly not any command that modifies the buffer or
> alters the region. Finally, can the unhighlighting be disabled?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-05 1:40 ` Sandip Chitale
@ 2003-09-05 18:43 ` Kevin Rodgers
2003-09-05 21:06 ` Sandip Chitale
0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2003-09-05 18:43 UTC (permalink / raw)
Sandip Chitale wrote:
> This may be the answer.
>
> deactivate-mark's value is t
>
> Documentation:
> If an editing command sets this to t, deactivate the mark afterward.
> The command loop sets this to nil before each command,
> and tests the value when the command returns.
> Buffer modification stores t in this variable.
Yes, but even if I set it to nil with `M-:', select a region with the
mouse, and type a prefix character (C-h), the highlighting goes away. I
can examine its value with `M-:' after selecting the region, which verifies
that it is still nil. Merely typing a key causes the the highlighting to
disappear, even though no command has been executed.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-05 18:43 ` Kevin Rodgers
@ 2003-09-05 21:06 ` Sandip Chitale
2003-09-08 16:13 ` Kevin Rodgers
0 siblings, 1 reply; 10+ messages in thread
From: Sandip Chitale @ 2003-09-05 21:06 UTC (permalink / raw)
Kevin Rodgers <ihs_4664@yahoo.com> wrote in message news:<3F58D93F.2000005@yahoo.com>...
> Sandip Chitale wrote:
>
> > This may be the answer.
> >
> > deactivate-mark's value is t
> >
> > Documentation:
> > If an editing command sets this to t, deactivate the mark afterward.
> > The command loop sets this to nil before each command,
> > and tests the value when the command returns.
> > Buffer modification stores t in this variable.
>
> Yes, but even if I set it to nil with `M-:', select a region with the
> mouse, and type a prefix character (C-h), the highlighting goes away. I
> can examine its value with `M-:' after selecting the region, which verifies
> that it is still nil. Merely typing a key causes the the highlighting to
> disappear, even though no command has been executed.
Is the "key" in "typing a key" a buffer modifying key? If not (for
example cursor movement keys) at least for me the region
(highlighting) remains active.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-05 21:06 ` Sandip Chitale
@ 2003-09-08 16:13 ` Kevin Rodgers
2003-09-08 16:16 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2003-09-08 16:13 UTC (permalink / raw)
Sandip Chitale wrote:
> Kevin Rodgers <ihs_4664@yahoo.com> wrote in message
news:<3F58D93F.2000005@yahoo.com>...
> > Sandip Chitale wrote:
> > > This may be the answer.
> > >
> > > deactivate-mark's value is t
> > >
> > > Documentation:
> > > If an editing command sets this to t, deactivate the mark afterward.
> > > The command loop sets this to nil before each command,
> > > and tests the value when the command returns.
> > > Buffer modification stores t in this variable.
> >
> > Yes, but even if I set it to nil with `M-:', select a region with the
> > mouse, and type a prefix character (C-h), the highlighting goes away. I
> > can examine its value with `M-:' after selecting the region, which verifies
> > that it is still nil. Merely typing a key causes the the highlighting to
> > disappear, even though no command has been executed.
>
> Is the "key" in "typing a key" a buffer modifying key?
No.
> If not (for
> example cursor movement keys) at least for me the region
> (highlighting) remains active.
Any key, e.g. C-h, C-b, C-f, C-p, C-n, C-x, <left>, <right>, <up>, or <down>.
emacs was started with the -q and --no-site-file options. The buffer is in
Fundamental mode.
GNU Emacs 21.3.1 (i386-pc-solaris2.7, X toolkit) of 2003-04-24 on briard
Is this a bug that I should report?
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-08 16:13 ` Kevin Rodgers
@ 2003-09-08 16:16 ` Stefan Monnier
2003-09-08 20:49 ` Kevin Rodgers
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2003-09-08 16:16 UTC (permalink / raw)
> Is this a bug that I should report?
No, you just want to turn on transient-mark-mode.
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-08 16:16 ` Stefan Monnier
@ 2003-09-08 20:49 ` Kevin Rodgers
2003-09-08 21:35 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2003-09-08 20:49 UTC (permalink / raw)
Stefan Monnier wrote:
>>Is this a bug that I should report?
>>
>
> No, you just want to turn on transient-mark-mode.
I don't think I do. Besides, its doc string says that changing the
buffer and other operations deactivate it -- but why should providing
keyboard input deactivate it, before _any_ operation is executed?
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-08 20:49 ` Kevin Rodgers
@ 2003-09-08 21:35 ` Stefan Monnier
2003-09-09 16:58 ` Kevin Rodgers
0 siblings, 1 reply; 10+ messages in thread
From: Stefan Monnier @ 2003-09-08 21:35 UTC (permalink / raw)
>>> Is this a bug that I should report?
>> No, you just want to turn on transient-mark-mode.
> I don't think I do.
Why not ?
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-08 21:35 ` Stefan Monnier
@ 2003-09-09 16:58 ` Kevin Rodgers
2003-09-09 20:19 ` Stefan Monnier
0 siblings, 1 reply; 10+ messages in thread
From: Kevin Rodgers @ 2003-09-09 16:58 UTC (permalink / raw)
Stefan Monnier wrote:
>>>>Is this a bug that I should report?
>>>
>>>No, you just want to turn on transient-mark-mode.
>>
>>I don't think I do.
>
> Why not ?
Because I find it annoying -- more so than the fact that keyboard input
unhighlights a mouse-selected region. But a follow-mouse.el user
complained to me that mouse-movement events also unhighlight the region,
and I was trying to find out why (follow-mouse.el turns on track-mouse)
when I discovered that keyboard input also unhighlights the region.
--
Kevin Rodgers
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: how and why does keyboard input unhighlight the mouse-selected region?
2003-09-09 16:58 ` Kevin Rodgers
@ 2003-09-09 20:19 ` Stefan Monnier
0 siblings, 0 replies; 10+ messages in thread
From: Stefan Monnier @ 2003-09-09 20:19 UTC (permalink / raw)
>>>>> Is this a bug that I should report?
>>>> No, you just want to turn on transient-mark-mode.
>>> I don't think I do.
>> Why not ?
> Because I find it annoying -- more so than the fact that keyboard input
> unhighlights a mouse-selected region. But a follow-mouse.el user
I see. In Emacs-CVS there is a notion of temporarily turning on
transient-mark-mode, so you could have the mouse-highlight set
transient-mark-mode temporarily ON.
As for "is it a bug", the highlighting that you see is only meant
to be active while you drag the mouse, so it's not a bug (although
I agree that it's not my favorite behavior, which is why I use
transient-mark-mode).
Stefan
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2003-09-09 20:19 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-09-04 15:50 how and why does keyboard input unhighlight the mouse-selected region? Kevin Rodgers
2003-09-05 1:40 ` Sandip Chitale
2003-09-05 18:43 ` Kevin Rodgers
2003-09-05 21:06 ` Sandip Chitale
2003-09-08 16:13 ` Kevin Rodgers
2003-09-08 16:16 ` Stefan Monnier
2003-09-08 20:49 ` Kevin Rodgers
2003-09-08 21:35 ` Stefan Monnier
2003-09-09 16:58 ` Kevin Rodgers
2003-09-09 20:19 ` Stefan Monnier
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.