unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Tak Kunihiro <tkk@misasa.okayama-u.ac.jp>
To: Eli Zaretskii <eliz@gnu.org>
Cc: Kunihiro Tak <tkk@misasa.okayama-u.ac.jp>, 26347@debbugs.gnu.org
Subject: bug#26347: patch for mwheel.el
Date: Tue, 4 Apr 2017 09:55:01 +0900	[thread overview]
Message-ID: <7CB47036-03AE-4C5B-9E14-3D84A6C4C757@misasa.okayama-u.ac.jp> (raw)
In-Reply-To: <83mvbxpmdb.fsf@gnu.org>

>> During not only horizontal scroll but also vertical scroll,
>> `auto-hscroll-mode' should be disabled by following three aspects.
>> 
>> (1) It should be off during horizontal scroll.  If it is on, scope
>>    jumps randomly when point is at the edge.  Also, since
>>    horizontal scroll does not move point, there will be
>>    inconsistency between point and scope, and the inconsistency
>>    will result in unexpected shift of the scope.
>> 
>> (2) It should be off during vertical scroll.  When a buffer is with
>>    short and long alternative lines, scope jumps from the end of
>>    long line to the end of short line.  Sudden shift of the scope
>>    makes edition of a wide document hard.
> 
> We don't turn off auto-hscroll-mode when scrolling with the horizontal
> or vertical scroll bars, and we don't have the problems you describe
> in those cases.  Why is this case different?

I see your point in regard to (1).  Yes, if `mwheel-scroll’ can scroll right
or left like horizontal-scroll-bar does, turing off auto-hscroll-mode is not
necessary for case (1).  Give me time to understand code of horizontal-scroll-bar.

In regard to (2), let’s say you have a very long line and your point is at the end
of line in a window.  The next line is short and even the end of line is not shown
in the window.  The third line is very long again.

> date & session & stone & remark & date & session & stone & remark\\
> \hline
> April 4, 2017 & a & b & c & April 4, 2017 & a & b & c\\

When you move vertical-scroll-bar down, eventually the long line disappears
above the top of window.  The point moves to the end of the next short line.
As a consequence, you see scope shifted.  The patch tries to keep the scope to
be the same.  To do so, auto-hscroll-mode was set to off.






  reply	other threads:[~2017-04-04  0:55 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-03 11:11 bug#26347: patch for mwheel.el Tak Kunihiro
2017-04-03 15:00 ` Eli Zaretskii
2017-04-04  0:55   ` Tak Kunihiro [this message]
2017-04-04  2:52     ` Tak Kunihiro
2017-04-04  7:25       ` martin rudalics
2017-04-04 11:35       ` Tak Kunihiro
2017-04-04 14:34         ` Eli Zaretskii
2017-04-04 23:18           ` Tak Kunihiro
2017-04-05  2:36             ` Eli Zaretskii
2017-04-05  3:35               ` Tak Kunihiro
2017-04-11  9:47                 ` Eli Zaretskii
2017-04-11 23:56                   ` Tak Kunihiro
2017-04-12 13:35                     ` 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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7CB47036-03AE-4C5B-9E14-3D84A6C4C757@misasa.okayama-u.ac.jp \
    --to=tkk@misasa.okayama-u.ac.jp \
    --cc=26347@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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).