all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22250@debbugs.gnu.org, larsi@gnus.org
Subject: bug#22250: 25.0.50; Eww fails to break RTL paragraph
Date: Mon, 28 Dec 2015 22:23:23 +0100	[thread overview]
Message-ID: <8737umi7xw.fsf@justinian.turtle-trading.net> (raw)
In-Reply-To: <8360zifmsk.fsf@gnu.org> (Eli Zaretskii's message of "Mon, 28 Dec 2015 20:30:51 +0200")

I see that you found something with that other file, that's good.  My
script-based test case contains no diacritics though, so it is still
another problem.  I have uploaded this now to my private webserver as
<https://odoacer.turtle-trading.net/abc-abc-abc-abc-abc-abc-abc-abc-abc-abc-abc-abc-abc-abc-test.html>.
This URL reproduces the problem for me after "G RET".

Eli Zaretskii writes:
> (Why is receiving a page from a server different from visiting the
> same page as a disk file?  The way shr works, this should produce
> exactly the same results, no?)

It gets worse, I set a breakpoint in eww-render yesterday.  At that
point in the code I understand that everything just works from a
temporary buffer containing the HTTP headers and the HTML.  I got the
error not depending on the buffer contents (IOW with the *same* contents
in the temp buffer), but depending on the length of the URL.  I thought
that the message "Loading ..." that is shown in the eww buffer might
trigger the problem.  So today I disabled that and tried my test case,
and it worked.  But than I tried my actual pages and came upon the case
that I just sent in the other post, where it still did not work.

> Failing that, can you describe what exactly do you see, or maybe step
> through the code in Edebug and tell which part(s) misbehave?

So I set a breakpoint on shr-vertical-motion and ran my script test
case.  Remember that this works the first time through but fails when
reloaded with "G RET".

In the good case, for the first line, point is at position 1,
shr-vertical-motion calls vertical-motion with (78 . 0) as parameter and
afterwards, point is at 94.  Which is a good place to break.

In the bad case, for the first line, everything looks the same,
vertical-motion gets called with the same parameter, but when it returns
point is at 161.  Which is not good.

Delving into the C code:

In the good case, it->w->hscroll is 0, in the bad case it->w->hscroll is
68.  Experimentation tells me that the interpretation of window-hscroll
(whether it refers to the left or the right margin) depends on
bidi-paragraph-direction, is that right?

Anyway, when I set bidi-paragraph-direction to left-to-right manually
before I press "G RET" than the problem does not occur.

Note that at the point when vertical-motion is called and gives
different answers, bidi-paragraph-direction is always right-to-left, so
it looks like some window parameter that depends on
bidi-paragraph-direction is cached somewhere?





  reply	other threads:[~2015-12-28 21:23 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27 19:11 bug#22250: 25.0.50; Eww fails to break RTL paragraph Benjamin Riefenstahl
2015-12-27 19:27 ` Eli Zaretskii
2015-12-27 23:09   ` Benjamin Riefenstahl
2015-12-28  3:32     ` Eli Zaretskii
2015-12-28 16:40       ` Benjamin Riefenstahl
2015-12-28 17:12         ` Eli Zaretskii
2015-12-28 17:49           ` Eli Zaretskii
2015-12-28 18:15           ` Benjamin Riefenstahl
2015-12-28 18:30             ` Eli Zaretskii
2015-12-28 21:23               ` Benjamin Riefenstahl [this message]
2015-12-29 16:47                 ` Eli Zaretskii
2015-12-29 20:55                   ` Benjamin Riefenstahl
2015-12-29 21:03                     ` Eli Zaretskii
2015-12-29 22:33                       ` Benjamin Riefenstahl
2015-12-30 17:04                         ` Eli Zaretskii
2015-12-30 20:22                           ` Benjamin Riefenstahl
2015-12-30 20:30                             ` Benjamin Riefenstahl
2015-12-31 15:26                             ` Eli Zaretskii
2015-12-31 18:10                               ` Benjamin Riefenstahl
2015-12-31 18:23                                 ` Eli Zaretskii
2015-12-30 17:15                       ` Eli Zaretskii
2015-12-28 16:46       ` Lars Ingebrigtsen
2015-12-28 19:07     ` Benjamin Riefenstahl
2015-12-28 19:29       ` Eli Zaretskii
2015-12-27 19:30 ` Lars Ingebrigtsen
2015-12-27 19:38   ` Eli Zaretskii
2015-12-27 19:45   ` Eli Zaretskii
2015-12-27 19:49     ` Lars Ingebrigtsen
2015-12-27 20:22       ` Eli Zaretskii
2015-12-27 20:28         ` Eli Zaretskii
2015-12-27 21:00           ` Eli Zaretskii
2015-12-27 21:10             ` 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

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

  git send-email \
    --in-reply-to=8737umi7xw.fsf@justinian.turtle-trading.net \
    --to=b.riefenstahl@turtle-trading.net \
    --cc=22250@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=larsi@gnus.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.