From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jussi Piitulainen Newsgroups: gmane.emacs.help Subject: Re: Alt as meta, except for certain keys, how? Date: 13 Aug 2003 08:14:28 +0300 Organization: University of Helsinki Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3F329CBE.8050706@yahoo.com> <3F33F14F.2060903@yahoo.com> <3F37FC9E.5000203@yahoo.com> <3F392069.1010103@yahoo.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1060758154 26162 80.91.224.253 (13 Aug 2003 07:02:34 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 13 Aug 2003 07:02:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 13 09:02:32 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19mpeS-0002fK-00 for ; Wed, 13 Aug 2003 09:02:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.20) id 19mpcj-0000UU-C9 for geh-help-gnu-emacs@m.gmane.org; Wed, 13 Aug 2003 03:00:45 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!nntp.theplanet.net!inewsm1.nntp.theplanet.net!zen.net.uk!news-stoc.telia.net!news-stoa.telia.net!telia.net!nntp.inet.fi!inet.fi!feeder1.news.jippii.net!newsfeed2.funet.fi!newsfeeds.funet.fi!news.cc.tut.fi!news.helsinki.fi!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 43 Original-NNTP-Posting-Host: venus.ling.helsinki.fi Original-X-Trace: oravannahka.helsinki.fi 1060751668 15295 128.214.78.39 (13 Aug 2003 05:14:28 GMT) Original-X-Complaints-To: abuse@helsinki.fi Original-NNTP-Posting-Date: 13 Aug 2003 05:14:28 GMT User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Original-Xref: shelby.stanford.edu gnu.emacs.help:115860 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:11779 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:11779 Kevin Rodgers writes: > Sorry, I was trying to show a general form via ellipses. A concrete > example would be > > (define-key key-translation-map [?\M-7] "|") Ah. That works all right, but when 7 is replaced with a letter outside ASCII, it does not work. > I don't know why those wouldn't work [] unless there are > keyboard/buffer/file coding issues. You might want to use the octal > encoding instead: > > [?\M-\241] ; meta inverted exclamation point That's again an interesting suggestion. I notice that ?\M-{inv excl} and ?\M-\241 have different values, and C-x = shows an {inv excl} in the buffer as octal 4241, not just 241. A coding issue, then, maybe, and yes, the following indeed seems to do the trick: (define-key key-translation-map [?\M-\366] "*") Octal 366 is Latin-1 for one of the letters I have a key for, the letters shows as octal 4366 in the buffer, ?\M-{letter itself} does not identify it for binding purposes, but ?\M-\366 seems to work. Thank you. > I don't understand Emacs' encoding scheme at all, nor do I want to. Heh. >> I think I'll use the numbers for these few keys. > > The "Character Type" node of the Emacs Lisp manual strongly > discourages that: Of course, and I agree, but I was failing to find any other way to make it work. That octal syntax seems to do it, and all in standard Latin-1, too, so I will change to use that instead. -- Jussi