Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!ucsd!sdcsvax!ucsdhub!hp-sdd!hplabs!otter!ange From: ange@otter.hpl.hp.com (Andy Norman) Newsgroups: gnu.emacs Subject: Re: Help: Process Filters Message-ID: <12090008@otter.hpl.hp.com> Date: 6 Mar 89 13:18:54 GMT References: <12090005@otter.hpl.hp.com> Organization: Hewlett-Packard Laboratories, Bristol, UK. Lines: 32 |/ otter:gnu.emacs / ange@otter.hpl.hp.com (Andy Norman) / 7:05 pm Mar 2, 1989 / |Can anyone suggest a better filter that either does what I want in a cleaner |way, or that doesn't suffer from the minibuffer popping up? Well, thanks to several people who have mailed me directly with various solutions. None of them were *exactly* what I was looking for, but out of all the mail I've managed to create the following filter which works a lot better than the last one: (defun my-process-filter (proc str) (let ((cur (current-buffer)) (pop-up-windows t)) (pop-to-buffer my-shell-buffer) (goto-char (point-max)) (insert str) (set-marker (process-mark proc) (point-max)) (or (eq cur my-shell-buffer) (other-window 1)))) This filter, when attached to a process will pop up a window onto the process, and constantly show the most recent output from the process. It however suffers from at least 1 bug: If the screen is split *horizontally* and I am currently sitting in the minibuffer window, the cursor is yanked away from the minibuffer window to another window. This doesn't happen when the screen is split *vertically*. Any suggestions on how to cure this anomaly, or how to create a better filter will be very gratefully accepted. -- ange --