fenrirからxyzzyでGrep(その2)
しょぼしょぼすくりぷとさんの奴をそのまま使うと、パターンもコマンドラインから指定する前提なので、普通に書かずに少し工夫してfenrirから呼び出すとか。まず適当にfooを自分の分かりやすい名前に変更してxyzzyの.xyzzyかsiteint.lとかに書いておく。
(defun my-xyzzy-grep () (require "grepd") (let (b) (unwind-protect (save-excursion (when si:*command-line-args* (setq b (create-new-buffer "foo")) (set-buffer b) (insert (pop si:*command-line-args*)) (selection-whole-buffer)) (let ((ed::*grep-directory-name-hook* #'(lambda () (pop si:*command-line-args*)))) (declare (special ed::*grep-directory-name-hook*)) (grep-dialog))) (and b (delete-buffer b)))))
でfenrirの方は
[.\\\; xyzzyGrep|C:\xyzzy\xyzzycli.exe -f my-xyzzy-grep "" "%P" ]
とかいう風に空の""を入れるのはパラメータ部分を適当にパスするよう。
スクリプトはここの
起動引数(しょぼしょぼすくりぷと xyzzy)
http://www2.ocn.ne.jp/~cheerful/script/xyzzy/textEditor/runArgument.html
■追記
ちょっと、使ってみたら、何かGrepの結果をF10で移動が出来ない感じ。Window分割が綺麗にされない感じ。どうやら前に書いたfenrir-to-filerに色々問題があるらしい予感。