[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
New Command is not work on M-x Shell
- X-ml-count: 7202
- Subject: New Command is not work on M-x Shell
- From: Toru Ito <toru.ito.aa@xxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 11 Dec 2006 11:43:47 +0900
- User-agent: Wanderlust/2.14.0 (Africa) SEMI/1.14.6 (丸岡) FLIM/1.14.8 (四条) APEL/10.6 Emacs/22.0.50 (i386-mingw-nt5.1.2600) MULE/5.0 (賢木) Meadow/3.00-dev (KIKU)
こんにちは 伊藤@豊田織機 です。
お世話になっております。
1. 状況としましてはM-x shellで立ち上げたtcsh上のコマンドを修正すると
上手く動作しなくて困っています。
2. 環境はUser-Agent:の環境(Windows XPSP2)でMeadow-3.00-r4162-1を使わ
せて頂いております。
3. shellはtcshで.emacsにで関係ありそうなのは以下の通りです。
--------------------------------------------------------------------
;; .tcshrcがなぜかMeadowで開くと初回必ず失敗していた。.tcshrcに
;; #!/usr/local/bin/tcsh(#!tcshとかでもok)を入れかつ以下の設定を行ったら、一
;; 発で開ける様になった。
(setq interpreter-mode-alist
(append '(
("tcsh" . sh-mode)
; ("sh" . fundamental-mode)
; ("bash" . fundamental-mode)
)
interpreter-mode-alist))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; shell command option
;; 補完: TAB
;; ヒストリ: M-p、M-n
;; tcsh
(setq explicit-shell-file-name "tcsh")
(setq shell-file-name "tcsh")
(setq shell-command-switch "-c")
;; bash
;(setq explicit-shell-file-name "bash")
;(setq shell-file-name "bash")
;(setq shell-command-switch "-c")
;; d:/やe:/でのpathの補完が出来る様になる
;; (またはshell-resync-dirsでもok)
(setq shell-file-name-chars "~/A-Za-z0-9_^$!#%&{}@`'.,:()-")
;; 補完の効くM-!(meadow/?.??/site-lisp)
; C-u M-! ls RET としてみると結果がカレントバッファに挿入されます。
(require 'shell-command)
;; スクリプトを emacs から実行するための設定
(require 'mw32script)
(mw32script-init)
--------------------------------------------------------------------
4.Cygwin
Cygwinは1.5.21-1を使ってます。ちなみに、M-x shellで見ると…
Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
LoomLayout100> cygcheck tcsh
Found: C:\bin\tcsh.exe
C:/bin/tcsh.exe
C:\bin\cygwin1.dll
C:\WINDOWS\system32\ADVAPI32.DLL
C:\WINDOWS\system32\ntdll.dll
C:\WINDOWS\system32\KERNEL32.dll
C:\WINDOWS\system32\RPCRT4.dll
LoomLayout100> tcsh --version
tcsh 6.14.00 (Astron) 2005-03-25 (i386-intel-posix) options 8b,nls,dl,al,kan,rh,color,dspm
LoomLayout100>
となってました。
5. 状況
具体的な異常の状況は次の通りです。
a) M-x shellします。
Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
LoomLayout100>
な具合に立ち上がります。
b) grepします。
Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
LoomLayout100> grep ZoomIn * ←打ち込んだコマンド
layout.cpp:int CLayout2::ZoomIn(
な具合にちゃんと機能します。
c) カーソルを移動して最初に入力した"grep ZoomIn *"の文字列をリー
ジョン(C-space C-e)指定してコピー(M-w)します。
下に移動してLoomLayout100>でC-yで吐き出し、"In"を"Out"に書き換
えます。
Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
LoomLayout100> grep ZoomIn *
layout.cpp:int CLayout2::ZoomIn(
LoomLayout100> grep ZoomOut * ←上のコマンドをマルマルコピーして作ったコマンド
layout.cpp:int CLayout2::ZoomOut(
LoomLayout100>
問題なく、新しく生成したコマンドで検索されます。
d) ところが…
カーソルを1番最初の"grep ZoomIn *"に移動させ"ZoomIn *"以降のみ
先ほど同様リージョン指定してからM-wでコピーします。
次にカーソルを2番目に入力した"grep ZoomOut *"の行の "Z"に移動し
ここにC-yで"ZoomOut *"を吐き出します。
LoomLayout100> grep ZoomIn *ZoomOut *
"ZoomOut *"は不要なのでC-kで消し、Enterします。
Warning: no access to tty (Bad file descriptor).
Thus no job control in this shell.
LoomLayout100> grep ZoomIn *
layout.cpp:int CLayout2::ZoomIn(
LoomLayout100> grep ZoomIn *
layout.cpp:int CLayout2::ZoomOut(
LoomLayout100>
LoomLayout100> ★ここ
となってしまいます。
以前のMeadowでは新しく修正した"grep ZoomIn *"が実行されていまし
た。
e) しかも直後に!!してみると…
LoomLayout100> grep ZoomIn *
layout.cpp:int CLayout2::ZoomOut(
LoomLayout100>
LoomLayout100> !!
grep ZoomOut * ←★ここ
layout.cpp:int CLayout2::ZoomOut(
LoomLayout100>
となっており、修正して作った"grep ZoomIn *"のコマンドは無視(?)さ
れちゃってます。
その他にも妙な動きがあり、どうも過去のコマンドを修正して実行させ様と
した場合、上手く動かない時がある様に思います。
#全て手書き修正なら良さそう?
#修正のための文字列をコピペで持って来て合成して作ると×っぽい
以上の様な状況ですが、対策(以前のshellの様な動き)方法などありますでしょ
うか?
長文で申し訳ありませんが、宜しくご教示頂ければ幸いです。
_ _ TOYOTA INDUSTRIES CORPORATION
/_/_(_) Toru Ito
/_/ Office mailto:toru.ito.aa@xxxxxxxxxxxxxxxxxxxxxxxx