MapaDoSite ModificaçõesRecentes Notícias SeçãoElisp HowTo

SupportBiDi

This pages has links to reference material and will eventually explain the BiDi? machinery in the works for Emacs and XEmacs.

Current Status

The dev branch of Emacs now has working bidi support, and its developers would welcome further testing and bug reports

Just follow the standard online instructions for downloading a local copy of the bzr repository for Emacs, and build.

You will now be able to:

(1) See the bidi bits on the HELLO page.

(2) View and edit bidi files. To test bidi, evaluate this:

   (setq-default bidi-display-reordering t)

This sets a variable that will eventually be turned on globally by default. If you only want it buffer-locally you can of course:

   (setq bidi-display-reordering)

2. For Hebrew and Yiddish, you’ll want the brand-new input methods. See the attachment to this message:

http://article.gmane.org/gmane.emacs.bidi/597

I see that Emacs contains an older Arabic input method, which may also work.

In general, peruse the emacs-bidi list at:

http://news.gmane.org/gmane.emacs.bidi

And subscribe here:

http://lists.gnu.org/mailman/listinfo/emacs-bidi

Older Bidi Support

Neither Emacs 21 nor XEmacs 21 do bidi well at the moment. “bidi” refers to the input and output of bidirectional text. This is important when right-to-left scripts such as Arabic and Hebrew are mixed with left-to-right scripts such as European langauges.

There is a branch of Emacs 21 available for Arabic and Hebrew by the National Institute of Advanced Industrial Science and Technology (AIST)! It is based on the GNU Emacs-21.3.50 branch and available from here:

It is possible to actually get BiDi? work done under XEmacs 21.5; see

Requires a terminal emulator with support for bidi, for example PuTTY or mlterm(1). This is not a particularly satisfactory solution.

Poor-mans-bidi-mode takes a different - in-the-mean-time - approach: it an external program such as fribidi or bidiv to display the bidified text in a different buffer, relocating point by context, so that you know where you are; see

Bidi Hacking: Getting Started

These links are recommended reading.

“Unified and Extensible Mechanism for Multilingual Text Processing” by KenichiHanda?, MikikoNishikimi?, SatoruTomura?, and NaotoTakahashi?, available in various translations, explains the MULE basics:

You can find more information on the Unicode homepage:

The most important Technical Report in this context is Report #9, also known as Unicode Standard Annex #9, or UAX#9, subtitled The Bidirectional Algorithm.

The bidi algorithm needs to know the bidi types for all categories. These can be extracted from one of the data files available from Unicode. See the UnicodeData.txt file at the following location for the bidi types, see the BidiMirroring.txt file for the mirroring of glyphs.

Emacs Related Features

These are discussed on the emacs-bidi mailing list. See EmacsMailingLists.