[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
goto-char with set-buffer operations take only effect when buffer is not
From: |
Dieter Wilhelm |
Subject: |
goto-char with set-buffer operations take only effect when buffer is not visible! |
Date: |
Sat, 09 Dec 2006 20:32:52 +0100 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.91 (gnu/linux) |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- goto-char with set-buffer operations take only effect when buffer is not visible!,
Dieter Wilhelm <=