* activate region with S-mouse-1
@ 2014-03-28 17:41 Dominic Jänichen
2014-03-28 20:19 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Dominic Jänichen @ 2014-03-28 17:41 UTC (permalink / raw)
To: emacs-devel
I am using shift-select-mode and want to activate a region using S-
mouse-1. I have <mouse-1> and <S-mouse-1> bound to "mouse-set-point". I
either change "mouse-set-point" to contain (interactive "^e") or use cua-
mode and (put 'mouse-set-point 'CUA 'move).
I find that I can then extend existing regions with <S-mouse-1>, but not
activate one (ie. click on some spot to activate the region between that
spot and the current mark).
This issue exists since rev 107888 and is documented there: "Don't
activate the region on shift if the binding is already shifted." That's
fine for <left> as <S-left> translates to <left>, but <S-mouse-1> does
not translate to <mouse-1>. The only option is to bind <S-mouse-1>, but
this does not activate the region as it is already shifted.
What is a proper fix, here? Modifying read_key_sequence to set "this-
command-keys-shift-translated" to "t" if the command is bound to shifted
mouse-events? Or using a specific handler for <S-mouse-1>?
Dominic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: activate region with S-mouse-1
2014-03-28 17:41 activate region with S-mouse-1 Dominic Jänichen
@ 2014-03-28 20:19 ` Stefan Monnier
2014-03-28 20:24 ` Dominic Jänichen
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-03-28 20:19 UTC (permalink / raw)
To: Dominic Jänichen; +Cc: emacs-devel
> This issue exists since rev 107888 and is documented there: "Don't
> activate the region on shift if the binding is already shifted." That's
> fine for <left> as <S-left> translates to <left>, but <S-mouse-1> does
> not translate to <mouse-1>.
Yes, S-mouse-1 does translate to mouse-1, tho only if S-mouse-1 is
not bound. So instead of binding S-mouse-1 to mouse-set-point, you want
to unbind S-mouse-1: (global-set-key [S-mouse-1] nil)
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: activate region with S-mouse-1
2014-03-28 20:19 ` Stefan Monnier
@ 2014-03-28 20:24 ` Dominic Jänichen
2014-03-28 22:38 ` Stefan Monnier
0 siblings, 1 reply; 5+ messages in thread
From: Dominic Jänichen @ 2014-03-28 20:24 UTC (permalink / raw)
To: emacs-devel
On Fri, 28 Mar 2014 16:19:19 -0400, Stefan Monnier wrote:
> S-mouse-1 does translate to mouse-1, tho only if S-mouse-1 is not
> bound. So instead of binding S-mouse-1 to mouse-set-point, you want to
> unbind S-mouse-1: (global-set-key [S-mouse-1] nil)
Doing that results in S-Mouse-1 being non-functional. ("<S-mouse-1> is
undefined" in minibuffer.)
Dominic
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: activate region with S-mouse-1
2014-03-28 20:24 ` Dominic Jänichen
@ 2014-03-28 22:38 ` Stefan Monnier
2014-03-29 15:27 ` Dominic Jänichen
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Monnier @ 2014-03-28 22:38 UTC (permalink / raw)
To: Dominic Jänichen; +Cc: emacs-devel
>> S-mouse-1 does translate to mouse-1, tho only if S-mouse-1 is not
>> bound. So instead of binding S-mouse-1 to mouse-set-point, you want to
>> unbind S-mouse-1: (global-set-key [S-mouse-1] nil)
> Doing that results in S-Mouse-1 being non-functional. ("<S-mouse-1> is
> undefined" in minibuffer.)
Hmm... Could you make a bug report for it?
Stefan
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: activate region with S-mouse-1
2014-03-28 22:38 ` Stefan Monnier
@ 2014-03-29 15:27 ` Dominic Jänichen
0 siblings, 0 replies; 5+ messages in thread
From: Dominic Jänichen @ 2014-03-29 15:27 UTC (permalink / raw)
To: emacs-devel
On Fri, 28 Mar 2014 18:38:47 -0400, Stefan Monnier wrote:
> Hmm... Could you make a bug report for it?
Sure. #17140.
There is also a stale one (#11575) that should be closed instead.
Dominic
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-03-29 15:27 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-28 17:41 activate region with S-mouse-1 Dominic Jänichen
2014-03-28 20:19 ` Stefan Monnier
2014-03-28 20:24 ` Dominic Jänichen
2014-03-28 22:38 ` Stefan Monnier
2014-03-29 15:27 ` Dominic Jänichen
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.