unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Sam Steingold <sds@gnu.org>
Cc: 28955@debbugs.gnu.org
Subject: bug#28955: 27.0.50; mouse event translation loses parameters
Date: Sun, 14 Jul 2019 23:52:11 +0200	[thread overview]
Message-ID: <87zhlguvw4.fsf@mouse.gnus.org> (raw)
In-Reply-To: <lzk1zlappt.fsf@gnu.org> (Sam Steingold's message of "Mon, 23 Oct 2017 10:44:30 -0400")

Sam Steingold <sds@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





  reply	other threads:[~2019-07-14 21:52 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-23 14:44 bug#28955: 27.0.50; mouse event translation loses parameters Sam Steingold
2019-07-14 21:52 ` Lars Ingebrigtsen [this message]
2019-07-15 16:58   ` Sam Steingold
2019-07-15 17:04     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87zhlguvw4.fsf@mouse.gnus.org \
    --to=larsi@gnus.org \
    --cc=28955@debbugs.gnu.org \
    --cc=sds@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).