[comp.emacs] more on asynchronous processes ...

tale@pawl.rpi.edu (Dave Lawrence, in the name of conformity) (01/18/89)

Okay, many things were improved as far as minibuffer interaction by
wrapping most of my function in a save excursion ... however, the last
bit is still a wee bit wrong.  What I have is something very similar
to the last (if ...) of telnet-filter.  It moves point if and only if
the current-buffer is also the process-buffer.  This is fine 90% of
the time.  But when I'm in the minibuffer or any other regular buffer
and then I switch back to the process-buffer, (point) is not where it
should be.   It got saved in the save-excursion and didn't move
because process-buffer wasn't the process-buffer.  What I would like
is a "move-point-other-buffer" function which accepted arguments of
BUFFER and POSition and had the effect of setting point in the named
buffer, such that when you returned to the buffer it would be at the
new point.  

I tried something like this in lisp-interaction buffer *scratch*,
while buffer "emacs" was also visible on the screen.  I was in the
middle of "emacs", switched to "*scratch*" and eval'ed this:

(let ((cur-buffer (current-buffer)))
  (set-buffer (get-buffer "emacs"))
  (goto-char (point-max))
  (set-buffer cur-buffer))

and it dutifully responded:

#<buffer *scratch*>

So I other-window'ed back to "emacs" and (point) was unchanged.  Nvts.

How can I accomplish what I want?  A marker doesn't appear to be the
answer.  But is there a way to push a value for point on to the stack
that save-excursion would pop to?  That doesn't sound like a good idea
unless each buffer has it's own mark/point stacks.  
 
Help, please.
 
As an aside, I have written extension to dired for mv'ing and ln'ing
files in dired mode, if anyone is interested.  Nothing special, but I
use them frequently enough that I found them useful.  There are also
some useful bindings in my .emacs for the VT100 keypad (more extensive
than in $EMACS/lisp/term/vt100.el) and a kill-entire-line function
that wipes out the entire line that point is on or following lines
with ARG, previous line with negative ARG.  I use that VERY
frequently.   
 
Thanks in advance for help on this.
 
Dave
--
      tale@rpitsmts.bitnet, tale%mts@rpitsgw.rpi.edu, tale@pawl.rpi.edu