From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "B. T. Raven" Newsgroups: gmane.emacs.help Subject: Re: greek writing language and keybindings Date: Fri, 29 Oct 2010 11:46:07 -0500 Message-ID: References: <4CCA2F86.20205@mousecar.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1291891384 896 80.91.229.12 (9 Dec 2010 10:43:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 10:43:04 +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 Dec 09 11:43:00 2010 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.69) (envelope-from ) id 1PQdxj-0005NP-NX for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 11:43:00 +0100 Original-Received: from localhost ([127.0.0.1]:60625 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQdxi-0007ny-5V for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 05:42:58 -0500 Original-Path: usenet.stanford.edu!news.glorb.com!news2.glorb.com!npeer03.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.sysmatrix.net!news.sysmatrix.net.POSTED!not-for-mail Original-NNTP-Posting-Date: Fri, 29 Oct 2010 11:46:26 -0500 User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) Original-Newsgroups: gnu.emacs.help In-Reply-To: X-No-Archive: yes Original-Lines: 87 X-Usenet-Provider: http://www.giganews.com Original-NNTP-Posting-Host: 12.73.129.121 Original-X-Trace: sv3-x1ujywIOTFDRJFy1uu5sbPWs8GvD8JSCnOBNIcDbRWgVdEU9YtqfPM7pkIHgRdRWecKAnPSJakSeXBk!AuzI5RmCdPUTOlH12bbo/ZZeV1kZ4ZaD6wvDYmFvrfp0TPwcXl8pFaFV5Ld+hlb7xL+GsdkcTQYB!rLZMKKnrNYiB6h+gKAU07+WuOvuYv5M= Original-X-Complaints-To: abuse@sysmatrix.net X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 4694 Original-Xref: usenet.stanford.edu gnu.emacs.help:182108 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 X-Gmane-Expiry: 2010-12-23 Xref: news.gmane.org gmane.emacs.help:76964 Archived-At: Dimitrios Apostolou wrote: > Hi, thanks for your reply > > I should note that I am already writing greek perfectly in emacs, and I > am switching languages using the X server shortcut I have chosen for > every X application with the following command, and I wouldn't like to > change that: > > setxkbmap us,el -option "grp:shifts_toggle" > > The problem is that I have to switch back to english for the default > keybindings to work, which is very irritating! > > On Thu, 28 Oct 2010, ken wrote: >> Though I'm not the list's expert, I have dabbled in some languages with >> emacs. From what I've found, there's two steps. One is to set the >> buffer's language environment. UTF-8 works for many different >> languages, Greek included. Select UTF-8 for the current buffer by >> clicking on "Options", "MULE", and "Set Language Environment", then >> "URF-8". > > I am using emacs 23 and there is a little "U" at the lower left corner > of the emacs window, doesn't that mean that UTF-8 is selected by default? > >> >> Next, in order to be able to type in Greek characters, you need to set >> the input method. Do this for the current buffer by clicking on >> "Options", "MULE", and "Select Input Method". In the minibuffer type >> "gr", then hit Tab (C-i) and you'll see several Greek input methods. >> You'll have to play around with these to find the one(s) you prefer. > > Thanks for the suggestion, I tried that and indeed emacs keybindings > work fine like that. But that requires switching languages within emacs > with C-\, overriding the setxkbmap command. Is there a better way? It seems that that IS the better way. And much more elegant. Why burden the OS with something Emacs can handle? If you are using only two imput methods in a document then C-\ will toggle between them. If you want more then you could change imput methods quickly in many different ways. From my .emacs (using version 22; there are probably better ways in vers. 23 since it is unicode based): (fset 'im-lat1 [?\C-x return ?\C-\\ ?l ?a ?t ?i ?n ?- ?1 ?- ?p ?o ?s ?t ?f ?i ?x return]) (fset 'im-gkb [?\C-x return ?\C-\\ ?g ?r ?e ?e ?k ?- ?b ?a ?b ?e ?l return]) (fset 'im-lat4 [?\C-x return ?\C-\\ ?l ?a ?t ?i ?n ?- ?4 ?- ?p ?o ?s ?t ?f ?i ?x return]) (fset 'im-uc [?\C-x return ?\C-\\ ?r ?f ?c ?1 ?3 ?4 ?5 return]) (fset 'im-heb [?\C-x return ?\C-\\ ?h ?e ?b ?r ?e ?w return]) (fset 'im-hbb [?\C-x return ?\C-\\ ?h ?e ?b ?l ?i ?s ?h return]) Then M-x im-gkb sets method to greek-babel, giving you most of the diacritics for polytonic Greek. I think this will work on w32 and Linux. > > > Thanks, Dimitris > > > P.S. On a sidenote, maybe this is related to my emacs being compiled > with GTK+ disabled and Motif toolkit enabled? Can someone with a GTK+ > enabled emacs test whether keybindings work, when a non-latin language > is enabled? I think Pascal has answered this. If you want to use Greek in apps outside of Emacs, isn't there a way of simply switching keyboards on the fly? If you forget to change it back before returning to Emacs isn't there a function that could be hooked to make sure it is a system keyboard appropriate for Emacs? > > >> >> After you find what works for you, then of course you can put something >> in your ~/.emacs, but I don't know what that would be. >> >> hth, >> ken >> >