ブロックを出力単位にする Emacs 上の grep ツール、blgrep ver.0.2 をリリース。結局、ver. 0.1 は出せなかった Xp。
行指向の grep や occur とケース・バイ・ケースで使い分けて欲しいな。
ブロックの定義は検索対象によって変わるから、ファイルやモードごとにフロントエンドと呼ばれる関数を用意している。例えば outline モード用には blg-outline、ChangeLog ファイル用には blg-changelog、という感じ。現在、用意しているのは次の 5 つのファイル。
- blg-2ch
- 2ch 用 (Emacs-w3m で見る時に...)
- blg-bib
- TeX の Bib ファイル用
- blg-changelog
- ChangeLog ファイル用
- blg-elisp
- EmacsLisp ファイル用
- blg-outline
- Outline ファイル用
- clgrep
- ChangeLog メモ用
blg-2ch 相当の事は navi2ch で出来る。ただ、navi2ch をインストールしたのが、blg-2ch を作った後だったのさ。
ChangeLog メモ用の clgrep は、ver. 0.1rc1 の頃と比べて関数名をかなり変えたので、前からのユーザーさんは気をつけて下さい。
最後にCVS Emacs の NEWS (C-h n) に M-x blg-outline RET utf RET をかけた場合の出力結果をお見せしよう。Emacsの「utf」関連の変更点を一望できる。:
* Changes in Emacs 22.1** A UTF-7 coding system is available in the library `utf-7'.
---
** New language environments: French, Ukrainian, Tajik, Bulgarian, Belarusian, Ukrainian, UTF-8, Windows-1255, Welsh, Latin-6, Latin-7, Lithuanian, Latvian, Swedish, Slovenian, Croatian, Georgian, Italian, Russian, Malayalam, Tamil, Russian, Chinese-EUC-TW. (Set up automatically according to the locale.)
---
** The utf-8/16 coding systems have been enhanced. By default, untranslatable utf-8 sequences are simply composed into single quasi-characters. User option `utf-translate-cjk-mode' (it is turned on by default) arranges to translate many utf-8 CJK character sequences into real Emacs characters in a similar way to the Mule-UCS system. As this loads a fairly big data on demand, people who are not interested in CJK characters may want to customize it to nil. You can augment/amend the CJK translation via hash tables `ucs-mule-cjk-to-unicode' and `ucs-unicode-to-mule-cjk'. The utf-8 coding system now also encodes characters from most of Emacs's one-dimensional internal charsets, specifically the ISO-8859 ones. The utf-16 coding system is affected similarly.
---
** New variable `utf-translate-cjk-unicode-range' controls which Unicode characters to translate in `utf-translate-cjk-mode'.
---
** iso-10646-1 (`Unicode') fonts can be used to display any range of characters encodable by the utf-8 coding system. Just specify the fontset appropriately.
---
** There is support for decoding Greek and Cyrillic characters into either Unicode (the mule-unicode charsets) or the iso-8859 charsets, when possible. The latter are more space-efficient. This is controlled by user option utf-fragment-on-decoding.
+++
** The new variable `x-select-request-type' controls how Emacs requests X selection. The default value is nil, which means that Emacs requests X selection with types COMPOUND_TEXT and UTF8_STRING, and use the more appropriately result.
+++
* Lisp Changes in Emacs 22.1
** New coding system property `mime-text-unsuitable' indicates that the coding system's `mime-charset' is not suitable for MIME text parts, e.g. utf-16.
+++
* Changes in Emacs 21.3
** UTF-16 coding systems are available, encoding the same characters as mule-utf-8.
** There is a new language environment for UTF-8 (set up automatically in UTF-8 locales).
* Lisp changes in Emacs 21.1 (see following page for display-related features)
** The new coding system `mule-utf-8' has been added. It provides limited support for decoding/encoding UTF-8 text. For details, please see the documentation string of this coding system.
No comments:
Post a Comment