[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
[MD:6754] grep-mode and fakecygpty
- X-ml-count: 6754
- Subject: [MD:6754] grep-mode and fakecygpty
- From: Kyotaro HORIGUCHI <horiguti@xxxxxxxxxxx>
- Date: Fri, 02 Sep 2005 00:14:01 +0900 (JST)
- User-agent: Mew version 4.2.53 on Emacs 22.0 / Mule 5.0 (榊) / Meadow-3.00-dev (菊)
堀口です. これもどうしたらよいか微妙ですが . とりあえずメモ.
trunk/3828 で M-x grep が動かなくなりました. fakecygpty 上の
bash が速攻で終了してしまいます.
grep.el の grep-mode の定義で以下のものが追加されたのが原因でした.
== grep.el
| @@ -531,6 +531,9 @@
| grep-hit-face)
| (set (make-local-variable 'compilation-error-regexp-alist)
| grep-regexp-alist)
| + (set (make-local-variable 'compilation-process-setup-function)
| + 'grep-process-setup)
| + (set (make-local-variable 'compilation-disable-input) t)
| ;; Set `font-lock-lines-before' to 0 to not refontify the previous
| ;; line where grep markers may be already removed.
| (set (make-local-variable 'font-lock-lines-before) 0))
compilation-disable-input の説明は以下のとおり.
| *If non-nil, send end-of-file as compilation process input.
なにやらこんなことをされれば終了するのも正しいように見えるのです
が.. (Windows 以外ではどうなんでしょうか..)
これは compilation-start () の中で以下のように行われています.
| (when compilation-disable-input
| (process-send-eof proc))
process-send-eof () の info は
| If process is a network connection, or is a process communicating
| through a pipe (as opposed to a pty), then you cannot send any more
| text to process after you call this function.
ということなのでgrep のプロセスの使い方や, eofを送る意図から考え
て, grep-mode のプロセスの結合タイプを pipe にすべきなのかと思いま
す.
== grep.el
| @@ -531,6 +531,9 @@
| grep-hit-face)
| (set (make-local-variable 'compilation-error-regexp-alist)
| grep-regexp-alist)
| (set (make-local-variable 'compilation-process-setup-function)
| 'grep-process-setup)
| (set (make-local-variable 'compilation-disable-input) t)
+ (set (make-local-variable 'process-connection-type) nil)
| ;; Set `font-lock-lines-before' to 0 to not refontify the previous
| ;; line where grep markers may be already removed.
| (set (make-local-variable 'font-lock-lines-before) 0))
こうすれば意味的にも正しそうですし, fakecygpty を使う設定にしてい
ても正しく動作します.
--
ほりぐちきょうたろう