[Top][All Lists]

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

Re: goto-char doesn't stick

From: Alex
Subject: Re: goto-char doesn't stick
Date: Wed, 14 Jun 2017 21:53:16 -0600
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Elias Mårtenson <address@hidden> writes:

> 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. 
> Regards, 
> Elias 

Have you tried let-binding switch-to-buffer-preserve-window-point to nil
around the switch-to-buffer call in slime-pop-to-location? It worked for me.

reply via email to

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