[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Mimic the window scrolling behavior of *Messages*
From: |
Michael Heerdegen |
Subject: |
Mimic the window scrolling behavior of *Messages* |
Date: |
Tue, 17 Sep 2013 18:29:54 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) |
Hi,
another question for my log mode: I want to mimic the window scrolling
behavior of the *Messages* buffer: In any window *Messages* is displayed
where window point is at eob, window point will stay at the buffer end,
and the buffer is scrolled automatically in that window.
How can I adopt that behavior for my own log mode? Currently, whenever
I insert to my log buffer, I loop over all windows displaying it a
function that moves window point to the buffer end when it was there
before the insertion. This works in general - but not always. It
doesn't work for recursive edits. When I hit M-: foo C-g, for example,
window points are all restored to their values before the M-:. After
that, the thing doesn't work anymore, because window point is not at eob
anymore.
If I set `window-point-insertion-type' to t, it _does_ work, however.
But I can't set the global value in my package. Using
`window-point-insertion-type' as a buffer local variable doesn't work,
however, as well as let-binding it. In my experience,
`window-point-insertion-type' must be t in the current buffer (not in
the log buffer) to get what I want.
I'm thankful for any hints!
Regards,
Michael.
- Mimic the window scrolling behavior of *Messages*,
Michael Heerdegen <=