From: Stephen Berman <stephen.berman@gmx.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 27008@debbugs.gnu.org
Subject: bug#27008: 26.0.50; auto-hscroll-mode and scroll-left
Date: Sun, 21 May 2017 22:12:27 +0200 [thread overview]
Message-ID: <87inkunf4k.fsf@rosalinde> (raw)
In-Reply-To: <83zie6nsip.fsf@gnu.org> (Eli Zaretskii's message of "Sun, 21 May 2017 18:23:10 +0300")
On Sun, 21 May 2017 18:23:10 +0300 Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Stephen Berman <stephen.berman@gmx.net>
>> Date: Sun, 21 May 2017 16:10:04 +0200
>>
>> When auto-hscroll-mode is set to `current-line' and scroll-left is
>> invoked with arguments ARG > 0 and SET-MINIMUM non-nil, then when the
>> current line is automatically horizontally scrolled, all other lines in
>> the buffer are scrolled back to logical BOL, i.e. SET-MINIMUM is ignored
>> (except on the current line). To reproduce:
>>
>> 0. emacs -Q
>> 1. Set auto-hscroll-mode to `current-line'.
>> 2. Type `C-x C-f /path/to/hscroll-bug RET' (the attached file).
>> 3. Type `M-x toggle-truncate-lines' and `M-: (scroll-left 32 t)'.
>> 4. Type `C-p' repeatedly.
>> => When point is on the third line, and for all subsequent vertical
>> motion, all lines but the current one are displayed starting at BOL
>> instead of column SET-MINIMUM.
>
> I don't understand what you expected instead.
I expected behavior similar to when auto-hscroll-mode is set to t and I
evaluate (scroll-left 32 t): in that case, automatic scrolling still
happens on long enough lines, but the minimum hscroll is respected. So
with auto-hscroll-mode set to `current-line' I expected to get scrolling
of the current line and the rest of the lines would be displayed as if
the window's left edge was at column 32.
> current-line hscrolling
> is designed to be disabled when manual scrolling is used, so using
> scroll-left is incompatible with automatic hscrolling and should have
> disabled it.
Why should current-line hscrolling be different from window hscrolling
in this respect? In other words, since automatic window hscrolling
still works when scroll-left is executed, why shouldn't current-line
hscrolling also work then?
> If anything, I could understand a complaint that the
> current line is still hscrolled in this recipe, but otherwise I think
> your expectations are a tad too much; the effect you describe is more
> or less what I intended to happen.
There is an oddity that I doubt you intended: when point is at the left
window edge of the current line (e.g. via C-a), column-number-mode shows
it at column 0, though this is not displayed, and indeed typing C-n does
not advance point until it reaches column 33 (SET-MINIMUM + 1);
nevertheless, all the other lines are displayed from their respective
BOL, i.e. column 0 (as you point out below). When scrolling vertically
through the buffer with C-p and C-n or the arrow keys, this looks very
strange.
> Technically, the minimum hscroll is implemented by the same code which
> calculates the window's hscroll value upon redisplay, and in
> current-line hscrolling that value affects only the current line, the
> rest of the window is displayed as if the hscroll is zero.
Is this necessary? Why can't the other lines be displayed with hscroll
set to w->min_hscroll, as they are with auto-hscroll-mode set to t?
Steve Berman
next prev parent reply other threads:[~2017-05-21 20:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-21 14:10 bug#27008: 26.0.50; auto-hscroll-mode and scroll-left Stephen Berman
2017-05-21 15:23 ` Eli Zaretskii
2017-05-21 20:12 ` Stephen Berman [this message]
2017-05-30 14:56 ` Eli Zaretskii
2017-05-30 16:57 ` Stephen Berman
2017-05-30 17:18 ` Eli Zaretskii
2017-05-30 17:31 ` Eli Zaretskii
2017-05-30 19:45 ` Stephen Berman
2017-05-31 7:14 ` Eli Zaretskii
2017-05-31 14:18 ` Stephen Berman
2017-05-31 14:39 ` Eli Zaretskii
2017-05-31 16:04 ` 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=87inkunf4k.fsf@rosalinde \
--to=stephen.berman@gmx.net \
--cc=27008@debbugs.gnu.org \
--cc=eliz@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.