From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Lee Newsgroups: gmane.emacs.help Subject: Re: keyboard-translate working for Control but not for Alt Date: Wed, 5 Aug 2009 17:40:46 -0700 (PDT) Organization: http://groups.google.com Message-ID: <431b46e1-18f0-4124-b8b0-dd26500ae158@z4g2000prh.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1249592729 27593 80.91.229.12 (6 Aug 2009 21:05:29 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Aug 2009 21:05:29 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 06 23:05:23 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1MZA9K-0007gP-K7 for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Aug 2009 23:05:22 +0200 Original-Received: from localhost ([127.0.0.1]:52789 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MZA9K-0005om-5S for geh-help-gnu-emacs@m.gmane.org; Thu, 06 Aug 2009 17:05:22 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!z4g2000prh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help,comp.emacs Original-Lines: 85 Original-NNTP-Posting-Host: 76.102.12.87 Original-X-Trace: posting.google.com 1249519249 32462 127.0.0.1 (6 Aug 2009 00:40:49 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 6 Aug 2009 00:40:49 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z4g2000prh.googlegroups.com; posting-host=76.102.12.87; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.37 Safari/530.5, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:171651 comp.emacs:98528 X-Mailman-Approved-At: Thu, 06 Aug 2009 16:48:30 -0400 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:66885 Archived-At: 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 =E2=80=9CC-t r t=E2=80=9D (string-rectangle) and =E2=80=9CC-t r k=E2=80=9D for kill-rectan= gle, 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 =E2=80=9CC-t r t=E2=80=9D no longer works... it seems to be calling tra= nspose- 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 =E2=88=91 http://xahlee.org/ =E2=98=84 On Aug 5, 3:37 pm, Xah Lee 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 =E2=80=9CC-x r l=E2=80=9D to get my bookmark list. > So, this means i've been pressing =E2=80=9CC-t r l=E2=80=9D in the past ~= 5 years. > But if you are in dired, that no longer works with the new setup. =E2=80= =9CC-t > r=E2=80=9D invokes image-dired-delete-tag. > > Xah > =E2=88=91http://xahlee.org/ > > =E2=98=84