GNU bug report logs - #22257
25.0.50; bidi-paragraph-direction is sticky in eww (patch)

Previous Next

Package: emacs;

Reported by: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>

Date: Mon, 28 Dec 2015 16:40:02 UTC

Severity: normal

Found in version 25.0.50

Fixed in version 25.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 22257 in the body.
You can then email your comments to 22257 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#22257; Package emacs. (Mon, 28 Dec 2015 16:40:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Mon, 28 Dec 2015 16:40:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
To: bug-gnu-emacs <at> gnu.org
Subject: 25.0.50; bidi-paragraph-direction is sticky in eww (patch)
Date: Mon, 28 Dec 2015 17:38:58 +0100
[Message part 1 (text/plain, inline)]
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.

[bidi-sticky.patch (text/x-diff, attachment)]
[Message part 3 (text/plain, inline)]

In GNU Emacs 25.0.50.8 (i686-pc-linux-gnu, GTK+ Version 2.24.25)
 of 2015-12-28 built on justinian
Repository revision: f9d87dd8791d4e77929f21e4f73d92ef966722cc
Windowing system distributor 'The X.Org Foundation', version 11.0.11604000
System Description:	Debian GNU/Linux 8.2 (jessie)

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GCONF GSETTINGS NOTIFY
LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK2 X11

Important settings:
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=ibus
  locale-coding-system: utf-8-unix


Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22257; Package emacs. (Mon, 28 Dec 2015 17:14:01 GMT) Full text and rfc822 format available.

Message #8 received at 22257 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Cc: 22257 <at> debbugs.gnu.org
Subject: Re: bug#22257: 25.0.50;
 bidi-paragraph-direction is sticky in eww (patch)
Date: Mon, 28 Dec 2015 18:13:05 +0100
Benjamin Riefenstahl <b.riefenstahl <at> 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




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22257; Package emacs. (Mon, 28 Dec 2015 18:26:02 GMT) Full text and rfc822 format available.

Message #11 received at 22257 <at> debbugs.gnu.org (full text, mbox):

From: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 22257 <at> debbugs.gnu.org
Subject: Re: bug#22257: 25.0.50;
 bidi-paragraph-direction is sticky in eww (patch)
Date: Mon, 28 Dec 2015 19:25:17 +0100
Lars Ingebrigtsen writes:
> Does the following fix the problem?  (Included in the Emacs 25 branch in
> a jiffy...)

Sure, that does it, too.  I guess the setq for bidi-paragraph-direction
in eww-mode is redundant than.




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#22257; Package emacs. (Mon, 28 Dec 2015 20:04:02 GMT) Full text and rfc822 format available.

Message #14 received at 22257 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net>
Cc: 22257 <at> debbugs.gnu.org
Subject: Re: bug#22257: 25.0.50;
 bidi-paragraph-direction is sticky in eww (patch)
Date: Mon, 28 Dec 2015 21:02:59 +0100
Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net> writes:

> Lars Ingebrigtsen writes:
>> Does the following fix the problem?  (Included in the Emacs 25 branch in
>> a jiffy...)
>
> Sure, that does it, too.  I guess the setq for bidi-paragraph-direction
> in eww-mode is redundant than.

Yup.  Removed now.

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




bug marked as fixed in version 25.1, send any further explanations to 22257 <at> debbugs.gnu.org and Benjamin Riefenstahl <b.riefenstahl <at> turtle-trading.net> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 28 Dec 2015 20:04:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 26 Jan 2016 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 230 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.