From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Michael Livshin Newsgroups: gmane.emacs.help Subject: getting Mule, Unicode & X selection to play together Date: Sun, 15 Dec 2002 02:09:44 +0200 Organization: The Church of God the Utterly Indifferent Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1039911096 23640 80.91.224.249 (15 Dec 2002 00:11:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 15 Dec 2002 00:11:36 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18NMNa-000699-00 for ; Sun, 15 Dec 2002 01:11:34 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18NMMW-0008QN-05 for gnu-help-gnu-emacs@m.gmane.org; Sat, 14 Dec 2002 19:10:28 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.freenet.de!fu-berlin.de!uni-berlin.de!laredo.verisity.COM!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 54 Original-NNTP-Posting-Host: laredo.verisity.com (212.150.223.230) Original-X-Trace: fu-berlin.de 1039910986 37487694 212.150.223.230 (16 [72362]) Mail-copies-to: never User-Agent: Gnus/5.090007 (Oort Gnus v0.07) XEmacs/21.4 (Honest Recruiter, i686-pc-linux) Cancel-Lock: sha1:pofmZhzryqzQGpxlRKwDponbsl8= Original-Xref: shelby.stanford.edu gnu.emacs.help:108135 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:4664 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:4664 so the day had come and I decided to explore the wonderful world of Emacs 21 and Mule, what with all the nice Debian packaging of them out there. so I installed Emacs 21 and mule-ucs (it seemed like a good idea, or was it?), and I've put the following into .emacs: (set-language-environment "Cyrillic-KOI8") ; I want my cyrillics (define-coding-system-alias 'mule-utf-8 'utf-8) ; per mule-ucs README (set-keyboard-coding-system 'utf-8) ; my keyboard generates ; Unicode-encoded cyrillic chars now, I'm mostly interested in making X selection play well between Emacs and several Unicode-based apps (mainly Mozilla and a couple of GTK2-based critters). I had to play with the locale settings, to get the X clipboard to approach at least some sanity. so they ended up like this (considering that I don't want the programs to speak Russian at me and I live in Israel): LANG=ru_RU.UTF-8 LC_CTYPE=ru_RU.UTF-8 LC_NUMERIC=he_IL LC_TIME=he_IL LC_COLLATE=ru_RU.UTF-8 LC_MONETARY=he_IL LC_MESSAGES=C LC_PAPER=C LC_NAME=C LC_ADDRESS=he_IL LC_TELEPHONE=he_IL LC_MEASUREMENT=he_IL LC_IDENTIFICATION=ru_RU.UTF-8 LC_ALL= if I select a chunk of cyrillic text in Emacs and paste it into Mozilla, all is well. now, if I select a chunk of cyrillic text in Mozilla and paste it into Emacs, I do indeed get the same-looking text. however, the char codes are different from whatever Emacs itself chooses for the same entities if I type them into it (which is just weird, but no biggie), and (as a consequence, probably) the pasted text is shown in a different font (which is butt ugly). so basically I'd like Emacs to somehow recognize the cyrillic characters in the X selection it receives, and to convert them into the codes it itself uses for the same characters. how do I do that? -- There are few personal problems which can't be solved by the suitable application of high explosives.