From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: how to get Meta+y to be Meta+Tab Date: Mon, 27 Oct 2008 23:13:14 -0700 (PDT) Organization: http://groups.google.com Message-ID: <6bc52a88-25c4-4d34-83bd-b543aacacba0@z18g2000prn.googlegroups.com> References: <601c6f74-a6ab-434b-954a-3663a58c9f60@t39g2000prh.googlegroups.com> 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 1225176092 19764 80.91.229.12 (28 Oct 2008 06:41:32 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Oct 2008 06:41:32 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Oct 28 07:42:32 2008 connect(): Connection refused 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 1KuiHg-0007q6-GG for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Oct 2008 07:42:32 +0100 Original-Received: from localhost ([127.0.0.1]:33897 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KuiGa-00006o-2s for geh-help-gnu-emacs@m.gmane.org; Tue, 28 Oct 2008 02:41:24 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!z18g2000prn.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 59 Original-NNTP-Posting-Host: 24.6.185.159 Original-X-Trace: posting.google.com 1225174394 8299 127.0.0.1 (28 Oct 2008 06:13:14 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Tue, 28 Oct 2008 06:13:14 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z18g2000prn.googlegroups.com; posting-host=24.6.185.159; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:163859 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:59200 Archived-At: On Oct 26, 7:11 am, Nikolaj Schumacher wrote: > Xah wrote: > > am pretty sure that global-set-key cannot be used for the > > functionality of keyboard-translate. > > In a way it can. You can bind it to a macro: > > (global-set-key "\M-y" "\M-\t") Super. Thanks. seems this still does not work well... For example, after i did that, then in a text mode i have cursor at the end of =E2=80=9Cm=E2=80=9D in =E2= =80=9Cthis form that=E2=80=9D. Then, pressing Alt+y gives me this error: =C2=ABAfter 0 kbd macro iterations: ispell-command-loop: Keyboard macro terminated by a command ringing the bell=C2=BB but pressing Esc Tab does return a list of completion. what i'm trying to do is to get command completion to some Meta +=E2=80=B9letter=E2=80=BA binding, because Alt+Tab is used by the OS to swi= tch apps. So, in the past 10 years i just used Esc Tab but that's 2 keystrokes... The normal way of binding M-=E2=80=B9letter=E2=80=BA to a command wont work= well because the command name varies depending on the mode. e.g. ispell- complete-word, lisp-complete-word, etc. > Using `keyboard-translate' is generally a little risky, because it will > change the key in all places. So people wouldn't be able to do use C-c M= -y > anymore. So I would only use it to fix keyboard issues. great advice. > You can also write a function like this: > > (defun do-what-backspace-does () > (interactive) > (call-interactively (key-binding "\C-?"))) > > I've found that one to be the most reliable solution. This won't work for my need above... but will try it out for other uses. Thanks. Andreas Politz wrote:: > (define-key key-translation-map [?\M-y] [?\M-\C-i]) this seems to work. Thanks. Xah =E2=88=91 http://xahlee.org/ =E2=98=84