From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Peter Dyballa Newsgroups: gmane.emacs.help Subject: Re: emacs cyrillic Date: Sat, 4 Nov 2006 21:08:16 +0100 Message-ID: References: <1404130225.429691162658282318.JavaMail.nobody@mail06.abv.bg> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v752.2) Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1162670925 16558 80.91.229.2 (4 Nov 2006 20:08:45 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 4 Nov 2006 20:08:45 +0000 (UTC) Cc: GNU Emacs List Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Nov 04 21:08:42 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GgRoh-00074p-L3 for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Nov 2006 21:08:36 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GgRoh-0006ou-3z for geh-help-gnu-emacs@m.gmane.org; Sat, 04 Nov 2006 15:08:35 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1GgRoV-0006mr-Fp for help-gnu-emacs@gnu.org; Sat, 04 Nov 2006 15:08:23 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1GgRoS-0006m0-Na for help-gnu-emacs@gnu.org; Sat, 04 Nov 2006 15:08:23 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GgRoS-0006lx-Ik for help-gnu-emacs@gnu.org; Sat, 04 Nov 2006 15:08:20 -0500 Original-Received: from [217.72.192.221] (helo=fmmailgate01.web.de) by monty-python.gnu.org with esmtp (Exim 4.52) id 1GgRoS-0002pr-2y for help-gnu-emacs@gnu.org; Sat, 04 Nov 2006 15:08:20 -0500 Original-Received: from smtp05.web.de (fmsmtp05.dlan.cinetic.de [172.20.4.166]) by fmmailgate01.web.de (Postfix) with ESMTP id F220732E55F6; Sat, 4 Nov 2006 21:08:18 +0100 (CET) Original-Received: from [87.193.64.193] (helo=[192.168.1.2]) by smtp05.web.de with asmtp (TLSv1:AES128-SHA:128) (WEB.DE 4.107 #114) id 1GgRoQ-0000IU-00; Sat, 04 Nov 2006 21:08:18 +0100 In-Reply-To: <1404130225.429691162658282318.JavaMail.nobody@mail06.abv.bg> X-Image-Url: http://homepage.mac.com/sparifankal/.cv/thumbs/me.thumbnail Original-To: Martin Ivanov X-Mailer: Apple Mail (2.752.2) X-Sender: Peter_Dyballa@web.de 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:38547 Archived-At: Am 04.11.2006 um 17:38 schrieb Martin Ivanov: > Hello! > > I am running Slackware Linux 11.0 with kernel 2.6.18 and Gnu =20 > Emacs 21.4a. > I set emacs to be able to write cyrillic using the bulgarian.el file: > http://debian.fmi.uni-sofia.bg/~ogi/bulgarian.el IMO this file is too old for a modern Emacs. > My problem is, what should I do so that when I open a file with =20 > cyrillic letters, after having saved it, it is displayed correctly. =20= > I tried saving with a variety of encodins, but in vain. Instead set an environment variable LANG or LC_CTYPE with a locale =20 value your OS provides. I have for the purpose to use Unicode set it =20 to de_DE.UTF-8, you need something Bulgarian + an adequate encoding, =20 bg_BG.CP1251 or bg_BG.ISO8859-5? bg_BG.UTF-8 might be also a useful =20 value. GNU Emacs learns from this environment variable and sets a few =20= things automatically right. You can direct GNU Emacs by setting for =20 example (there are more!): (set-default-coding-systems 'value) (setq file-name-coding-system 'value) (setq default-buffer-file-coding-system 'value) (set-keyboard-coding-system 'value) (set-terminal-coding-system 'value) (set-clipboard-coding-system 'value) (set-selection-coding-system 'value) (prefer-coding-system 'iso-8859-5) ; for = example > Besides, I want to enable spell-check for bulgarian, but I do not =20 > know how. I have installed ispell-bg and in /usr/lib/ispell I have =20 > the files bulgarian.hash and bulgarian.aff, but emacs does not seem =20= > to see them. To check what ispell sees, first check whether GNU Emacs is really =20 set to use ispell! Some time ago a decision was made to substitute =20 ispell with aspell. You can correct this fault: (setq ispell-program-name "ispell") You can make this corrective setting active when eval the expression =20 in *scratch* buffer. Now select from the Tools menu "Spell Checking" =20 and then "Change Dictionary..." Now press TAB in mini-buffer. Voil=E0, =20= there they are! For flexibility I have set: (setq ispell-dictionary "german8") (if (string=3D "aspell" ispell-program-name) (progn ; (setq ispell-extra-args "--norm-form=3Dcomp --norm-required --=20= run-together")? ; (setq ispell-dictionary "en_GB-ise-w_accents") (set-default 'ispell-local-dictionary ispell-dictionary) (add-hook 'TeX-language-en-hook (function (lambda () (ispell-change-dictionary = "british")))) (add-hook 'TeX-language-de-hook (function (lambda () (ispell-change-dictionary = ispell-=20 dictionary)))) (message "Alles f=FCr =ABa=BBspell") ) (setq ispell-dictionary "german8") (add-hook 'TeX-language-en-hook (function (lambda () (ispell-change-dictionary = "british")))) (add-hook 'TeX-language-de-hook (function (lambda () (ispell-change-dictionary = "deutsch8")))) (message "Alles f=FCr =BBi=ABspell") ) (add-hook 'LaTeX-mode-hook (function (lambda () (setq ispell-extra-args '("-t"))))) -- Greetings Pete "It isn't pollution that's harming the environment. It's the =20 impurities in our air and water that are doing it."