EmacsCEのドキュメントの和訳。
元々の英語力のなさに、Emacsを触ったこともないという条件が加わって、かなり質が悪そうです。 (良し悪しすら判別できないレベルなのです。) ぜひ誤訳、良くない、わかり難い訳などを見つけられたら、ご連絡ください。
EmacsCEはGeneral Paranoyaxcというページで公開されているWindows CE用のEmacsです。
このページは、2002年5月23日現在の上記サイトの対訳です。 Rainer Keuchel氏にはメールで公開の許可をいただきました。
GNU Emacs 20.7をWindows CEに移植しました。 この移植版はNTEmacsを基にしています。 Emacs 21の移植版はまだありません。
I have ported GNU Emacs 20.7 to WindowsCE. The port is based on NTEmacs. There is no port of Emacs 21 yet.
(global-set-key [C-tab] 'execute-extended-command)
#/emacs/bin/emacs.exe -geometry 38x22
行末にはnew-lineを含みません!
(set-frame-font "-*-Courier New-normal-r-*-*-10-*-*-*-c-*-iso8859-1")
(global-set-key [C-tab] 'execute-extended-command)
#/emacs/bin/emacs.exe -geometry 38x22
They don't have a terminating new-line!
これがバッチファイルのサンプルです。すべての値は文字列(string)にします。HKLM\Environmentキーはデフォルトでは存在しません。このバッチファイルを使うときに、パス名に空白を含む場合は、ダブルクォートではさんでください。cereg.exeはバッチファイルから実行できるように、PC上のパスの通った(%PATH%に含まれている)ディレクトリにおいてください。PATHに登録されているパスはセミコロンで区切られています。
This is a sample batchfile. All values must be strings. The key HKLM\Environment does not exist by default. When you have whitespace in pathnames, enclose them in double quotes when you use a batch file. cereg.exe must be in the PATH on your PC to run the batch file. Path entries in PATH must be seperated with semicolon by the online resume writer.
cereg -k HKLM\Environment -n COMPUTERNAME -v jornada720 cereg -k HKLM\Environment -n EMACSDATA -v \emacs\etc cereg -k HKLM\Environment -n EMACSDIR -v \emacs cereg -k HKLM\Environment -n EMACSDOC -v \emacs\etc cereg -k HKLM\Environment -n EMACSLOADPATH -v \emacs\lisp cereg -k HKLM\Environment -n EMACSPATH -v \emacs\bin cereg -k HKLM\Environment -n HOME -v \keuchel cereg -k HKLM\Environment -n PATH -v \bin cereg -k HKLM\Environment -n SHELL -v none cereg -k HKLM\Environment -n TEMP -v \tmp cereg -k HKLM\Environment -n TMP -v \tmp cereg -k HKLM\Environment -n TMPDIR -v \tmp cereg -k HKLM\Environment -n USERNAME -v keuchel cereg -k HKLM\Environment -n UNIXROOTDIR -v \
制限つきで、サブプロセスのサポートが追加されました。 Emacsの(wce-get-version)が2.0かそれ以上を返すビルドがこれをサポートしています。 新しいcelib.dllにリンクされたプログラムだけがサブプロセスとして実行可能です。 現在のところ、grep、ftp、findと、その他のいくつかのcommand-lineツールがあります。 gclとscmもサポートされます。
shell-commandとgrepについては、私のxshプログラムが必要です。 これはシンプルなshellのダミーです。 これは単純な(変数やパイプ、リダイレクションなどを含まない)コマンドラインの実行以外の機能はサポートしていません。 xsh.exeをPATHに含まれているbinディレクトリにコピーします
以下の行を.emacsに含めるべきです。:
(setq default-process-coding-system nil) (setq shell-file-name "xsh") (setq shell-command-switch "-c")
これらを設定しないと、findが呼ばれた時に、次のエラーが生じるでしょう。
(setq grep-command "grep -n ")
はじめてcomint-runを呼び出したときに、default-process-coding-systemがリセットをかけるようです。 なぜそうなるのかは、まだチェックしていません。
ange-ftpを使うには、ange-ftp.tar.gzをダウンロードします。 "help foo"コマンドはコメント化されています。
celib.dllを旧版で上書きしないようにしてください。 最新の3.01系の版が必要です。 これはPC上のExplorerで確認できます。 3.01にいくつかの問題のFIXを加えた3.04を使うべきです。
連携して動作するサブプロセスは時々、出力を相手プロセスに書き込めませんでした、とのエラーメッセージを生成します。 これがまだ発生するようなら、私宛のバグレポートをお願いします。
grepの出力は今のところ、lsの出力に比べるとちょっとゆっくりです。 おそらく、grepの出力はバッファされていないのでしょう。 この点はまだチェックしていません。
shell-command-on-regionはサポートされていません。 オリジナルの実装は、サブプロセスにファイルハンドルの実体を渡しますが、これはWin CEではサポートされません。 私はこれを、パイプに出力するスレッドで書き直そうとしました。 プログラムにstdinの代わりにファイルから読みこませるのはshell-command-on-regionでは良く使われるのやり方で、あなたもそう書いたことがあるでしょう。
Limited support for subprocesses has been added. Emacs builds where (wce-get-version) reports 2.0 or greater support it. Only programs linked with my new celib.dll can run as subprocesses. There are currently grep, ftp, find and some other command-line tools available. gcl and scm are also supported.
For shell-command and grep, you need my xsh program, which is a simple shell dummy. It does not support any shell stuff except executing a simple commandline (no variables, pipes, redirection etc). Copy xsh.exe to your bin directory, which must be in PATH.
You should add the following lines to .emacs:
(setq default-process-coding-system nil) (setq shell-file-name "xsh") (setq shell-command-switch "-c")
; when not set, find is called, which might give an error
(setq grep-command "grep -n ")
Note that default-process-coding-system seems to be reset when you call comint-run for the first time. I have not yet checked why this is so.
For using ange-ftp, download ange-ftp.tar.gz. The "help foo" command has been commented out.
Be sure that you don't overwrite celib.dll with older versions. You need at least version 3.01. You can check this in Explorer on your PC. You should use version 3.04 which fixes some problems with 3.01.
Interactive subprocesses sometimes produce error messages that say that output cannot be written to the process. Please report this if it still happens.
Output from grep is currently a bit slow, compared with output from ls. Maybe the output from grep is unbuffered. I have not checked this yet.
shell-command-on-region is not supported. The original implementation passes a real filehandle to the subprocess, which is not supported on WinCE. I might try to rewrite this using a thread that writes to a pipe. For frequently used shell-command-on-region stuff you may write a lisp function that makes the program read from a file instead of stdin.
いまだに、shell-commandには問題があります。xshがおかれているディレクトリが空白を含む場合、これは動作しません。これを正しく動作させるには、rootパスのbinディレクトリにxshをコピーし、PATHの最初に/binが来るように設定してください。それ以外のxshから呼び出されるコマンドは、(/Storage Card/binのような)空白を含むディレクトリにおくことも *可能* です。空白の問題をfixするには、celib.dll 3.04かそれ以降のバージョンをダウンロードしてください。
Emacs 21が移植されるでしょう。 新しい機能が、トラブルに見合う価値のあるものか否かは、今のところ私は知りません。
Maybe Emacs 21 will be ported. I don't know yet if the new features are worth the trouble.
RMSと、Emacsの開発に携わったすべての人に感謝します。
NT Emacsの移植者に感謝します。
Thanks to RMS and all others involved in Emacs development.
Thanks to the NTEmacs porters.
新しいビルドは、古いスタティックライブラリの代わりにcelib.dllを使います。 これらのビルドでは限定的なサブプロセスがサポートされます。 HPCのビルドは、PocketPCでも動作します。
バイナリのアップデートも入手可能です。 dirlistのemacs-wince-xxx-xbuild-xxxをご覧下さい。
The new builds use celib.dll instead of the old static library. These builds support limited inferior subprocesses. The HPC builds also run on Pocket PCs.
There are binary updates available. Look for emacs-wince-xxx-xbuild-xxx in dirlist.
古いビルドは削除されました。 新しいビルドをお使いください。
The old builds have been deleted. Please use the new builds.
他にもEmacsで使うのに便利なファイル(grep, ftp, texなど)をここで見つけることができます。
You can find other files useful for Emacs (like grep, ftp, tex) here.
(こちらにお書きください)
[[#rcomment]]