[Top][All Lists]

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

Re: goto-char doesn't stick

From: Elias Mårtenson
Subject: Re: goto-char doesn't stick
Date: Wed, 14 Jun 2017 22:59:18 +0800

On 14 Jun 2017 16:33, "Eli Zaretskii" <address@hidden> wrote:
> 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.

Thanks. I'll look at this in a few hours when I get back to the computer. 

However, based on what you told me, it seems as though I need to change some buffer-wide or window-wide setting. Is this correct, or did I misunderstand? 

Ideally, the SLIME fix should not have any impact outside the function in question. 


reply via email to

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