[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
[MD:521]call-process when using argument-editing
- X-ml-count: 521
- Subject: [MD:521]call-process when using argument-editing
- From: Miyashita Hisashi(宮下 尚:HIMI) <himi@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: 24 Feb 1998 20:47:00 +0900
- X-mailer: Semi-gnus 6.0.4 (based on Quassia Gnus v0.23)
だーれも、答えないなぁ。^^;;;
Tatsuya Ichikawa <ichikawa@xxxxxxxxxxxxxx> writes:
> Develop ネタかどうか迷ったんですが...
users-jpにも振ります。
> movemail.exe を試してみようと思い argument-editing を使って
>
> (define-process-argument-editing "/movemail\\.exe\\'"
> (lambda (x) (general-process-argument-editing-function x nil t t nil t t)))
>
> として使うと movemail.exe のプログレスバーが消えた後 Meadow がうんともすん
> とも言わなくなります。
> 上記設定を無くすと元気に動きます。
Argument Editingを知るための最も良い方法
「とにかく試してみよう。」
(define-process-argument-editing "/movemail\\.exe\\'"
(lambda (x) (setq foo
(general-process-argument-editing-function x nil t t nil t t))))
として、fooの中を後から見てみましょう。^^;;;
> で、他に試した事は
>
> (global-set-key "\C-xp" 'print-buffer)
> (setq print-program-name "e:/WinLprt/wlprt32.exe")
> (define-process-argument-editing "/wlprt32\\.exe$"
> (lambda (x)
> (general-process-argument-editing-function x nil t)))
> (defun print-buffer ()
> (interactive)
> (let ((file (buffer-file-name)))
> (cond (file
> (save-excursion
> (save-buffer)
> (call-process print-program-name nil nil nil
> (format "%s" file)))))))
>
> としてみて buffer を印刷しようとしても同様の症状になります。
>
> また、dialup の外部プログラムを
>
> (setq connect-program-argument-alist '(
> "Foo,a,b,c"
> ))
> (define-process-argument-editing "/connect\\.exe\\'"
> (lambda (x) (general-process-argument-editing-function x nil t t nil t t)))
>
> (apply 'call-process "c:/bin/connect.exe" nil nil nil
> connect-program-argument-alist)
> でも同様の症状になります。
> 特に dialup のプログラムの場合 '"' がある、無いでは動作が変わって来てしまい
> ます。
>
> で、argument-editing が分かっていないので質問なんですが
>
> ・なぜこのような現象が起きるのか??
> ・どう言った場合このような状況になるのか??
>
> をお聞きしたいのです。
まさに、テストが、すべてを教えてくれるでしょう。
まあ、それだけではなんだから。
要はArgument Editing ってのは、
argv[] -> 文字列
への変換をするためのものです。
で、文字列 -> argv[]
へ変換するやり方は、アプリケーションごとに違うのが問題です。
1.... 'msvc
MSVCRT?.DLL or LIBC.LIBを用いて、argv[]を取る
VisualC++で開発された、argv[]を用いるアプリケーション
Meadowに付属するすべてのアプリケーションはこれに該当します。
2.... 'cygnus
CYGWIN.DLL を用いて、argv[]を取る
Cygwin32に付属するすべてのアプリケーションはこれに該当します。
3.... nil
自前で文字列をパースする。
Windowsに付属するかなりのアプリケーションはこれに該当します。
from himi