From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: nisse@lysator.liu.se (Niels =?UTF-8?Q?M=C3=B6ller?=) Newsgroups: gmane.emacs.bugs Subject: bug#43207: 26.3; Strange bidi behavior Date: Fri, 04 Sep 2020 21:36:41 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40137"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) To: 43207@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 04 21:37:12 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEHWJ-000AHN-TH for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 21:37:12 +0200 Original-Received: from localhost ([::1]:58082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEHWI-00071h-T4 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 15:37:10 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEHWA-0006xx-7n for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 15:37:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57338) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEHW9-0004IT-Ug for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 15:37:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kEHW9-0000iq-Sh for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 15:37:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: nisse@lysator.liu.se (Niels =?UTF-8?Q?M=C3=B6ller?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Sep 2020 19:37:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 43207 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.15992482202766 (code B ref -1); Fri, 04 Sep 2020 19:37:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Sep 2020 19:37:00 +0000 Original-Received: from localhost ([127.0.0.1]:40651 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEHW3-0000iU-Rb for submit@debbugs.gnu.org; Fri, 04 Sep 2020 15:37:00 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:37308) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEHW2-0000iN-Ju for submit@debbugs.gnu.org; Fri, 04 Sep 2020 15:36:55 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:47164) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEHW2-0006p3-Ch for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 15:36:54 -0400 Original-Received: from mail.lysator.liu.se ([130.236.254.3]:38705) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEHVz-0004G2-He for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 15:36:53 -0400 Original-Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id A72F640003 for ; Fri, 4 Sep 2020 21:36:42 +0200 (CEST) Original-Received: from fukushima.lysator.liu.se (fukushima.lysator.liu.se [IPv6:2001:6b0:17:f0a0::5d]) by mail.lysator.liu.se (Postfix) with SMTP id 8D41040002 for ; Fri, 4 Sep 2020 21:36:41 +0200 (CEST) Original-Received: by fukushima.lysator.liu.se (sSMTP sendmail emulation); Fri, 04 Sep 2020 21:36:41 +0200 X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=130.236.254.3; envelope-from=nisse@lysator.liu.se; helo=mail.lysator.liu.se X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/04 15:36:43 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187164 Archived-At: I get a pretty confusing behavior when I load the file at https://www.lysator.liu.se/~nisse/misc/emacs-bidi-bug-2.txt This is what it looks like https://www.lysator.liu.se/~nisse/misc/emacs-bidi-bug-2.png I'll try to describe the behavior I get when loading the file with emacs -Q emacs-bidi-bug-2.txt (I'm not sure exactly what intended behavior is, but what I see is quite confusing). The file contains some arabic characters (originating in a discussion of the vatican reportedly registering an arabic domain name meaning "katholic"), followed by some Swedish text. The Swedish text is displayed mostly in left-to-right order (except for punctuation characters), but right-justified in the buffer, and to me it seems like some parts of emacs thinks the text is rendered right-to-left. More specifically, C-f moves point in the expected "logical order" of the text, which is mostly to the right on the screen. However pressing the right-arrow key (bound to right-char) moves cursor to the left on most parts of this text (the opposite direction of C-f (forward-char)), despite the text being rendered in left-to-right order. I would have expected the later part of the file to be displayed left-justified in left-to-right order, with the exception of the single word "=D9=83=D8=A7=D8=AB=D9=88=D9=84=D9=8A" rendered right-to-left. Regards, /Niels In GNU Emacs 26.3 (build 2, x86_64-pc-linux-gnu, GTK+ Version 3.24.20) of 2020-05-17, modified by Debian built on x86-csail-01 Windowing system distributor 'The X.Org Foundation', version 11.0.12004000 Configured using: 'configure --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:= /usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share= /emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --build x86_64-linux-gnu --prefix=3D/usr --sharedstatedir=3D/var/lib --libexecdir=3D/usr/lib --localstatedir=3D/var/lib --infodir=3D/usr/share/info --mandir=3D/usr/share/man --enable-libsystemd --with-pop=3Dyes --enable-locallisppath=3D/etc/emacs:/usr/local/share/emacs/26.3/site-lisp:= /usr/local/share/emacs/site-lisp:/usr/share/emacs/26.3/site-lisp:/usr/share= /emacs/site-lisp --with-sound=3Dalsa --without-gconf --with-mailutils --with-x=3Dyes --with-x-toolkit=3Dgtk3 --with-toolkit-scroll-bars 'CFLAGS=3D-g -O2 -fdebug-prefix-map=3D/build/emacs-mHAik2/emacs-26.3+1=3D. -fstack-protector-strong -Wformat -Werror=3Dformat-security -Wall' 'CPPFLAGS=3D-Wdate-time -D_FORTIFY_SOURCE=3D2' LDFLAGS=3D-Wl,-z,relro' Configured features: XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS GLIB NOTIFY ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM THREADS LIBSYSTEMD LCMS2 Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Text Minor modes in effect: tooltip-mode: t global-eldoc-mode: t electric-indent-mode: t mouse-wheel-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t line-number-mode: t transient-mark-mode: t Load-path shadows: /usr/share/emacs/site-lisp/lyskom-elisp-client hides /usr/share/emacs/site-lisp/lyskom-elisp-client/lyskom-elisp-client Features: (pp shadow sort mail-extr emacsbug message dired dired-loaddefs format-spec rfc822 mml mml-sec epa derived epg epg-config gnus-util rmail rmail-loaddefs mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils parse-time browse-url wid-edit network-stream puny nsm rmc seq auth-source cl-seq eieio eieio-core cl-macs eieio-loaddefs password-cache starttls tls gnutls lyskom-rest string lyskom-menus lyskom-ansaphone lyskom-messages mship-edit lyskom-cache lyskom-services lyskom-mime lyskom-aux-items lyskom-command advice lyskom-clienttypes lyskom-types lyskom-language-sv lyskom-strings lyskom-language lyskom-macros lyskom-vars lyskom-feature lyskom-defvar lyskom edmacro kmacro cl-print byte-opt gv bytecomp byte-compile cconv thingatpt cl-extra help-fns radix-tree help-mode easymenu cl-loaddefs cl-lib elec-pair time-date mule-util tooltip eldoc electric uniquify ediff-hook vc-hooks lisp-float-type mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode elisp-mode lisp-mode prog-mode register page menu-bar rfn-eshadow isearch timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core term/tty-colors frame cl-generic cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite charscript charprop case-table epa-hook jka-cmpr-hook help simple abbrev obarray minibuffer cl-preloaded nadvice loaddefs button faces cus-face macroexp files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty make-network-process emacs) Memory information: ((conses 16 264803 23621) (symbols 48 30298 0) (miscs 40 845 608) (strings 32 61450 3495) (string-bytes 1 1701594) (vectors 16 37130) (vector-slots 8 1636019 140596) (floats 8 99 394) (intervals 56 3949 356) (buffers 992 21)) --=20 Niels M=C3=B6ller. PGP-encrypted email is preferred. Keyid 368C6677. Internet email is subject to wholesale government surveillance.