GNU bug report logs - #28955
27.0.50; mouse event translation loses parameters

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: sds@HIDDEN; Keywords: confirmed; dated Mon, 23 Oct 2017 14:46:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.

Message received at 28955 <at> debbugs.gnu.org:


Received: (at 28955) by debbugs.gnu.org; 15 Jul 2019 17:04:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 15 13:04:37 2019
Received: from localhost ([127.0.0.1]:48927 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hn4Oz-0002pn-9n
	for submit <at> debbugs.gnu.org; Mon, 15 Jul 2019 13:04:37 -0400
Received: from quimby.gnus.org ([80.91.231.51]:45594)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1hn4Ox-0002pf-Of
 for 28955 <at> debbugs.gnu.org; Mon, 15 Jul 2019 13:04:36 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=sandy)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1hn4Ou-0001RN-H2; Mon, 15 Jul 2019 19:04:34 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Sam Steingold <sds@HIDDEN>
Subject: Re: bug#28955: 27.0.50; mouse event translation loses parameters
References: <lzk1zlappt.fsf@HIDDEN> <87zhlguvw4.fsf@HIDDEN>
 <m1ims39qut.fsf@HIDDEN>
Date: Mon, 15 Jul 2019 19:04:32 +0200
In-Reply-To: <m1ims39qut.fsf@HIDDEN> (Sam Steingold's message of "Mon, 15 Jul
 2019 12:58:50 -0400")
Message-ID: <87v9w3b55r.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Sam Steingold <sds@HIDDEN> writes: > Either of the
 following:
 > > ``` > (define-key key-translation-map (kbd "<s-mouse-1>") (kbd
 "<mouse-2>")) > ``` [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 28955
Cc: 28955 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sam Steingold <sds@HIDDEN> writes:

> Either of the following:
>
> ```
> (define-key key-translation-map (kbd "<s-mouse-1>") (kbd "<mouse-2>"))
> ```

[...]

> 2. Actually clicking s-mouse-1:
> ```
> Debugger entered--Lisp error: (error "mouse-yank-primary must be bound to an event with ...")
>   call-interactively(mouse-yank-primary nil nil)
>   command-execute(mouse-yank-primary)

I don't have a Super key here, but I was able to reproduce the bug with
Hyper:

(define-key key-translation-map (kbd "<H-mouse-1>") (kbd "<mouse-2>"))

H-click-1:

Debugger entered--Lisp error: (error "mouse-yank-primary must be bound to an event with ...")
  call-interactively(mouse-yank-primary nil nil)
  command-execute(mouse-yank-primary)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#28955; Package emacs. Full text available.
Added tag(s) confirmed. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 28955 <at> debbugs.gnu.org:


Received: (at 28955) by debbugs.gnu.org; 15 Jul 2019 16:59:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Jul 15 12:59:15 2019
Received: from localhost ([127.0.0.1]:48910 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hn4Jf-0002fI-1K
	for submit <at> debbugs.gnu.org; Mon, 15 Jul 2019 12:59:15 -0400
Received: from mail-qk1-f196.google.com ([209.85.222.196]:42046)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam.steingold@HIDDEN>) id 1hn4JY-0002ek-TE
 for 28955 <at> debbugs.gnu.org; Mon, 15 Jul 2019 12:59:05 -0400
Received: by mail-qk1-f196.google.com with SMTP id 201so12162110qkm.9
 for <28955 <at> debbugs.gnu.org>; Mon, 15 Jul 2019 09:59:00 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:cc:subject:in-reply-to:references:user-agent
 :return-receipt-to:reply-to:date:message-id:mime-version;
 bh=SRMZi5WrMX9wpoxIRSUxXg6sa6qtFRtPzOT9AWs+/9g=;
 b=V3zSzQxFk2Z9olDy7e/oQFab7itaLAsMLWDwsqzVeHx6HAKLKjj7rVxI6AWIrutBo9
 13eGCyP1UoE7kpssVBHfSf9K4F/vjkJzgs8IQrWgH9C/WrGysB9OQwIehHTBOoXzh+fS
 HCm79UxZcFVi7iQjMCccerfYMZU6k9BySWszg4X7Ak0gkGfdWiRXr6j4958xyEdm1AVk
 Zr/Jj2HEtNOkUaSW8IYjS0/qdJKxVSGXSvLQk4Eeb0zmVeO488l2AoGD6eLJoWTCKoGL
 CFKWWYAFUkKoHzhssH1OrCJq2SMB17QPuJ8gm/gTLq4awcYLJIRgU+ITcqMX0eGRGZT1
 g0Ng==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references
 :user-agent:return-receipt-to:reply-to:date:message-id:mime-version;
 bh=SRMZi5WrMX9wpoxIRSUxXg6sa6qtFRtPzOT9AWs+/9g=;
 b=o5tlfb1HcRTI/bYLStvawGDoCppX2D9nYIqMH1Jb0GbKWQdseljokqEfeHjf0iELak
 SdGiDMpHlsMRpXUA+7ktnfuy26OxQPQ0yojQjIQpO51MmcL0kwDeSqMVYoSAY8rBf3Hf
 iqvSYveFqZ0ZmmZow1g+4udVgGLu/5BhihFW1mxuC1qiMPmzuwv1JcufYtRZ4oMmRd9B
 yawfc2d7nCX+Fxb9EA3SWaIn0zcSXSHnmyQExP0kUJAdfgB5IeQPyxN/Itk5+mtlA8Gd
 ZH5ckCbxWiYpGj22QgEYhQzKa0aVnRwAbMRkfcSBM/PkSiSFEvfq/Lm/ABy7D5oXZW7e
 IlBw==
X-Gm-Message-State: APjAAAUpGulilqDwI7BTuLk04w3doBdqTgJODhi6zAYcp1FteLGgrvs8
 SO0hy49raQLmyy7CGBcaTA==
X-Google-Smtp-Source: APXvYqzMXstQc9i5nk+uGQscMmLtaKVEieD1qyC6r5ARPUpzhHtAq8+PDTN9BBFhfnVZ6+bnR/nA8A==
X-Received: by 2002:a05:620a:1270:: with SMTP id
 b16mr17193188qkl.333.1563209934661; 
 Mon, 15 Jul 2019 09:58:54 -0700 (PDT)
Received: from BZ-C02XR5CGJG5L ([207.251.91.66])
 by smtp.gmail.com with ESMTPSA id f132sm7396251qke.88.2019.07.15.09.58.52
 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256);
 Mon, 15 Jul 2019 09:58:53 -0700 (PDT)
From: Sam Steingold <sds@HIDDEN>
To: Lars Ingebrigtsen <larsi@HIDDEN>
Subject: Re: bug#28955: 27.0.50; mouse event translation loses parameters
In-Reply-To: <87zhlguvw4.fsf@HIDDEN> (Lars Ingebrigtsen's message of
 "Sun, 14 Jul 2019 23:52:11 +0200")
References: <lzk1zlappt.fsf@HIDDEN> <87zhlguvw4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin)
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
Date: Mon, 15 Jul 2019 12:58:50 -0400
Message-ID: <m1ims39qut.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: 0.3 (/)
X-Debbugs-Envelope-To: 28955
Cc: 28955 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: sds@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.7 (/)

> * Lars Ingebrigtsen <ynefv@HIDDEN> [2019-07-14 23:52:11 +0200]:
>
> Sam Steingold <sds@HIDDEN> writes:
>
>> (define-key key-translation-map (kbd "<s-mouse-1>") (kbd "<mouse-2>"))
>>
>> Alas, when I actually do command-mouse-1, I get an error:
>>
>> Debugger entered--Lisp error: (error "mouse-yank-primary must be bound
>> to an event with parameters")
>>   call-interactively(mouse-yank-primary nil nil)
>>   command-execute(mouse-yank-primary)
>>
>>
>> Charles writes:
>>
>> When you add the key translation and type s-mouse-1, the mouse click
>> event ends up losing its location information.
>>
>> For example, the following:
>>
>> (s-mouse-1 (#<window 3 on *scratch*> 227 (116 . 92) 143676325 nil 227
>> (16 . 5) nil (116 . 12) (7 . 16)))
>>
>> gets turned into just:
>>
>> mouse-2
>>
>> which leads to the error about the missing parameters.
>
> I'm not quite sure what the test case is here, but if I do this:
>
> (progn
>   (define-key key-translation-map (kbd "<s-mouse-1>") (kbd "<mouse-2>"))
>   (insert (format "%S" (read-event))))
> =>
> (S-down-mouse-1 (#<window 4 on *Minibuf-0*> 1 (322 . 8) 1947797915 nil 1
> (21 . 0) nil (322 . 8) (15 . 29)))
>
> then things look pretty normal, I think?  So (unless this has fixed in
> the meantime), how does one reproduce the error?

Either of the following:

```
(define-key key-translation-map (kbd "<s-mouse-1>") (kbd "<mouse-2>"))
```

or

```
(define-key function-key-map (kbd "<s-mouse-1>") (kbd "<mouse-2>"))
```

exhibit the same behavior:

1. `C-u C-h c s-mouse-1` ==>
```
   <mouse-2> (translated from <s-down-mouse-1> <s-mouse-1>) at that spot
   runs the command mouse-yank-primary
```

2. Actually clicking s-mouse-1:
```
Debugger entered--Lisp error: (error "mouse-yank-primary must be bound to an event with ...")
  call-interactively(mouse-yank-primary nil nil)
  command-execute(mouse-yank-primary)
```


-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1671
http://childpsy.net http://calmchildstories.com http://steingoldpsychology.com
http://mideasttruth.com http://www.dhimmitude.org http://camera.org
Those who can't write, write manuals.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#28955; Package emacs. Full text available.

Message received at 28955 <at> debbugs.gnu.org:


Received: (at 28955) by debbugs.gnu.org; 14 Jul 2019 21:52:18 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Jul 14 17:52:18 2019
Received: from localhost ([127.0.0.1]:46129 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1hmmPp-0002yC-L3
	for submit <at> debbugs.gnu.org; Sun, 14 Jul 2019 17:52:17 -0400
Received: from quimby.gnus.org ([80.91.231.51]:58988)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <larsi@HIDDEN>) id 1hmmPn-0002y4-IH
 for 28955 <at> debbugs.gnu.org; Sun, 14 Jul 2019 17:52:16 -0400
Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=marnie)
 by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.89) (envelope-from <larsi@HIDDEN>)
 id 1hmmPj-0006S2-Es; Sun, 14 Jul 2019 23:52:13 +0200
From: Lars Ingebrigtsen <larsi@HIDDEN>
To: Sam Steingold <sds@HIDDEN>
Subject: Re: bug#28955: 27.0.50; mouse event translation loses parameters
References: <lzk1zlappt.fsf@HIDDEN>
Date: Sun, 14 Jul 2019 23:52:11 +0200
In-Reply-To: <lzk1zlappt.fsf@HIDDEN> (Sam Steingold's message of "Mon, 23 Oct
 2017 10:44:30 -0400")
Message-ID: <87zhlguvw4.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Report: Spam detection software, running on the system "quimby.gnus.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 @@CONTACT_ADDRESS@@ for details.
 Content preview: Sam Steingold <sds@HIDDEN> writes: > (define-key
 key-translation-map
 (kbd "<s-mouse-1>") (kbd "<mouse-2>")) > > Alas,
 when I actually do command-mouse-1, 
 I get an error: > > Debugger entered--Lisp error: (error "mouse-yank-primary
 must [...] 
 Content analysis details:   (-2.9 points, 5.0 required)
 pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
 [score: 0.0000]
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 28955
Cc: 28955 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Sam Steingold <sds@HIDDEN> writes:

> (define-key key-translation-map (kbd "<s-mouse-1>") (kbd "<mouse-2>"))
>
> Alas, when I actually do command-mouse-1, I get an error:
>
> Debugger entered--Lisp error: (error "mouse-yank-primary must be bound to an event with parameters")
>   call-interactively(mouse-yank-primary nil nil)
>   command-execute(mouse-yank-primary)
>
>
> Charles writes:
>
> When you add the key translation and type s-mouse-1, the mouse click
> event ends up losing its location information.
>
> For example, the following:
>
> (s-mouse-1 (#<window 3 on *scratch*> 227 (116 . 92) 143676325 nil 227
> (16 . 5) nil (116 . 12) (7 . 16)))
>
> gets turned into just:
>
> mouse-2
>
> which leads to the error about the missing parameters.

I'm not quite sure what the test case is here, but if I do this:

(progn
  (define-key key-translation-map (kbd "<s-mouse-1>") (kbd "<mouse-2>"))
  (insert (format "%S" (read-event))))
=>
(S-down-mouse-1 (#<window 4 on  *Minibuf-0*> 1 (322 . 8) 1947797915 nil 1 (21 . 0) nil (322 . 8) (15 . 29)))

then things look pretty normal, I think?  So (unless this has fixed in
the meantime), how does one reproduce the error?

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#28955; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 23 Oct 2017 14:45:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Oct 23 10:45:12 2017
Received: from localhost ([127.0.0.1]:57850 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1e6dyR-0003sG-KX
	for submit <at> debbugs.gnu.org; Mon, 23 Oct 2017 10:45:12 -0400
Received: from eggs.gnu.org ([208.118.235.92]:55126)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sam.steingold@HIDDEN>) id 1e6dyJ-0003rM-PW
 for submit <at> debbugs.gnu.org; Mon, 23 Oct 2017 10:45:01 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sam.steingold@HIDDEN>) id 1e6dyB-0003dK-CW
 for submit <at> debbugs.gnu.org; Mon, 23 Oct 2017 10:44:50 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM,
 T_DKIM_INVALID autolearn=disabled version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:45571)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <sam.steingold@HIDDEN>)
 id 1e6dyB-0003dB-91
 for submit <at> debbugs.gnu.org; Mon, 23 Oct 2017 10:44:47 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:46084)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <sam.steingold@HIDDEN>) id 1e6dy4-0004Ic-Sf
 for bug-gnu-emacs@HIDDEN; Mon, 23 Oct 2017 10:44:47 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <sam.steingold@HIDDEN>) id 1e6dy3-0003aP-NT
 for bug-gnu-emacs@HIDDEN; Mon, 23 Oct 2017 10:44:40 -0400
Received: from mail-io0-x230.google.com ([2607:f8b0:4001:c06::230]:57261)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16)
 (Exim 4.71) (envelope-from <sam.steingold@HIDDEN>)
 id 1e6dy0-0003WW-1S; Mon, 23 Oct 2017 10:44:36 -0400
Received: by mail-io0-x230.google.com with SMTP id m81so20332414ioi.13;
 Mon, 23 Oct 2017 07:44:35 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;
 h=sender:from:to:subject:user-agent:return-receipt-to:reply-to:date
 :message-id:mime-version;
 bh=0m2Kha6m3cSzqknSqHcN4+2shWlRL3iY06JACQ6KXFU=;
 b=NXbp8a1HJLXiKAJAG75AdRe8UD/u3Rhmm85qJFXTF3Mh95CGmcCMkMVUKmItHGZsrr
 3eEZW7Ha9z1r9J5yzfwE4illnUKRTUksHwVvG6bfxRFEzYL6SY9C7+RqqN1epUdcAeW/
 9ZW6gTQ0L2ZYVuFyUOMvUZzDI+7Qxp9g4apL9EMUDpAvvE1mAGLb7h4AfWdKAU24X6ex
 +5yLwjIHvn7qdJO48rBMqI7r44ard1ZIisSK38HO9bREdXdqKEWezXrXXzv+qgtuzoCV
 E0yAdjTxGTcSFekigS6Lg4oAkZ7K855pdtPyxL1JZq4ZTLjcmDBoRTAzMOzioUWWuOQo
 e+GA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:sender:from:to:subject:user-agent
 :return-receipt-to:reply-to:date:message-id:mime-version;
 bh=0m2Kha6m3cSzqknSqHcN4+2shWlRL3iY06JACQ6KXFU=;
 b=Rl9NcXZfQAMf4Qrv8ubrUidsCe8hNg/OI4tn/rJJrnk6udA+WeAv4mn9EU20z6kViB
 fPyN7s+lKUglQfAukKGZlkkFecc+zAySgrVkSNG59YpTjH4ajApcIFxQi8fkS6ABuIn+
 c3w+4wLo5qmfnsZ8aJNdlVgcGtP8r+JzUV+YhduBhvpanA/TKKopRCxsJgI77Ncpi15P
 fXe0gmE9b2lnq+xM+WFASupguicztcnnaUvvWS9+3wEa2HgvT5aHdMJgzC+JY3KxQJ/X
 wG8M+FYVDaFRAH7XywxOHZd8fjgGYhTjie1cXIv13X7AQ4emmQ8RKA6WnRoNr+WDeQ8s
 /9MA==
X-Gm-Message-State: AMCzsaW/gsuywyVm4SSLtoJYSpMBGPX+DgW0DF5VEBInxhjcQCS+Ijm+
 hQ7uMmQ7gJwcv5DAv2IZWqGu9UE=
X-Google-Smtp-Source: ABhQp+Qi02ixzBRf+Tm7rmR+RRgdB6qh6BDhPyziDNh3hQEu0Jfahvry33J+lFqpLkenQ5Bkq1jcmg==
X-Received: by 10.107.184.138 with SMTP id i132mr18258823iof.155.1508769874515; 
 Mon, 23 Oct 2017 07:44:34 -0700 (PDT)
Received: from Clr-Sam.local ([38.101.106.18])
 by smtp.gmail.com with ESMTPSA id p136sm2468391itg.14.2017.10.23.07.44.31
 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);
 Mon, 23 Oct 2017 07:44:32 -0700 (PDT)
From: Sam Steingold <sds@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.50; mouse event translation loses parameters
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin)
X-Attribution: Sam
X-Disclaimer: You should not expect anyone to agree with me.
Date: Mon, 23 Oct 2017 10:44:30 -0400
Message-ID: <lzk1zlappt.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain
X-detected-operating-system: by eggs.gnu.org: Genre and OS details not
 recognized.
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -3.8 (---)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Reply-To: sds@HIDDEN
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: 1.2 (+)
X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org",
 has NOT identified this incoming email as spam.  The original
 message has been attached to this so you can view it or label
 similar future email.  If you have any questions, see
 the administrator of that system for details.
 
 Content preview:  In GNU Emacs 27.0.50 (build 3, x86_64-apple-darwin16.7.0,
   NS appkit-1504.83 Version 10.12.6 (Build 16G29)) of 2017-10-16 built on Clr-Sam.local
    Repository revision: eed3a3d9e95d2c5346a23c9d92ca4e5848330183 Windowing system
    distributor 'Apple', version 10.3.1504 Configured using: 'configure --with-mailutils
    --with-ns PKG_CONFIG_PATH=/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/imagemagick/lib/pkgconfig/
    --without-makeinfo' [...] 
 
 Content analysis details:   (1.2 points, 10.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
  1.0 SPF_SOFTFAIL           SPF: sender does not match SPF record (softfail)
  0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail
                             domains are different
  0.0 FREEMAIL_FROM          Sender email is commonly abused enduser mail provider
                             (sam.steingold[at]gmail.com)
  0.0 T_DKIM_INVALID         DKIM-Signature header exists but is not valid
  0.2 FREEMAIL_FORGED_FROMDOMAIN 2nd level domains in From and EnvelopeFrom
                              freemail headers are different

In GNU Emacs 27.0.50 (build 3, x86_64-apple-darwin16.7.0, NS appkit-1504.83 Version 10.12.6 (Build 16G29))
 of 2017-10-16 built on Clr-Sam.local
Repository revision: eed3a3d9e95d2c5346a23c9d92ca4e5848330183
Windowing system distributor 'Apple', version 10.3.1504
Configured using:
 'configure --with-mailutils --with-ns
 PKG_CONFIG_PATH=/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/imagemagick/lib/pkgconfig/
 --without-makeinfo'

Configured features:
JPEG NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS

Important settings:
  value of $LC_ALL: en_US.UTF-8
  value of $LANG: C
  locale-coding-system: utf-8-unix

Some platforms lack second mouse button (most laptops), and some lack
both 2nd and 3rd (mac).
The almighty internet (https://emacs.stackexchange.com/q/20946/795 &
https://superuser.com/q/364575/98857) suggests

(define-key key-translation-map (kbd "<s-mouse-1>") (kbd "<mouse-2>"))

Alas, when I actually do command-mouse-1, I get an error:

--8<---------------cut here---------------start------------->8---
Debugger entered--Lisp error: (error "mouse-yank-primary must be bound to an event with parameters")
  call-interactively(mouse-yank-primary nil nil)
  command-execute(mouse-yank-primary)
--8<---------------cut here---------------end--------------->8---

Charles writes:

When you add the key translation and type s-mouse-1, the mouse click
event ends up losing its location information.

For example, the following:

(s-mouse-1 (#<window 3 on *scratch*> 227 (116 . 92) 143676325 nil 227 (16 . 5) nil (116 . 12) (7 . 16)))

gets turned into just:

mouse-2

which leads to the error about the missing parameters.

It happens in this part of keyboard.c:

--8<---------------cut here---------------start------------->8---
      /* Does mock_input indicate that we are re-reading a key sequence?  */
      if (t < mock_input)
	{
	  key = keybuf[t];
	  add_command_key (key);
	  if (current_kboard->immediate_echo)
	    {
	      /* Set immediate_echo to false so as to force echo_now to
		 redisplay (it will set immediate_echo right back to true).  */
	      current_kboard->immediate_echo = false;
	      echo_now ();
	    }
	}
--8<---------------cut here---------------end--------------->8---

For further details please see
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00667.html
https://lists.gnu.org/archive/html/emacs-devel/2017-10/msg00678.html

-- 
Sam Steingold (http://sds.podval.org/) on darwin Ns 10.3.1504
http://steingoldpsychology.com http://www.childpsy.net http://camera.org
http://jij.org http://thereligionofpeace.com http://www.memritv.org
Daddy, why doesn't this magnet pick up this floppy disk?




Acknowledgement sent to sds@HIDDEN:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#28955; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Mon, 25 Nov 2019 12:00:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.