[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: select text without moving the point in graphical interface
From: |
Michael Heerdegen |
Subject: |
Re: select text without moving the point in graphical interface |
Date: |
Mon, 09 Dec 2013 20:26:18 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Ernest Adrogué <nfdisco@gmail.com> writes:
> > (info "(emacs) Secondary Selection")
>
> Yeah, this is exactly it. Now I guess the question is can I have the
> secondary selection text selection style but using the primary selection
> instead?
It's not intended to do so, I'm afraid; using the secondary selection is
hardcoded for that stuff.
Mmh, maybe we should try to modify the default mouse-1 behavior
instead. Can you try the following:
--8<---------------cut here---------------start------------->8---
(defun mouse-drag-region-restore-point-advice (f e)
(let ((opoint (with-selected-window
(posn-window (event-start e))
(point))))
(prog1 (funcall f e)
(run-with-idle-timer
0 nil
(lambda (win pos)
(with-selected-window win
(deactivate-mark)
(goto-char pos)))
(selected-window) opoint))))
(advice-add 'mouse-drag-region
:around #'mouse-drag-region-restore-point-advice)
--8<---------------cut here---------------end--------------->8---
Does that behave as you want it to?
Regards,
Michael.
- RE: select text without moving the point in graphical interface, (continued)
- RE: select text without moving the point in graphical interface, Drew Adams, 2013/12/08
- Re: select text without moving the point in graphical interface, Bob Proulx, 2013/12/08
- Re: select text without moving the point in graphical interface, Eli Zaretskii, 2013/12/08
- RE: select text without moving the point in graphical interface, Drew Adams, 2013/12/09
- Re: select text without moving the point in graphical interface, Eli Zaretskii, 2013/12/09
- RE: select text without moving the point in graphical interface, Drew Adams, 2013/12/09
- Re: select text without moving the point in graphical interface, Eli Zaretskii, 2013/12/09
- RE: select text without moving the point in graphical interface, Drew Adams, 2013/12/09
Re: select text without moving the point in graphical interface, Michael Heerdegen, 2013/12/08