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

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

bug#34014: 25.2; binding down mouse event with modifier to mouse-drag-re


From: Adolf Mathias
Subject: bug#34014: 25.2; binding down mouse event with modifier to mouse-drag-region does not work
Date: Sun, 16 Aug 2020 18:20:07 +0200

No, it doesn't. With emacs -Q, mouse-1 then mouse-3 does the same as
simply dragging out a region. Clicking mouse-3 at the same spot, the
region gets killed, otherwise readjusted.
With (setq mouse-drag-copy-region t), the region also gets copied to
the kill ring, otherwise it just disappears.

Assume the text cursor is at position A. I want the region from B to C
copied to the text cursor position, and then continue editing right
behind the copied text.

1. Workflow with mouse-stay-and-copy bound to S-mouse-1:
press S-mouse-1 at B, release mouse-1 at C.

2. Workflow with mouse-copy-then-kill and (setq mouse-drag-copy-region t):
click mouse-1 at B, click mouse-3 at C, click mouse-1 at A, hit Ctrl-Y.

3. Workflow with standard dragged region:
drag out region from B to C. Hit Ctrl-W. Click mouse-1 at A. Hit Ctrl-Y.

Workflow 1 saves me one or two mouse clicks and a keystroke and the
navigation back to A. It is that navigation back to A that bothers me
most - the dexterity issue, you know.


On Sun, Aug 16, 2020 at 4:34 PM Stefan Kangas <stefan@marxist.se> wrote:
>
> Adolf Mathias <adolf.mathias@gmail.com> writes:
>
> > The function allows a workflow that I know from the SunOS Textedit
> > from the late 1980s. Your cursor is somewhere in the text, you drag
> > out a region in the same window/buffer or another one, and the text
> > that you selected gets copied to your cursor at mouse button release,
> > without having to reposition your cursor.
>
> Does the following cover your use case?
>
>   (setq mouse-drag-copy-region t)
>
> Alternatively:
>
>    M-x customize-option RET mouse-drag-copy-region RET
>
> Best regards,
> Stefan Kangas





reply via email to

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