Skip to main content

  • Running Shell Commands from Emacs

    Running Shell Commands from Emacs

    www.nongnu.org/...shell.html - Preview

    emacs on 2008-09-12

  • Input Methods - GNU Emacs Manual

    • Chinese and Japanese require more complex methods. In Chinese input
      methods, first you enter the phonetic spelling of a Chinese word (in
      input method chinese-py, among others), or a sequence of
      portions of the character (input methods chinese-4corner and
      chinese-sw, and others). One input sequence typically
      corresponds to many possible Chinese characters. You select the one
      you mean using keys such as C-f, C-b, C-n,
      C-p, and digits, which have special meanings in this situation.

      The possible characters are conceptually arranged in several rows,
      with each row holding up to 10 alternatives. Normally, Emacs displays
      just one row at a time, in the echo area; (i/j)
      appears at the beginning, to indicate that this is the ith row
      out of a total of j rows. Type C-n or C-p to
      display the next row or the previous row.

      Type C-f and C-b to move forward and backward among
      the alternatives in the current row. As you do this, Emacs highlights
      the current alternative with a special color; type C-<SPC>
      to select the current alternative and use it as input. The
      alternatives in the row are also numbered; the number appears before
      the alternative. Typing a digit n selects the nth
      alternative of the current row and uses it as input.

      <TAB> in these Chinese input methods displays a buffer showing
      all the possible characters at once; then clicking Mouse-2 on
      one of them selects that alternative. The keys C-f, C-b,
      C-n, C-p, and digits continue to work as usual, but they
      do the highlighting in the buffer showing the possible characters,
      rather than in the echo area.

  • Emacs and Unicode Tips

    • How to type Chinese?




      Regardless what text editor you are using,
      you need to do two things: (1) Set your editor's File Encoding
      system to one that supports your language. (2) set your Input Method
      to a particular system suitable for your language.



      File Encoding tells your computer how to map
      symbols/glyphs/characters into binary code. Input Method allows you to
      type languages that are not based on alphabet. (For example, in
      Chinese, you cannot just type a character by pressing a key, instead,
      you must use a input method to type Chinese.) For languages based on
      the Latin alphabet, you don't need to worry about input method.



      To set your file encoding in emacs, use the menu “Options‣Mule (Multilingual Environment)‣Set Language Environment”.



      To set your input method, use the menu “Options‣Mule (Multilingual Environment)‣Select Input Method...”.



      After you've pulled the menu, be sure to also pull the menu command
      “Options‣Save Options” so that emacs remembers your settings.



      For me, i type Chinese often.
      There are several encoding systems for Chinese, for example
      GB 18030,
      Big5,
      UTF-8.
      I use the UTF-8 encoding system.
      Among the
      Chinese input methods,
      i use the
      Pinyin
      method
      . Here's how to set them in emacs without using the
      menu: “Alt+x set-language-environment UTF-8” and
      Alt+x set-input-method chinese-py”.



      Here's a example of actually typing the Chinese char 美 (meaning beautiful). Type “Alt+x set-input-method Return chinese-py”, then type “mei”. Emacs will show you a list of characters with the pronunciation of mei.
      Type “2” to pick the right character. Then, emacs will insert the character. To return to your input method, press “Ctrl+\”.



      A in-depth tutorial of using Mac with Chinese is at:
      http://www.yale.edu/chinesemac/.
      It includes comprehensive info and resources on Chinese fonts, complete tutorials on several Chinese input methods, etc.

1 - 6 of 6
Showing 20 items per page
List Comments (0)