From: Larry Troxler

Subject: emacs interface - hook to run elisp functions when ACL prompt is received?

Date: 1999-1-30 21:18

Benjamin Shults wrote:
> Larry Troxler wrote:
> > investigated this, I remember finding some sort of re-centering function > > that I was able to bind to a key, to at least manually shift the prompt > > down to the last line of the buffer, after the output was finished. Now > > I can't even figure out that much (the Xemacs docs are pretty poor).
> > M- - C-l > > I think the docs are great.
Thanks! Somehow I missed in the docs how the recenter function behaves with negative arguments. Actually, what the function that I was thinking of was "comint-show-maximum-output", but now I remember that I was using that in shell-mode with CLISP. I still don't understand why the Xemacs help only helps you with functions that apply to the current mode. Oh well, I guess the docs aren't too bad, in the sense that all the information is there. Maybe it's just the help interface that isn't so intuitive. HOWEVER, I'd like to go the next step now and figure out how to have this done automatically everytime eli detects that the Lisp prompt has been received. But, nothing in the eli HTML doc mentions any kind of hook for this, and a few minutes hunting the eli sources didn't turn up any answers. Furthermore, I remember that someone on this list or somewhere else, saying that in fact, this is the reason that this behavior can't be easily implemented. Is my initial impression correct, that the elisp interface does not detect the end of ACL output (the prompt) as it occurrs? Sorry for being a bit naive about how the emacs socket-interface works. Doing the automatic recentering isn't the only situation where this would be helpfull of course. For example, I started messing around with elisp programming, and found that the following function doesn't work as expected: (defun cm-list-test () (goto-char (point-max)) (insert "list") (fi:inferior-lisp-newline) (recenter -1)) "list" in this case is a command to a custom top-level loop (Taube's Common Music). And what happens of course is that the "list" command is properly sent to ACL, which properly prints the verbose many-line output. But the "recenter" command doesn't work as expected, and I think this is because at the time it is executed, the Lisp output from ACL has not yet been received. Any ideas on the right way to accomplish what I am seeking? Larry -- Larry Troxler -- <westnet.com at lt> -- Patterson, NY USA --