Subject: Re: bug#4709: 23.1; keyboard-translate not working with emacs daemon

From: Stefan Monnier <[email-masked]>
Date: Wed, 14 Oct 2009 23:34:15 -0400

> | AFAIK, you cannot set it globally.
> Then, could we make it a request for a new feature?

Sure.

> We could even say that the keyboard-translate functionality
> is partially broken because it sometimes works and sometimes
> doesn't (Please recall my example).

To tell you the truth, it's the first time I hear of this feature being
actually used.  So that should give you the kind of priority this
feature request will "enjoy".  And of course it gets worse because of
the discussion below.

> | Still, I wonder: why would you want to set such a mapping
> | everywhere?
> I'm not sure if I understand your question. . . .  If you want
> a keyboard translation, you'd want it everywhere consistently,
> wouldn't you?
> In this particular case, I want C-h to delete the character
> before the cursor anywhere and everywhere (when deleting
> characters makes sense, that is.

But do you really also want C-x C-h to invoke the command bound
to C-x C-? 

> You don't want to delete characters on a webpage displayed by
> a webbrowser, for example).  That's natural for a person like me who
> instinctively types C-h to delete.

> I used to use
>  (global-set-key "\C-h" 'delete-backward-char)

That seems closer to what you want, yes.  But admittedly, C-h is
hardwired at many places, so you'd have to "fix" them one by one as you
bump into them.

> So, I think keyboard-translate is the cleanest,
> once-and-for-all solution, if it works globally.

Have you tried key-translation-map (which is global)?
I have never understand the existence of both key-translation-map and
keyboard-translate-table.

        Stefan