next up previous contents index
Next: vi Up: Editors Previous: Emacs

Subsections

Mule Input For Searches

You can search for Japanese text while inside of mule. I'll give an example of searching for the Japanese word handoutai, semi-conductor, in an article from the Nihon Keizai Shimbun.

\includegraphics{editors/images/kabu_text.ps}

First press C-s to activate the i-search mode. \includegraphics{editors/images/i-search.ps}Next, press C-k to turn on i-search extensions. \includegraphics{editors/images/i-search-x.ps}. Now, press C-\ to begin Japanese input. You should see a Japanese hiragana character enclosed in [ ] brackets in the lower left hand corner. \includegraphics{editors/images/i-search-nihongo.ps}. Type in the romanji characters handoutai. The characters should appear in hiragana. \includegraphics{editors/images/i-search-nihongo-hiragana.ps}Press the space bar to convert the hiragana into kanji \includegraphics{editors/images/i-search-nihongo-kanji.ps}. Press the return key to accept the kanji. Finally, press the return key again to accept the search.

Emacs 20.2 with dynamic loading Canna

The information is taken from the Japanese document written by Morioka on September 24, 1997.

In order to get Canna to function under Emacs 20.2, you must patch Emacs 20.2 to support dynamic loading of the libraries. The patch can be found at

ftp://ftp.jaist.ac.jp/pub/GNU/mule/.notready/emacs-20.0.91-dl.diff

First, patch the Emacs 20.2 source. In this example the source for emacs-20.2 is in /usr/src/ and the patch emacs-20.0.91-dl.diff is in /usr/src/.

    % cd /usr/src/emacs-20.2

    % patch -p1 < /usr/src/emacs-20.0.91-dl.diff

    % ./configure

    % make

    % make install

In order to use the canna.el program, APEL must first be installed. APEL can be obtained from

ftp://ftp.jaist.ac.jp/pub/GNU/elisp/apel/

Edit the Makefile EMACS_SRC_DIR and CANNA_CFLAGS definitions to indicate the place of the Emacs src and Canna include files.

Run make.

Copy the canna.so file into the Emacs 20.2 exec-directory.

Copy canna.el into your Emacs load-path. For example, you can probably use /usr/local/share/emacs/site-lisp/.

Byte compile canna.el.

In your ~/.emacs file, add (load ``canna'')

XEmacs

XEmacs 20 and above can be compiled with mule support. I used wnn when I compiled XEmacs. The following flags were used for the compile.

  --with-mule=yes --with-wnn=yes --wnn-includes=/usr/include/wnn

Steve Dunham helped me to get egg to load when the wnn option was compiled in. The following is the .emacs addition he sent me that works great.

(when (featurep 'wnn)
	(require 'egg-wnn)
	(setq egg-default-startup-file "eggrc-wnn"))
(setenv "JSERVER" "localhost")

Of course, you must start the Wnn jserver on your local machine if you are using the last elisp line.

The screen capture below shows XEmacs and Wnn. The commands are the same as they are with mule.

\includegraphics{editors/images/xemacs_wnn.ps}

XEmacs 20 Inputting Japanese with Wnn


next up previous contents index
Next: vi Up: Editors Previous: Emacs
Craig Toshio Oda
1998-05-07