From: Alex <agrambot@gmail.com>
To: "Elias Mårtenson" <lokedhs@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel <emacs-devel@gnu.org>
Subject: Re: goto-char doesn't stick
Date: Wed, 14 Jun 2017 21:53:16 -0600 [thread overview]
Message-ID: <87lgotrjo3.fsf@lylat> (raw)
In-Reply-To: <CADtN0WLYYK8_y92PUv=6RnbntQbhDv3DWKCKetb+Yt9Vy4wDtw@mail.gmail.com> ("Elias \=\?utf-8\?Q\?M\=C3\=A5rtenson\=22's\?\= message of "Wed, 14 Jun 2017 22:59:18 +0800")
Elias Mårtenson <lokedhs@gmail.com> writes:
> On 14 Jun 2017 16:33, "Eli Zaretskii" <eliz@gnu.org> wrote:
>
> > From: Elias Mårtenson <lokedhs@gmail.com>
> > Date: Wed, 14 Jun 2017 19:16:42 +0800
> > Cc: emacs-devel <emacs-devel@gnu.org>
> >
> > 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.
next prev parent reply other threads:[~2017-06-15 3:53 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-14 9:45 goto-char doesn't stick Elias Mårtenson
2017-06-14 9:48 ` Andreas Schwab
2017-06-14 10:02 ` Elias Mårtenson
2017-06-14 10:29 ` Andreas Schwab
2017-06-14 10:32 ` Elias Mårtenson
2017-06-14 11:01 ` Yuri Khan
[not found] ` <CADtN0WJdwdFhTL2_=ZQbADKT0p+PKCJKfkjqt7hNdQduq5bmCQ@mail.gmail.com>
2017-06-14 11:09 ` Elias Mårtenson
2017-06-14 10:22 ` Peder O. Klingenberg
2017-06-14 10:26 ` Noam Postavsky
2017-06-14 10:30 ` Elias Mårtenson
2017-06-14 11:13 ` Eli Zaretskii
2017-06-14 11:16 ` Elias Mårtenson
2017-06-14 14:33 ` Eli Zaretskii
2017-06-14 14:59 ` Elias Mårtenson
2017-06-14 15:28 ` Eli Zaretskii
2017-06-15 3:53 ` Alex [this message]
2017-06-14 14:05 ` Drew Adams
2017-06-14 14:53 ` Eli Zaretskii
2017-06-15 6:59 ` Stefan Monnier
2017-06-15 11:37 ` Noam Postavsky
2017-06-15 12:55 ` martin rudalics
2017-06-15 13:24 ` Stefan Monnier
2017-06-15 14:30 ` Eli Zaretskii
2017-06-15 17:11 ` Stefan Monnier
2017-06-15 18:25 ` Eli Zaretskii
2017-06-15 19:10 ` Elias Mårtenson
2017-06-15 19:25 ` Eli Zaretskii
2017-06-15 22:51 ` martin rudalics
2017-06-16 2:00 ` Stefan Monnier
2017-06-15 14:32 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87lgotrjo3.fsf@lylat \
--to=agrambot@gmail.com \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=lokedhs@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.