From: Eli Zaretskii <eliz@gnu.org>
To: Alan Mackenzie <acm@muc.de>
Cc: emacs-devel@gnu.org
Subject: Re: "... the window start at a meaningless point within a line."
Date: Thu, 01 Oct 2015 15:03:09 +0300 [thread overview]
Message-ID: <83egheaj9e.fsf@gnu.org> (raw)
In-Reply-To: <20151001110204.GB2515@acm.fritz.box>
> Date: Thu, 1 Oct 2015 11:02:04 +0000
> Cc: emacs-devel@gnu.org
> From: Alan Mackenzie <acm@muc.de>
>
> > The display engine always starts from the physical BOL when it lays
> > out buffer text. That's because only at a physical BOL it knows that
> > the window-relative X coordinate is zero. Otherwise, there's no
> > anchor for it to start at.
>
> OK, so such a change would be, at least somewhat, non-trivial. Could the
> supplied window start position, as in (set-window-start line-middle-pos
> nil t), not count as such an anchor?
It cannot act as an anchor, because the horizontal X coordinate is not
(and cannot be) known by the caller.
> > Invalidating this basic assumption will cause strange effects,
> > including the horizontal scrolling I mentioned.
>
> This horizontal scrolling (of a long line at the top of W3, when a
> scroll-down brings the beginning of the line onto the window) would be
> precisely what's wanted here.
Then go ahead and make the change. The display engine will cope. I'm
not sure what users will say, but that's not my problem here ;-)
> > > In the worst case, very difficult. Indeed, with three follow windows,
> > > all of slightly different widths, and a fiendish specially constructed
> > > file, it could be that when you scroll the buffer a single screen line to
> > > deal with a break between W1 and W2, you create the same problem between
> > > W2 and W3. In such a scenario, you might end up scrolling the buffer
> > > quite a long way in the search for no "broken" continued lines at either
> > > boundary. With such a file there might be NO position where there isn't
> > > a break.
>
> > Are you talking about lines so long that they take more than one
> > window-full to display? If so, let's not bother about those for the
> > moment. Do you see such problem with reasonably short lines?
>
> No, I was just thinking of ordinary 100 character lines in ordinary
> windows.
Then I don't see the problem. yes, you will need to scroll several
lines, but why is that a problem?
> Let me outline the problem I saw: I have a command `scrolldown-n', bound
> to S-<up>. With point in W3, S-<up> was failing to scroll the screen.
> The cause was the split line making (window-end W2) different from
> (window-start W3), which messed up Follow Mode's window alignment
> routines.
I understood. If you never break in the middle of a continued line,
this should not happen.
> Another (lesser) problem is moving point from W2 to W3 with C-x o
> sometimes causes W1 and W2 to scroll up one line; this has the same
> cause. It is suboptimal.
IIUC, you will not be able to fix this. Changes near the boundary
between 2 windows will always be likely to cause some scrolling like
that.
> > > If we were to go this route (of repositioning to avoid line breaks
> > > between follow windows), there would have to be a limit on how far one
> > > could scroll, with a value such as 3.
>
> > In what units? Screen lines? Why only 3?
>
> Yes, 3 screen lines. With a command like `scrolldown-n', or C-u 1
> <PageUp>, the user is requesting a single line scroll. Scrolling more
> than this, even 2 or 3 lines, would be puzzling and irritating.
Not sure if horizontal scrolling will be more or less irritating, but
I guess we will find out soon.
next prev parent reply other threads:[~2015-10-01 12:03 UTC|newest]
Thread overview: 57+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-30 20:45 "... the window start at a meaningless point within a line." Alan Mackenzie
2015-10-01 8:48 ` Eli Zaretskii
2015-10-01 9:41 ` Alan Mackenzie
2015-10-01 10:16 ` Eli Zaretskii
2015-10-01 11:02 ` Alan Mackenzie
2015-10-01 12:03 ` Eli Zaretskii [this message]
2015-10-01 16:35 ` Alan Mackenzie
2015-10-15 18:16 ` Alan Mackenzie
2015-10-15 20:14 ` Eli Zaretskii
2015-10-16 9:55 ` Alan Mackenzie
2015-10-16 10:19 ` Eli Zaretskii
2015-10-16 15:19 ` Alan Mackenzie
2015-10-16 17:26 ` Eli Zaretskii
2015-10-16 20:46 ` David Kastrup
2015-10-17 7:15 ` Eli Zaretskii
2015-10-17 7:56 ` David Kastrup
2015-10-16 21:14 ` Alan Mackenzie
2015-10-16 17:35 ` Eli Zaretskii
2015-10-16 18:12 ` Alan Mackenzie
2015-10-16 18:23 ` Eli Zaretskii
2015-10-16 18:36 ` Eli Zaretskii
2015-10-16 20:12 ` Alan Mackenzie
2015-10-17 8:33 ` Eli Zaretskii
2015-10-17 11:57 ` Alan Mackenzie
2015-10-17 12:34 ` Eli Zaretskii
2015-10-17 13:31 ` Eli Zaretskii
2015-10-17 14:22 ` Eli Zaretskii
2015-10-18 15:00 ` Alan Mackenzie
2015-10-18 17:44 ` Eli Zaretskii
2015-10-19 10:27 ` Alan Mackenzie
2015-10-27 13:40 ` Alan Mackenzie
2015-10-27 17:35 ` Alan Mackenzie
2015-10-27 18:33 ` Eli Zaretskii
2015-10-27 18:23 ` Eli Zaretskii
2015-10-28 8:58 ` Alan Mackenzie
2015-10-28 13:15 ` Alan Mackenzie
2015-10-31 13:21 ` Eli Zaretskii
2015-10-31 21:17 ` Alan Mackenzie
2015-11-01 3:40 ` Eli Zaretskii
2015-11-01 14:45 ` Alan Mackenzie
2015-11-01 15:23 ` Alan Mackenzie
2015-11-01 17:45 ` Eli Zaretskii
2015-11-01 18:07 ` Eli Zaretskii
2015-11-01 18:46 ` Alan Mackenzie
2015-10-18 14:53 ` Alan Mackenzie
2015-10-18 17:46 ` Eli Zaretskii
2015-10-19 10:45 ` Alan Mackenzie
2015-10-19 10:56 ` Eli Zaretskii
2015-10-19 11:24 ` Alan Mackenzie
2015-10-19 11:28 ` Eli Zaretskii
2015-10-19 12:02 ` Alan Mackenzie
2015-10-19 12:33 ` Eli Zaretskii
2015-10-19 13:11 ` Alan Mackenzie
2015-10-19 13:27 ` Eli Zaretskii
2015-10-19 19:15 ` Alan Mackenzie
2015-10-27 13:46 ` Alan Mackenzie
2015-10-17 15:30 ` Alan Mackenzie
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=83egheaj9e.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=acm@muc.de \
--cc=emacs-devel@gnu.org \
/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.