emacs-devel
[Top][All Lists]
Advanced

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

Re: goto-char doesn't stick


From: Eli Zaretskii
Subject: Re: goto-char doesn't stick
Date: Wed, 14 Jun 2017 17:33:04 +0300

> From: Elias Mårtenson <address@hidden>
> Date: Wed, 14 Jun 2017 19:16:42 +0800
> Cc: emacs-devel <address@hidden>
> 
>  It's a feature, new in Emacs 26. If you don't like it, turn off
>  switch-to-buffer-preserve-window-point.
>  Perhaps we should have a let-bindable variable to momentsrily disable this.
> 
> Thanks. I think a variable for this would be great. That would make the SLIME 
> fix reasonably small. 

Actually, I think a let-binding would be only rarely useful, since in
most similar cases point is restored after all your forms already
returned, and Emacs is restoring the window's buffer to its previous
value as part of its main loop.

Instead, I think you can prevent point from being restored as in your
use case by filtering the offending buffer from the window's
prev-buffers list, by using window-prev-buffers and
set-window-prev-buffers as part of the Lisp code which moves point in
that buffer.



reply via email to

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