From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Sam Steingold Newsgroups: gmane.emacs.bugs Subject: bug#28955: 27.0.50; mouse event translation loses parameters Date: Mon, 15 Jul 2019 12:58:50 -0400 Message-ID: References: <87zhlguvw4.fsf@mouse.gnus.org> Reply-To: sds@gnu.org Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="242651"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (darwin) Cc: 28955@debbugs.gnu.org To: Lars Ingebrigtsen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 15 19:00:15 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hn4Ki-0010wW-FA for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 19:00:12 +0200 Original-Received: from localhost ([::1]:40982 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn4Kh-00087c-Gi for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 13:00:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38940) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hn4KZ-00082D-Rj for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:00:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hn4KY-00084z-JR for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:00:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:40092) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hn4KY-00083t-Er for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:00:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hn4KY-0002hD-6t for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 13:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Sam Steingold Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jul 2019 17:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28955 X-GNU-PR-Package: emacs Original-Received: via spool by 28955-submit@debbugs.gnu.org id=B28955.156320995610262 (code B ref 28955); Mon, 15 Jul 2019 17:00:02 +0000 Original-Received: (at 28955) by debbugs.gnu.org; 15 Jul 2019 16:59:16 +0000 Original-Received: from localhost ([127.0.0.1]:48910 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn4Jf-0002fI-1K for submit@debbugs.gnu.org; Mon, 15 Jul 2019 12:59:15 -0400 Original-Received: from mail-qk1-f196.google.com ([209.85.222.196]:42046) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hn4JY-0002ek-TE for 28955@debbugs.gnu.org; Mon, 15 Jul 2019 12:59:05 -0400 Original-Received: by mail-qk1-f196.google.com with SMTP id 201so12162110qkm.9 for <28955@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) Original-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) In-Reply-To: <87zhlguvw4.fsf@mouse.gnus.org> (Lars Ingebrigtsen's message of "Sun, 14 Jul 2019 23:52:11 +0200") X-Attribution: Sam X-Disclaimer: You should not expect anyone to agree with me. 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: 209.51.188.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:163143 Archived-At: > * Lars Ingebrigtsen [2019-07-14 23:52:11 +0200]: > > Sam Steingold writes: > >> (define-key key-translation-map (kbd "") (kbd "")) >> >> 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 (# 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 "") (kbd "")) > (insert (format "%S" (read-event)))) > => > (S-down-mouse-1 (# 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 "") (kbd "")) ``` or ``` (define-key function-key-map (kbd "") (kbd "")) ``` exhibit the same behavior: 1. `C-u C-h c s-mouse-1` ==> ``` (translated from ) 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.