unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: ahprae@protonmail.com, 70596-done@debbugs.gnu.org
Subject: bug#70596: 30.0.50; key-translate returns error for key sequences with punctuation marks
Date: Thu, 02 May 2024 12:21:20 +0300	[thread overview]
Message-ID: <868r0smuwf.fsf@gnu.org> (raw)
In-Reply-To: <jwvv842jjf2.fsf-monnier+emacs@gnu.org> (bug-gnu-emacs@gnu.org)

> Cc: 70596@debbugs.gnu.org
> Date: Sat, 27 Apr 2024 22:51:33 -0400
> From:  Stefan Monnier via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> 
> > (key-translate "C-." "C-a")
> 
> `key-translate` works by modifying `keyboard-translate-table` which is
> a table remapping *characters* and not *keys*.
> 
> IOW, `key-translate` is a misnomer.
> 
> > Ah, I see.  Then I guess you can close this report.  So is there no way
> > to translate `C-.` into `C-g`?
> 
> There are different ways to "translate" keys, and they all work slightly
> differently.  If you expect to be able to hit `C-.` (instead of `C-g`)
> to interrupt a running command, then that's more delicate to do
> (because such interruptions use a mechanism that doesn't go through
> keymaps like normal commands do), but otherwise something like
> 
>     (define-key input-decode-map (kbd "C-.") (kbd "C-g"))
> 
> might do the trick.

Thanks.  The ELisp manual already hinted on this; I've now added some
more explicit motivation, and I'm therefore closing this bug.





      reply	other threads:[~2024-05-02  9:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-26 17:29 bug#70596: 30.0.50; key-translate returns error for key sequences with punctuation marks Alexander Prähauser via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-26 18:28 ` Eli Zaretskii
2024-04-27  9:24   ` Alexander Prähauser via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-27 10:12     ` Eli Zaretskii
2024-04-27 10:47       ` Alexander Prähauser via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-04-27 11:46         ` Eli Zaretskii
2024-04-28  2:51 ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-05-02  9:21   ` Eli Zaretskii [this message]

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=868r0smuwf.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=70596-done@debbugs.gnu.org \
    --cc=ahprae@protonmail.com \
    --cc=monnier@iro.umontreal.ca \
    /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).