[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: emacs cyrillic
From: |
Peter Dyballa |
Subject: |
Re: emacs cyrillic |
Date: |
Sat, 4 Nov 2006 21:08:16 +0100 |
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
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
cyrillic letters, after having saved it, it is displayed correctly.
I tried saving with a variety of encodins, but in vain.
Instead set an environment variable LANG or LC_CTYPE with a locale
value your OS provides. I have for the purpose to use Unicode set it
to de_DE.UTF-8, you need something Bulgarian + an adequate encoding,
bg_BG.CP1251 or bg_BG.ISO8859-5? bg_BG.UTF-8 might be also a useful
value. GNU Emacs learns from this environment variable and sets a few
things automatically right. You can direct GNU Emacs by setting for
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
know how. I have installed ispell-bg and in /usr/lib/ispell I have
the files bulgarian.hash and bulgarian.aff, but emacs does not seem
to see them.
To check what ispell sees, first check whether GNU Emacs is really
set to use ispell! Some time ago a decision was made to substitute
ispell with aspell. You can correct this fault:
(setq ispell-program-name "ispell")
You can make this corrective setting active when eval the expression
in *scratch* buffer. Now select from the Tools menu "Spell Checking"
and then "Change Dictionary..." Now press TAB in mini-buffer. Voilà,
there they are!
For flexibility I have set:
(setq ispell-dictionary "german8")
(if (string= "aspell" ispell-program-name)
(progn
; (setq ispell-extra-args "--norm-form=comp --norm-required --
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-
dictionary))))
(message "Alles für «a»spell")
)
(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ür »i«spell")
)
(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
impurities in our air and water that are doing it."
- emacs cyrillic, Martin Ivanov, 2006/11/04
- Re: emacs cyrillic,
Peter Dyballa <=