From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Philipp Stephani Newsgroups: gmane.emacs.bugs Subject: bug#23288: 25.0.92; Clicking on links inserts primary X selection Date: Wed, 20 Apr 2016 16:53:38 +0000 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a113fb2ecfbe7980530ed6ffe X-Trace: ger.gmane.org 1461171264 31819 80.91.229.3 (20 Apr 2016 16:54:24 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 20 Apr 2016 16:54:24 +0000 (UTC) Cc: 23288@debbugs.gnu.org To: Nils Berg Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 20 18:54:12 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1asvOF-0000m9-Ho for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Apr 2016 18:54:11 +0200 Original-Received: from localhost ([::1]:52686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asvOE-0007Az-Q8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 20 Apr 2016 12:54:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50216) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asvO9-00075k-A2 for bug-gnu-emacs@gnu.org; Wed, 20 Apr 2016 12:54:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1asvO6-0000if-0i for bug-gnu-emacs@gnu.org; Wed, 20 Apr 2016 12:54:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:57482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1asvO5-0000ib-Si for bug-gnu-emacs@gnu.org; Wed, 20 Apr 2016 12:54:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1asvO5-0000q0-Ke for bug-gnu-emacs@gnu.org; Wed, 20 Apr 2016 12:54:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Philipp Stephani Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 20 Apr 2016 16:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23288 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: confirmed Original-Received: via spool by 23288-submit@debbugs.gnu.org id=B23288.14611712353208 (code B ref 23288); Wed, 20 Apr 2016 16:54:01 +0000 Original-Received: (at 23288) by debbugs.gnu.org; 20 Apr 2016 16:53:55 +0000 Original-Received: from localhost ([127.0.0.1]:41586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1asvNz-0000pg-CF for submit@debbugs.gnu.org; Wed, 20 Apr 2016 12:53:55 -0400 Original-Received: from mail-lf0-f48.google.com ([209.85.215.48]:33332) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1asvNx-0000pU-OI for 23288@debbugs.gnu.org; Wed, 20 Apr 2016 12:53:54 -0400 Original-Received: by mail-lf0-f48.google.com with SMTP id e190so44832720lfe.0 for <23288@debbugs.gnu.org>; Wed, 20 Apr 2016 09:53:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sIynmMm5gyqMsMS8RNFLwE5cmfqd0HYbdUhn2mjGJR8=; b=gCHljxWEh3IQjx9URjAF0B3JbNnGdIbKDaMDMbA3LMe+BVxF/Pc9Y1VGU8pe2I64Cu qmI1mlHJ958/RnmEj6Ou82yrXVPml6LJVHwf3PYdo7pZHN0/Jee9sMYW0LQCMXWfULPN GkE4Yfq+X5QntWRvvw6JTcbD++/T3ArCTe8pSZqcY5N8Sads9tjdmJ1ydrCHIPZ9/88+ p6pmK1RWzORsMVAz2itMk7mlqffvudG1gCVTu2mv75NMPfwcS+vc5/4aBdz2GXqW04i8 nkwF6p+YXYDL6m+zhV4fk5qBK7tV9OL2dFzYUe64gETDONOw1TNWL7LXXiA1B9LQa6V/ o7ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sIynmMm5gyqMsMS8RNFLwE5cmfqd0HYbdUhn2mjGJR8=; b=k3uax7fWydPTr/q2XKE17LKH/VSSj9/JsVB7Kb657w0VWIpcM5s3+jKMybynE7m4eC gfJt7zCSkHbaVzZ4nQp9/gau9S+JDG8sgDat0j5MuxzC5oCqeW1xzNw/5d/lElGJJgYY CW6UmR7xULZ2jlqGY3ZwMOKhljWHRFJ2WnYz+waXKaw0Wt4ZkMJ1Qt+xw75kjcvfonkS 9UxFLd6e9zajm86XscRiO1ofhUOUWHlNv/oUNleR/FLecavCtq3o8ccpMZJQoRZQjBLA R3BSvx2WO6rgyybz/Qlft9WjSiry6Z4+Rw4txBQhzE1Drl7nMXHM12VmGLOkTYyFvzGA 8+8Q== X-Gm-Message-State: AOPr4FVyM5g+SOy20Y5J/M2yr6XPeGpvJFAq3LP7az/CA9nABanwhzV2k1ctunTrvjsjIXO4/FR5m/VNvsBRrQ== X-Received: by 10.25.18.102 with SMTP id h99mr2170264lfi.127.1461171227713; Wed, 20 Apr 2016 09:53:47 -0700 (PDT) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:116635 Archived-At: --001a113fb2ecfbe7980530ed6ffe Content-Type: text/plain; charset=UTF-8 Nils Berg 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. > Agreed. https://debbugs.gnu.org/cgi/bugreport.cgi?bug=17887 might also be related. --001a113fb2ecfbe7980530ed6ffe Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


Nils B= erg <nilsb@google.com> schrie= b am Mo., 18. Apr. 2016 um 10:50=C2=A0Uhr:
I applied the patch, and the paste-on-click behavi= or is gone.

However, if you try your original example ag= ain, 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 transl= ate the original mouse-1 click into. In emacs24, that translation was done = in mouse-drag-track:
(let (on-link (and mouse-1-click-follow= s-link
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0;; Use start-point before the intangibility
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0;; treatment, in case we click on a link inside
=C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0;; intangible text.
= =C2=A0 (mouse-on-link-p start-posn)))
=C2=A0 (if (or (vec= torp on-link) (stringp on-link))
=C2=A0(setq event (aref on-link 0))
(select-window original-window)
<= span style=3D"white-space:pre-wrap"> (setcar event 'mouse-2)
;; If this mouse clic= k has never been done by the
;; user, it doesn't have the necessary property to be
;; interpreted correctly.<= /div>
(put 'mouse-2 &= #39;event-kind 'mouse-click)))

(abridged= from mouse.el:791/901 in Emacs 24.3.1)

I think mo= use--down-1-maybe-follows-link should do something similar.
=

Agreed.=C2=A0https://debbugs.gnu.org/cgi/bugreport.= cgi?bug=3D17887=C2=A0might also be related.

--001a113fb2ecfbe7980530ed6ffe--