info ディレクトリ作成
mkdir ~/.emacs.d/info
Gauche
$ cd Gauche-*.*.*/doc
$ makeinfo gauche-refj.texi
$ mv gauche-refj.info gauche-refj.info-1 gauche-refj.info-2 gauche-refj.info-3 gauche-refj.info-4 gauche-refj.info-5 gauche-refj.info-6 gauche-refj.info-7 gauche-refj.info-8 gauche-refj.info-9 gauche-refj.info-10 gauche-refj.info-11 ~/.emacs.d/info/
※ makeinfo が入ってなかったら、
$ sudo apt install texinfo
Emacs Lisp 日本語 info の作製
elisp-ja用のinfoディレクトリ作る
$ mkdir ~/.emacs.d/info/elisp-ja
$ cd ~/.emacs.d/info/elisp-ja/
elisp-ja-manual の 21-2-8 をダウンロード
utf-8に変換
$ find -name '*.texi' | xargs nkf -w --overwrite
パッチを当てる
$ find -name "*.texi" | xargs sed -i -e "s/\(@xref{.*}\)/\1./g; \
s/@sc{\(.*\)}/@sc{\L\1\E}/; \
s/@sc{ASCII}/@sc{ascii}/g; \
s/\([^@]\)var{/\1@var{/g; \
s/^var{/@var{/g; \
s/\([^@]\)code{/\1@code{/g"
$ sed -i -e "s/@@mail/(at)mail/g" -e "s/@end ifnottex/@end ifinfo/g" elisp.texi
$ sed -i -e "s/@r{対応する開く文字は{$}である}/@r{対応する開く文字は@samp{$}である}/g" syntax.texi
$ sed -i -e "s/^GNU Emacs マニュアル}。$/GNU Emacs マニュアル}.。/g" modes.texi
$ sed -i -e "s/@deffn Command auto-save-mode arg//; s/^GNU Emacs マニュアル}。$/GNU Emacs マニュアル}.。/g" backups.texi
texi -> info に変換する
$ makeinfo elisp.texi
とここまでやったが、@node の記述が足りないのか。例えば Images というメニューに対応する、node なり anchor なりが存在しない。
結局無理やり変換
$ makeinfo --force elisp.texi
Emacs Lisp 日本語 info はこっちの方がいいかも
優しい Emacs-Lisp 講座 info の作製
↓変更
@setfilename elisplec.info
@settitle Lecture to Emacs Lisp
↓追記(最初の@nodeより上に
@dircategory Texinfo documentation system
@direntry
* Elisp-lesson: (elisplec). Lecture to Emacs Lisp.
@end direntry
M-x makeinfo-buffer
エラーの出る行の
{ を @{ に
} を @} に
M-x makeinfo-buffer
$ mv elisplec.info ~/.emacs.d/info/
ついでにemacs lisp 24 manual と emacs 24 manual
~/.emacs.d/info/dir の作成
This is the file .../info/dir, which contains the
topmost node of the Info hierarchy, called (dir)Top.
The first time you invoke Info you start off looking at this node.
^_
File: dir, Node: Top This is the top of the INFO tree
* Menu:
Emacs
* Gauche refj: (gauche-refj.info). Gauche ref (Japanese)
* Elisp-ja: (elisp-ja/elisp-ja). Elisp20 日本語マニュアル.
* ELisp Lesson: (elisplec). やさしい Emacs lisp 講座
* Emacs Lisp: (emacs-info/elisp). Emacs Lisp24 Manual.
* Emacs: (emacs-info/emacs). Emacs24 Manual.
dirファイルの最後に改行がないと、C+h i したとき、とっても見づらいので注意。
.emacs の設定
;; -----------------------------------------------------------
;;; Info
;; -----------------------------------------------------------
(require 'info)
(add-to-list 'Info-default-directory-list "~/.emacs.d/info/")
(add-to-list 'Info-default-directory-list "~/.emacs.d/info/emacs-info/")
使ってみる
C+h i
キー |
説明 |
i |
入力された文字列にマッチする見出しを含むノードへ移動 |
, |
直近のiの次の候補 |
I |
入力された文字列にマッチする見出しをメニュー形式で表示する |
s |
info内を正規表現検索する |
参考
最終更新:2018年01月09日 00:47