[Top][All Lists]

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

bug#23288: 25.0.92; Clicking on links inserts primary X selection

From: Philipp Stephani
Subject: bug#23288: 25.0.92; Clicking on links inserts primary X selection
Date: Tue, 10 May 2016 21:25:47 +0000

Philipp Stephani <address@hidden> schrieb am Mi., 20. Apr. 2016 um 18:53 Uhr:
Nils Berg <address@hidden> schrieb am Mo., 18. Apr. 2016 um 10:50 Uhr:
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.

I've attached a new patch that should hopefully correct the behavior. 

Attachment: 0001-Fix-handling-of-mouse-on-link-p.patch
Description: Binary data

reply via email to

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