[Bug: 21.5-b29] point moved in dired when visiting file with local vars
sperber at deinprogramm.de
Tue Oct 27 07:09:18 EDT 2009
Mike Kupfer <mike.kupfer at xemacs.org> writes:
> MikeS> Here's what happens:
> MikeS> - Ideally, the window's point marker should reflect the last
> MikeS> point position when the current buffer is switched ...
> MikeS> - but it doesn't, namely the window position is the position of
> MikeS> the first file, not the second in your test.
> MikeS> - The `current-window-configuration' used when asking the
> MikeS> question looks at the incorrect window point, and later
> MikeS> restores it.
> MikeS> The attached patch fixes it, but it seems awfully invasive, so
> MikeS> I'm holding off pushing it. Comments welcome!
> Hmm. I see that set_buffer_internal() is unchanged since 21.4.22 (which
> doesn't exhibit the failure).
> Would point normally be in the local variable list for the buffer? I
> see that there is code in set_buffer_internal() to sync the Lisp and C
> values of buffer-local variables. Could that be broken?
No, the point is not a buffer-local variable in the Lisp sense of the
world. It's a field in the data structure representing the buffer.
> It seemed odd to me that the old buffer's variables would get
> synchronized after setting current_buffer, but moving that code to come
> before setting current_buffer doesn't seem to fix anything.
Right. The whole idea of special-casing point movement to affect the
window point seems bad design, but I think we're stuck with it.
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla
More information about the XEmacs-Patches