From: Nils Berg <nilsb@google.com>
To: Philipp Stephani <p.stephani2@gmail.com>
Cc: 23288@debbugs.gnu.org
Subject: bug#23288: 25.0.92; Clicking on links inserts primary X selection
Date: Mon, 18 Apr 2016 10:50:37 +0200 [thread overview]
Message-ID: <CAGpFBBsk4WFWnxNFiiargUGiLjfcbSuugkL8iTv2BPsLQ-+sKQ@mail.gmail.com> (raw)
In-Reply-To: <CAArVCkRAbt=F=-n-WdzZh5iQM3rXxWWCDhR3U3czgzLbugMfRQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1811 bytes --]
I applied the patch, and the paste-on-click behavior is gone.
However, if you try your original example again, you'll find that nothing
happens at all, when we're expecting an "a" to be inserted.
As the documentation of mouse-on-link-p says, a string or vector return
value indicates the event to translate the original mouse-1 click into. In
emacs24, that translation was done in mouse-drag-track:
(let (on-link (and mouse-1-click-follows-link
;; Use start-point before the intangibility
;; treatment, in case we click on a link inside
;; intangible text.
(mouse-on-link-p start-posn)))
(if (or (vectorp on-link) (stringp on-link))
(setq event (aref on-link 0))
(select-window original-window)
(setcar event 'mouse-2)
;; If this mouse click has never been done by the
;; user, it doesn't have the necessary property to be
;; interpreted correctly.
(put 'mouse-2 'event-kind 'mouse-click)))
(abridged from mouse.el:791/901 in Emacs 24.3.1)
I think mouse--down-1-maybe-follows-link should do something similar.
On Sat, Apr 16, 2016 at 3:36 PM, Philipp Stephani <p.stephani2@gmail.com>
wrote:
>
>
> Nils Berg <nilsb@google.com> schrieb am Do., 14. Apr. 2016 um 19:18 Uhr:
>
>> I've tracked down the bug to mouse--down-1-maybe-follows-link too, but
>> don't think read-event is the culprit here.
>>
>> Rather, mouse--down-1-maybe-follows-link discards the result of
>> mouse-on-link-p, which contains the event a click is supposed to be
>> translated into. Instead, it just replaces the mouse event with mouse-2 if
>> mouse-on-link-p returns non-nil.
>>
>
> I've attached a patch that should fix this. According to the documentation
> of mouse-on-link-p no such translation should happen if the return value is
> a string or vector.
>
[-- Attachment #2: Type: text/html, Size: 3283 bytes --]
next prev parent reply other threads:[~2016-04-18 8:50 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-14 12:31 bug#23288: 25.0.92; Clicking on links inserts primary X selection Philipp Stephani
2016-04-14 15:33 ` Glenn Morris
2016-04-14 17:14 ` Nils Berg
2016-04-16 13:36 ` Philipp Stephani
2016-04-18 8:50 ` Nils Berg [this message]
2016-04-20 16:53 ` Philipp Stephani
2016-05-10 21:25 ` Philipp Stephani
2016-05-11 8:14 ` Eli Zaretskii
2016-05-11 8:32 ` Nils Berg
2016-05-11 13:01 ` Philipp Stephani
2016-05-11 13:14 ` Nils Berg
2016-05-11 13:32 ` Philipp Stephani
2016-05-11 13:56 ` Eli Zaretskii
2016-05-11 18:18 ` John Wiegley
2016-05-11 18:40 ` Glenn Morris
2016-05-11 21:04 ` Eli Zaretskii
2016-05-12 5:42 ` John Wiegley
2016-05-12 19:26 ` Eli Zaretskii
2016-05-12 21:24 ` John Wiegley
2016-05-12 16:49 ` Glenn Morris
2016-05-12 17:21 ` Making better use of the "release blocking list" [was: bug#23288: 25.0.92; Clicking on links inserts primary X selection] John Wiegley
2016-05-12 21:43 ` Paul Eggert
2016-05-16 19:08 ` Glenn Morris
2016-05-18 6:09 ` John Wiegley
2016-05-21 19:06 ` Eli Zaretskii
2016-05-21 20:48 ` Mike Kupfer
2016-05-23 4:58 ` Bill Wohler
2016-05-30 23:21 ` Bill Wohler
2016-05-22 2:02 ` Paul Eggert
2016-05-22 4:52 ` John Wiegley
2016-05-22 16:38 ` Eli Zaretskii
2016-05-22 16:31 ` Eli Zaretskii
2016-05-22 21:09 ` Dmitry Gutov
2016-05-22 21:24 ` Dmitry Gutov
2016-05-23 2:32 ` Eli Zaretskii
2016-05-23 13:18 ` Dmitry Gutov
2016-05-23 16:15 ` Paul Eggert
2016-05-23 16:36 ` Dmitry Gutov
2016-05-23 17:39 ` Paul Eggert
2016-05-23 16:52 ` Eli Zaretskii
2016-05-13 9:02 ` Eli Zaretskii
2016-05-13 16:36 ` John Wiegley
2016-05-20 18:24 ` bug#23288: 25.0.92; Clicking on links inserts primary X selection Philipp Stephani
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAGpFBBsk4WFWnxNFiiargUGiLjfcbSuugkL8iTv2BPsLQ-+sKQ@mail.gmail.com \
--to=nilsb@google.com \
--cc=23288@debbugs.gnu.org \
--cc=p.stephani2@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.