From: Benjamin Riefenstahl <b.riefenstahl@turtle-trading.net>
To: 22257@debbugs.gnu.org
Subject: bug#22257: 25.0.50; bidi-paragraph-direction is sticky in eww (patch)
Date: Mon, 28 Dec 2015 17:38:58 +0100 [thread overview]
Message-ID: <87d1tq1qal.fsf@justinian.i-did-not-set--mail-host-address--so-tickle-me> (raw)
[-- Attachment #1: Type: text/plain, Size: 272 bytes --]
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.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bidi-sticky.patch --]
[-- Type: text/x-diff, Size: 654 bytes --]
diff --git a/lisp/net/shr.el b/lisp/net/shr.el
index c28e0b8..47f7f9c 100644
--- a/lisp/net/shr.el
+++ b/lisp/net/shr.el
@@ -1103,12 +1103,9 @@ shr-previous-newline-padding-width
;;; Tag-specific rendering rules.
(defun shr-tag-html (dom)
- (let ((dir (dom-attr dom 'dir)))
- (cond
- ((equal dir "ltr")
- (setq bidi-paragraph-direction 'left-to-right))
- ((equal dir "rtl")
- (setq bidi-paragraph-direction 'right-to-left))))
+ (if (equal dir(dom-attr dom 'dir) "rtl")
+ (setq bidi-paragraph-direction 'right-to-left)
+ (setq bidi-paragraph-direction 'left-to-right))
(shr-generic dom))
(defun shr-tag-body (dom)
[-- Attachment #3: Type: text/plain, Size: 584 bytes --]
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
next reply other threads:[~2015-12-28 16:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-28 16:38 Benjamin Riefenstahl [this message]
2015-12-28 17:13 ` bug#22257: 25.0.50; bidi-paragraph-direction is sticky in eww (patch) Lars Ingebrigtsen
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87d1tq1qal.fsf@justinian.i-did-not-set--mail-host-address--so-tickle-me \
--to=b.riefenstahl@turtle-trading.net \
--cc=22257@debbugs.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 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.