Emacsから外部プログラムを起動して標準入力でバッファの内容を渡す
id:Yoshioriに質問されて、それ前にやったことあるけど何だったかなぁと検索して見つけたので今後見つけやすくするためにリンク。
http://www.nishiohirokazu.org/blog/2006/12/grineditmeadow.html
(defvar GRINEDITPY "c:\\meadow\\grinedit_modVertex.py" "*The command to send query to grinedit") (defun grinedit () (interactive) (call-process-region (point-min) (point-max) GRINEDITPY)) (define-key global-map "\C-cg" 'grinedit)
ようはgrinedit_modVertex.pyを起動し、バッファの最初から最後までを標準入力に流し込んでいるわけです