bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#4041: 23.0.92; Emacs 23: buffer point is no longer frame-local


From: martin rudalics
Subject: bug#4041: 23.0.92; Emacs 23: buffer point is no longer frame-local
Date: Sat, 17 Sep 2011 10:43:26 +0200
User-agent: Thunderbird 2.0.0.21 (Windows/20090302)

>> 1) emacs -q  (with non-nil window-system)
>> 2) find-file /usr/share/dict/words
>>    - any file longer than ~3x the frame height should serve to demonstrate
>>    - in remaining steps I'll call this file buffer BUF
>> 3) (goto-char (/ (point-max) 2))
>> 4) (new-frame)
>> 5) (other-frame)  ; if necessary to put point in new frame
>> 6) switch to buffer BUF
>> 7) (goto-char (point-min))
>> 8) switch to buffer *scratch* (or any other buffer)
>> 9) switch to buffer BUF
>>
>> Observe that point has returned to (/ (point-max) 2).
>
> I can confirm that this behaviour is still present in Emacs 24.
>
> And it seems like an unfortunate behaviour.  How difficult would it be
> to stash window-point (I guess) on a per-frame basis?  Frame-local
> variables are being phased out, but it seems like this would be nice to
> have.

Even if you had such a feature it would not DTRT with multiple windows
showing the same buffer on the same frame.  But if, in step (9) above,
you do `previous-buffer' or `switch-to-prev-buffer', the window's point
should show up at `point-min'.  `switch-to-buffer' could, in principle,
retrieve that position by scanning `window-prev-buffers' of that window.

martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]