unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: nljlistbox2@gmail.com (N. Jackson)
To: Eli Zaretskii <eliz@gnu.org>
Cc: 16840@debbugs.gnu.org
Subject: bug#16840: 24.3.50; Jerky motion and up/down asymmetry scrolling images in Eww
Date: Sat, 22 Feb 2014 13:15:53 -0400	[thread overview]
Message-ID: <87y513rrue.fsf_-_@moondust.localdomain> (raw)
In-Reply-To: <83eh2v4kx6.fsf@gnu.org> (Eli Zaretskii's message of "Sat, 22 Feb 2014 10:21:41 +0200")

At 04:21 -0400 on Saturday 2014-02-22, Eli Zaretskii wrote:

>> From: nljlistbox2@gmail.com (N. Jackson)
>> Date: Fri, 21 Feb 2014 21:51:47 -0400
>> 
>> With an image taller than the window, scrolling behaviour is jerky and
>> asymmetrical in Eww.
>
> Please provide a URL to such an image, since the exact behavior
> depends on the relative sizes of the image and the default font.

I saw the same general behaviour with all of the few pages I
visited. The one I did my detailed examination on was
http://www.gnu.org/distros/screenshot.html.

> Also, does the behavior you describe happen in "emacs -Q", or do you
> need some non-default customizations to see what you describe?

Yes, with "emacs -Q".

For example this recipe (where the maximize before loading the page is
just to get the image big enough to be taller than the frame (as Eww
(sensibly, I think) resizes images to fit in the frame when it loads a
page). On my machine this makes the image slightly less than twice the
height of the display.

    emacs -Q
    M-x toggle-frame-maximized RET
    M-x eww RET http://www.gnu.org/distros/screenshot.html RET
    M-x toggle-frame-maximized RET

>> Scrolling Downwards with <down>
>> ===============================
>> When scrolling down the page (pressing <down> <down> <down> ...), when
>> the cursor reaches the line above the image, it stops going to the next
>> line. Instead, the image is smoothly scrolled up in to view. I am told
>> that this is the designed behaviour.
>
> Yes, that's the design.
>
>> When the line with the cursor disappears off the top of the window, the
>> cursor jumps to the image. There is a slight jerk when this happens,
>> which might be worth eliminating.
>
> The jerk should bring the top of the image to the top of the window.
> If that is what happens, then that's the intended behavior.

Yes. That's what happens.

If it's the current intended behaviour, then that is what it is. I
raised this bug report to point out that the behaviour I observe is
sub-optimal from a user-experience point of view, Emacs could be better
in this regard. Consider it then, perhaps, as a wishlist item for Emacs
25 or 26!

I myself am a bit ambivalent about this suddenly having images in
Emacs. I'm not sure that I like them, and I'm certain that I don't need
them. However to be able to view web pages within Emacs seems useful,
and in checking out this functionality in Emacs 24.3.50 I noticed the
perceived deficiencies reported, so I reported them, because I believe
that it's hard to improve something when one isn't aware of what might
be wrong with it.

>> At some point (and it's approximately when two lines are visible below
>> the image) the cursor jumps to the line below the image, and, most
>> unfortunately, the window scrolls so that that line is the top line in
>> the window. This results in a huge jerk, and it also means that the
>> image has disappeared before you can read a caption directly below it.
>
> Wasn't the caption visible before the jump?

The first line of it, but if there were a two-line gap instead of a
one-line gap between the image and its caption, it wouldn't be visible.

But if the intended behaviour is that the window should scroll to bring
the line below the image to the top of the window when a line or two
below the image becomes visible, then it is impossible in general with
an imgage taller than the frame to see text below the image that
pertains to it while the image is still in view (unless that text
happens to be only one or two lines long).

> In any case, it's impossible to reason about the described behavior
> without knowing the image size and size of the font used to display
> text around it.

    M-x describe-font RET

    name (opened by): -xos4-Terminus-normal-normal-normal-*-12-*-*-*-c-60-iso10646-1
           full name: Terminus:pixelsize=12:foundry=xos4:weight=normal:slant=normal:width=normal:spacing=110:scalable=false
                size: 12
              height: 12
     baseline-offset:  0
    relative-compose:  0

>> If the designed behaviour mentioned three paragraphs above this one is
>> correct, then it would seem better, when the image has scrolled up
>> sufficiently for the line below it to be visible, if the cursor then
>> jumped to that line, but stayed on it while additional <down> presses
>> continued to scroll the image smoothly upwards until the bottom of the
>> image had disappeared off the top of the window, and then the <down>
>> presses resumed doing next-line in the normal way.
>
> This is next to impossible with the current design of scrolling in
> Emacs.

Fair enough. From ignorance one may stipulate impossible
requirements. Yet it's not impossible that in such naive requirements
lies a germ of a better future Emacs.

> The goal of pixel-level scrolling in Emacs 24 is to allow the
> user a chance to see every part of the image at least once.

I believe human perception requires more than that.

I don't know about pixel-level scrolling. Naively (again) I feel that
even charcter-wise line-by-line scrolling would be far smoother that the
current observed behaviour if "behind" the image there were inserted as
many empty lines of text as needed to span the height of the image.

> If that goal is reached, the rest are deeper limitations of the
> current design, and will require significant changes, not just in the
> area of scrolling tall images.

Fair enough. I was ignorant of the fact that the failings of the current
behaviour were intentional, due to contraints of the existing infrastructure.

>> Scrolling Upwards with <up>
>> ===========================
>> Currently when scrolling upwards from below an image the behaviour is
>> completely different (and worse) from that observed when scrolling
>> downwards from above one. Surely the upward-going behaviour should be
>> symmetrical with the downward-going behaviour?
>
> No, it should not (and cannot) be symmetrical, for boring technical
> reasons.

From the point-of-view of an ideal interface, yes it should, in my
opinion, be symmetrical. But the ideal can never be realised or it is no
longer ideal, and in this case, obviously there are very practical
reasons as well.

> Again, if the user doesn't have a chance of seeing each part
> of the image at least once, please describe the details.

It works in the way you describe aside from the "glitches" (below)
and those allow the user to see the same part of the image more than once!

>> Furthermore, while scrolling one key press at a time like this, there
>> are occasional "glitches" where the image jumps back to the position it
>> was in immediately before scrolling started.
>
> I don't see it with images I tried.  It would be best if you could
> provide a reproducible recipe, with a specific image, starting from
> "emacs -Q", that shows these glitches.

If it is reproducible on demand, I don't see the pattern. That's what I
meant by the "occasional" in my description.

However, using the recipe provided earlier in this message, I saw it
happen thrice while scrolling up and down the page maybe seven or eight
times, so it is not uncommon on my set up.

I only see it happenning going down the page. (I had previously seen a
very similar "glitch" going up the page, but I realise now that that was
with an image in a Gnus message not an image in Eww -- I don't know if
there is any commonality in the code involved.)

>> Additionally (and I think this may only happen at the same time as the
>> "glitches" mentioned above), the cursor column changes from the first
>> column for no obvious reason, and then appears at the ends of lines of
>> text instead of at the beginning of them.
>
> Likewise.

After the "glitch" occurs at the beginning of scrolling an image, when
the cursor emerges in the text below the image it is at the ends of the
lines instead of in the first column. This seems to happen consistently
after the "glitch" occurs.

> Thanks.

Thank you.

N.





  reply	other threads:[~2014-02-22 17:15 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-22  1:51 bug#16840: 24.3.50; Jerky motion and up/down asymmetry scrolling images in Eww N. Jackson
2014-02-22  8:21 ` Eli Zaretskii
2014-02-22 17:15   ` N. Jackson [this message]
2014-02-22 18:05     ` Eli Zaretskii
2015-12-25  7:43       ` Lars Ingebrigtsen
2015-12-25  8:01         ` Eli Zaretskii
2015-12-25 16:54           ` Lars Ingebrigtsen
2015-12-25 17:04             ` Eli Zaretskii
2015-12-25 17:28               ` Lars Ingebrigtsen
2015-12-25 19:56                 ` Eli Zaretskii
2015-12-25 19:01               ` N. Jackson
2015-12-25 19:58                 ` Eli Zaretskii
2019-09-26 16:58                   ` Lars Ingebrigtsen
2019-09-26 17:11                     ` Eli Zaretskii
2019-09-26 17:19                       ` Lars Ingebrigtsen
2019-09-26 17:55                         ` Eli Zaretskii
2019-09-26 18:03                           ` Lars Ingebrigtsen
2019-09-26 18:32                             ` Eli Zaretskii
2019-09-26 18:34                               ` Lars Ingebrigtsen
2019-09-26 18:50                                 ` Eli Zaretskii
2019-09-27 14:12                                   ` Lars Ingebrigtsen
2019-09-27 14:29                                     ` Eli Zaretskii
2019-09-27 14:35                                       ` Lars Ingebrigtsen

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=87y513rrue.fsf_-_@moondust.localdomain \
    --to=nljlistbox2@gmail.com \
    --cc=16840@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).