From: Liam Healy

Subject: Re: fi-emacs ignoring output hook on secondary listener

Date: 1998-10-16 11:32

>>>>> "Kevin" == Kevin Layer <franz.com at layer> writes:
>>> One of my programs needs to alter the output from CL, so in fi-emacs I >>> bind fi::subprocess-filter-insert-output-hook to the appropriate elisp >>> function. This works fine in the *common-lisp* buffer started with >>> fi:common-lisp. In a secondary listener *lisp-listener* started with >>> fi:open-lisp-listener, however, it appears to ignore this binding. In >>> fact, I can't see how output gets into the *lisp-listener* buffer >>> at all. >>> >>> fi::subprocess-filter-insert-output-hook is used in the function >>> fi::subprocess-filter-1 in file fi-subproc.el. >>> >>> Anyone have any clue on how to do this? >>> Thanks for any help.
Kevin> There is currently no subprocess filter set for listener buffers Kevin> created with fi:open-lisp-listener, which aren't really tied to Kevin> subprocesses--their buffers are tied to sockets created with Kevin> open-network-stream. Kevin> I don't know if set-process-filter will work on the object returned by Kevin> open-network-stream (we have a wrapper for this function, called Kevin> fi::open-network-stream), since I don't remember having tried it. Kevin> That would be a starting point, though. Kevin> Kevin Layer <Franz.COM at layer> http://www.franz.com/ Kevin> Franz Inc., 1995 University Avenue, Suite 275, Berkeley, CA 94704, USA Kevin> Phone: (510) 548-3600 FAX: (510) 548-8253 Thanks for the pointer; indeed, this works: (setq-default fi::subprocess-filter-insert-output-hook (function (lambda (output marker) (insert (my-function output)) (set-marker marker (point))))) (defadvice fi:open-lisp-listener (around output-filter-on-other-listeners activate) "Secondary listeners will do output processing." (set-process-filter ad-do-it 'fi::subprocess-filter-1) ad-return-value)