Emacs@Windows + MS-IME

NTEmacs 22BASE (日本語インライン変換 & 半透明)
http://ntemacsjp.sourceforge.jp/matsuan/IndexJp.html

とりあえずこのページから1. Download
https://sourceforge.jp/projects/ntemacsjp/files/
に沿ってダウンロードしてこればおk。それを普通に展開すれば使える。

シフト+クリックでフォントは変えられる。

.emacsの設定をどこにおけばいいのか調べている。
emacs上でC-x, C-fして~/.emacsすればよかっただけだった。

参照
http://www.gnu.org/software/emacs/windows/Installing-Emacs.html#Installing-Emacs

3.4 What is my init file?

When Emacs starts up, it attempts to load and execute the contents of a file commonly called .emacs (though it may have other names, see Where do I put my init file?) which contains any customizations you have made. You can manually add lisp code to your .emacs, or you can use the Customization interface accessible from the Options menu. If the file does not exist, Emacs will start with the default settings.
3.5 Where do I put my init file?

On Windows, the .emacs file may be called _emacs for backward compatibility with DOS and FAT filesystems where filenames could not start with a dot. Some users prefer to continue using such a name, because Explorer cannot create a file with a name starting with a dot, even though the filesystem and most other programs can handle it. In Emacs 22 and later, the init file may also be called .emacs.d/init.el. Many of the other files that are created by lisp packages are now stored in the .emacs.d directory too, so this keeps all your Emacs related files in one place.

All the files mentioned above should go in your HOME directory. The HOME directory is determined by following the steps below:

1. If the environment variable HOME is set, use the directory it indicates.
2. If the registry entry HKCU\SOFTWARE\GNU\Emacs\HOME is set, use the directory it indicates.
3. If the registry entry HKLM\SOFTWARE\GNU\Emacs\HOME is set, use the directory it indicates. Not recommended, as it results in users sharing the same HOME directory.
4. If C:\.emacs exists, then use C:/. This is for backward compatibility, as previous versions defaulted to C:/ if HOME was not set.
5. Use the user's AppData directory, usually a directory called Application Data under the user's profile directory, the location of which varies according to Windows version and whether the computer is part of a domain.

Within Emacs, <~> at the beginning of a file name is expanded to your HOME directory, so you can always find your .emacs file with C-x C-f ~/.emacs.

参照
http://ntemacsjp.sourceforge.jp/matsuan/IndexJp.html

(fixed-width-set-fontset "msgothic" 14)

.emacsに記入し再起動してみる。変更されている。一応確認のため14を24にしてみたりする。おk。

さて、ここまでは出来た。これからはIPAexフォントを設定したい。

失敗。

(fixed-width-set-fontset "IPAexゴシック" 10)

(fixed-width-set-fontset "lucida" 10)

成功。

失敗

(fixed-width-set-fontset "Terminal" 10)

(fixed-width-set-fontset "terminal" 10)

(fixed-width-set-fontset "terminal")

http://homepage.mac.com/matsuan_tamachan/emacs/NtemacsFont.html

ここを見ていく。

Emacsのフォント設定は、

(insert (prin1-to-string (x-list-fonts "*")))

を、評価して、使えるフォントを調べて、

とある。評価してというのはLispの実行らしい。確かバッファでLispの評価できるとかなんとかどこかに書いてあってそれを読んでたので一応そんな感じで検索してみると、EmacsでKill Current Bufferをしていったときに残る、Scratch(最初のページに出てきたりするやつ)で評価すればいいよみたいなことだったと思うのでそうしてみる。

クラッチと評価の仕方については
http://d.hatena.ne.jp/tomoya/20090215/1234692209
を参照

(- 1983 1925)

C-jで評価。出来た!

(insert (prin1-to-string (x-list-fonts "*")))

C-jで評価。ずらずらと一行でまとまった大きな文字列が出てくる。PCによっては重いんじゃないかこれ。とりあえずEmacsのままでは重かったのでそのファイルを読みにくいのでfont.txtみたいな名前にして保存。Notepadで閲覧。IPAexとかIPAフォントは入ってる。

全くわからないので

(create-fontset-from-ascii-font
"-outline-IPAゴシック-normal-r-normal-normal-10-*-*-*-*-*-iso8859-1"
nil "ipa10")
(set-fontset-font "fontset-ipa10" 'japanese-jisx0208
("IPAゴシック" . "jisx0208-sjis"))
(set-fontset-font "fontset-ipa10" 'katakana-jisx0201
("IPAゴシック" . "jisx0201-katakana"))

とりあえず.emacsにコピペ。失敗

http://homepage.mac.com/matsuan_tamachan/emacs/ntemacs_font.el.txt
をとりあえずコピペ。失敗。

ここまでやって諦めることに。
というか、自分はWindows
http://www.cycleof5th.com/tips/index.php?date=2008-06-27&lang=en
一括してデフォルトフォントを設定してしまっているので、Emacs上でシフトクリックした時にTerminalやLucida,Standardを選択しても日本語はIPA系のフォントになるらしい。
standardにしたときの設定が英語の見栄え的(日本語はIPA系で表示されているらしいが、英語は選択したフォントになるらしい)によかったが、単純に

(fixed-width-set-fontset "standard" 13)

では駄目だった。ので、lucidaの14サイズのフォントでいくことにした。
ので最終的にはひとまず

(fixed-width-set-fontset "lucida" 14)

で落ち着く。

ここで設定したフォント設定がC-xなんたら〜とかやってるところとか全部のEmacsのフォント設定になるらしい。
本当におこがましいが、とりあえず僕にWebごみの量産体制に入って欲しくなければEmacser達はIPAexフォントをEmacsに標準で対応する体制を作るんだ!Emacsの言語設定フォント設定あたりはいや、というか他の全ての設定がそうだけど魔法過ぎる。こんな俺にもいつかEmacsがまともに使える日が来るんだろうか。精進したい。