Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ccut!s.u-tokyo!rkna50!nttlab!icot32!kddlab!trl!rdmei!iegva1!creamy!oucom2!tetra02!bon!sana From: sana@news3.t-asted.tis.co.jp (Kazuhiro Sanada) Newsgroups: comp.emacs Subject: Re: front-end-processor Message-ID: Date: 20 Jul 90 00:05:02 GMT References: Sender: news@bon.t-asted.tis.co.jp Distribution: comp.emacs Organization: Toyo Information Systems Co., Tokyo, Japan. Lines: 60 In-reply-to: sana@news3.t-asted.tis.co.jp's message of 11 Jul 90 23:44:51 GMT I'm Kaz, I found the way to load a executable module under emacs environment. At first, you can see a sample emacs-lisp program. (defun cat-start () (interactive) (print (setq object-name (start-process "sana-process" "foo-output" "cat" "-n")))) (defun cat-test (arg) (interactive "sInput string: ") (setq newarg (format "%s\n" arg)) (process-send-string "sana-process" newarg)) (defun cat-end () (interactive) (process-send-eof "sana-process")) (defun cat-kill () (interactive) (kill-process "sana-process")) (defun cat-processp () (interactive) (print (processp object-name))) This sample emacs-lisp program plays the following role; prints the string which you entered from the minibuffer with line numbers on the buffer "foo-output". You can start "cat -n" program with "cat-start" function. Every 'defun' needs "interactive" on the top of the definition in order to be called from M-x minibuffer. The process name is "sana-process", while there exists a object name. Please save the object name("start-process" return value) into a proper variable. You can enter a string you like by calling "cat-test". This function promotes your input from the keyboard on the minibuffer line. What you input goes to standard-input because of "process-send-string" function. If you want to finish the process, you should call "cat-end" function. It sends EOF to standard-input, the ending signal to "cat" command. That function depends on "process-send-eof". There is a way to kill the process. The function name is "cat-kill". In that function, "kill-process" kill the process. You can find "cat-processp" function, as the last function description. It has to return t if the process is alive, and nil if dead, but another value may be returned. Indeed it seems to us that there exist some problems, but you can easily make use of that kind of requests. Many thanks to those who helped me. Kazuhiro Sanada sana@news3.t-asted.tis.co.jp