unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
Cc: 22257@debbugs.gnu.org
Subject: bug#22257: 25.0.50; bidi-paragraph-direction is sticky in eww (patch)
Date: Mon, 28 Dec 2015 18:13:05 +0100	[thread overview]
Message-ID: <87r3i6v6n2.fsf@gnus.org> (raw)
In-Reply-To: <87d1tq1qal.fsf@justinian.i-did-not-set--mail-host-address--so-tickle-me> (Benjamin Riefenstahl's message of "Mon, 28 Dec 2015 17:38:58 +0100")

Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net> writes:

> When I have visited a page in eww that contains Hebrew text and than
> switch to a non-Hebrew page, bidi-paragraph-direction is still set RTL.
> A simple fix is attached.  The bug will still happen if the LTR page
> does not have an <html> element at all, but we may not care.

I think we do care.  :-)

Does the following fix the problem?  (Included in the Emacs 25 branch in
a jiffy...)

diff --git a/lisp/net/eww.el b/lisp/net/eww.el
index 5755a94..d455577 100644
--- a/lisp/net/eww.el
+++ b/lisp/net/eww.el
@@ -401,6 +401,7 @@ eww-display-html
 	(source (and (null document)
 		     (buffer-substring (point) (point-max)))))
     (with-current-buffer buffer
+      (setq bidi-paragraph-direction 'left-to-right)
       (plist-put eww-data :source source)
       (plist-put eww-data :dom document)
       (let ((inhibit-read-only t)


-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





  reply	other threads:[~2015-12-28 17:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-28 16:38 bug#22257: 25.0.50; bidi-paragraph-direction is sticky in eww (patch) Benjamin Riefenstahl
2015-12-28 17:13 ` Lars Ingebrigtsen [this message]
2015-12-28 18:25   ` Benjamin Riefenstahl
2015-12-28 20:02     ` 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=87r3i6v6n2.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=22257@debbugs.gnu.org \
    --cc=b.riefenstahl@turtle-trading.net \
    /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).