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

Previous Next

Package: emacs;

Reported by: sds <at> gnu.org

Date: Mon, 23 Oct 2017 14:46:02 UTC

Severity: normal

Tags: confirmed

Found in version 27.0.50

Full log


Message #8 received at 28955 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Sam Steingold <sds <at> gnu.org>
Cc: 28955 <at> debbugs.gnu.org
Subject: Re: bug#28955: 27.0.50; mouse event translation loses parameters
Date: Sun, 14 Jul 2019 23:52:11 +0200
Sam Steingold <sds <at> gnu.org> 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




This bug report was last modified 5 years and 339 days ago.

Previous Next


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