help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: keyboard-translate working for Control but not for Alt


From: Xah Lee
Subject: Re: keyboard-translate working for Control but not for Alt
Date: Wed, 5 Aug 2009 17:40:46 -0700 (PDT)
User-agent: G2/1.0

additional info i just found out ....

this method
(global-set-key (kbd "C-t") ctl-x-map)

turns out to have other problems as well, when cua-mode is on.

with cua-mode on, and when you have a text selection, you need to
press C-x twice quickly to invoke the traditional C-x role. (at least
as one of the method, anyway) So, that means you press C-t twice
quickly.

One example i'll need to do this many times per day is “C-t r
t” (string-rectangle) and “C-t r k” for kill-rectangle, where you do
need a selection on first.

With
 (keyboard-translate ?\C-t ?\C-x)
i used in the past, i didn't encounter problem.

i started to use cua-mode since last year, not because i need it, but
more for testing compatibilty with my ergoemacs setup.

So, with cua-mode on, and with
(global-set-key (kbd "C-t") ctl-x-map),
now “C-t r t” no longer works... it seems to be calling transpose-
lines...

in short, all these extra personalized fixes creates a lot
complications. If emacs dev made cua mode's intended purpose by
default, which as a side effect most of these complications will be
gone, as compared to indivdualistic customization that tried to
achieves the same thing. This is because when emacs has something out
of the box, the implementation is more throughly examed at some lower
level, i.e. creating much more robustness than individual hacks. If
emacs dev decided that Ctrl + XCV should be the shortcut for emacs,
the proper solution is probably not even using cua-mode, since itself
is a quite complex hack.

  Xah
∑ http://xahlee.org/

☄

On Aug 5, 3:37 pm, Xah Lee <xah...@gmail.com> wrote:
> Hi Elena,
>
> ; Make C-t acts like C-x, so that C-x is easier to type on dvorak
> ; (keyboard-translate ?\C-t ?\C-x)
> ; but this means  ALL your C-t keys becomes C-x.
> ; So, for example, in outline-mode, C-c C-t runs hide-body.
> ; But now, when you type that, you get C-c C-x instead.
> ; A better solution is:
> ; (global-set-key (kbd "C-t") ctl-x-map)
>
> i've been using
> (keyboard-translate ?\C-t ?\C-x)
>
> for the past ~5 years or so. In pratice, i never noticed any problem,
> prob because C-t hardly used as embedded combo in a key sequence, or,
> when it is used, such commands are often advanced features or not
> commonly needed.
>
> in fact, the example C-c C-t in outline-mode i only noticed yesterday,
> as i was browsing emacs 23's News file which is in outline-mode. Other
> than this, i've not used outline-mode.
>
> I switched to
>
> (global-set-key (kbd "C-t") ctl-x-map)
>
> yesterday, and noticed that it has problems too.
> I often do “C-x r l” to get my bookmark list.
> So, this means i've been pressing “C-t r l” in the past ~5 years.
> But if you are in dired, that no longer works with the new setup. “C-t
> r” invokes image-dired-delete-tag.
>
>   Xah
>http://xahlee.org/
>
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]