unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* goto-char with set-buffer operations take only effect when buffer is not visible!
@ 2006-12-09 19:32 Dieter Wilhelm
  0 siblings, 0 replies; 5+ messages in thread
From: Dieter Wilhelm @ 2006-12-09 19:32 UTC (permalink / raw)



Hi

I catch the output from a program which runs under `start-process' in
a buffer called *Ansys*.  I'd like to have that the buffer scrolls
always to the end of the latest output (like tail -f).  This works
automatically when the cursor in this buffer is below the current
output.  Then I can work in a certain buffer and see the output scroll
by in the neighbouring *Ansys* buffer. 

Unfortunately when the process is created the cursor is not at the end
of the output but remains at (point-min).  So I wrote this snippet:

  (let ((cb (buffer-name)))
    (set-buffer "*Ansys*")	       ;make buffer scroll with output
    (goto-char (point-max))
    (set-buffer cb))

To my astonishment this works only when the buffer *Ansys* is not
visible!  When the buffer is visible and I call this snippet in
another one the cursor in *Ansys* won't budge a single character.

This seems like a bug to me, isn't it?

-- 
    Best wishes

    H. Dieter Wilhelm
    Darmstadt, Germany

^ permalink raw reply	[flat|nested] 5+ messages in thread
[parent not found: <mailman.1701.1165697627.2155.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2006-12-10 15:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-09 19:32 goto-char with set-buffer operations take only effect when buffer is not visible! Dieter Wilhelm
     [not found] <mailman.1701.1165697627.2155.help-gnu-emacs@gnu.org>
2006-12-09 21:51 ` Markus Triska
2006-12-10 15:57   ` Dieter Wilhelm
2006-12-10 14:01 ` Johan Bockgård
2006-12-10 15:52   ` Dieter Wilhelm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).