all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Jorgen Schäfer" <jorgen.schaefer@gmail.com>
Cc: 23098@debbugs.gnu.org
Subject: bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window
Date: Thu, 24 Mar 2016 18:38:12 +0200	[thread overview]
Message-ID: <83y49725mz.fsf@gnu.org> (raw)
In-Reply-To: <CALqDrSdksWUz35oL47GX66YLRmw1pq+-CBfp80RSPTF4-0gyVQ@mail.gmail.com> (message from Jorgen Schäfer on Thu, 24 Mar 2016 16:27:53 +0000)

> From: Jorgen Schäfer <jorgen.schaefer@gmail.com>
> Date: Thu, 24 Mar 2016 16:27:53 +0000
> Cc: 23098@debbugs.gnu.org
> 
> > If you do the above, do you still get the cursor recentered in the
> > window?
> 
> Hm. That seems to work.

OK, so at least we see the same behavior.

> I was using let-binding around recenter, which does not work.

Indeed, it won't work because the value of scroll-conservatively needs
to be seen by redisplay, which runs after the code of the test case
finishes execution.  You could try let-binding it around a call to
'redisplay', but that's probably gross.

>  Even resetting
> scroll-conservatively after the call to recenter will exhibit the bug again. So setting scroll-conservatively is a
> possible workaround, although it means that *all* scrolling will be affected by scroll-conservatively. E.g.
> scrolling through the backlog of a M-x shell session would be affected, even though it just should affect the
> scrolling when the last line of the buffer is visible at all.

Well, setting scroll-conservatively is the only way in Emacs to
reliably avoid recentering of point in all kinds of corner cases.  So
if you cannot use that setting, I'm afraid I'm out of ideas.

Thanks.





  reply	other threads:[~2016-03-24 16:38 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-03-23 18:40 bug#23098: 25.0.92; (recenter -1) can leave point in the middle of the window Jorgen Schaefer
2016-03-23 19:18 ` Eli Zaretskii
2016-03-23 19:40   ` Jorgen Schäfer
2016-03-23 20:22     ` Eli Zaretskii
2016-03-24  8:12       ` Jorgen Schäfer
2016-03-24 15:47         ` Eli Zaretskii
2016-03-24 16:27           ` Jorgen Schäfer
2016-03-24 16:38             ` Eli Zaretskii [this message]
2016-03-26 23:27     ` John Wiegley
2016-03-27  8:35       ` Andreas Schwab
2016-03-27 15:07         ` Drew Adams
2016-03-28 13:10       ` Jorgen Schäfer
2016-03-28 17:28         ` Eli Zaretskii
2016-03-28 17:41           ` Jorgen Schäfer
2016-03-28 17:59             ` 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=83y49725mz.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=23098@debbugs.gnu.org \
    --cc=jorgen.schaefer@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.