GNU bug report logs - #50402
27.0.90; column-number-mode breaks Farsi/Arabic character shaping

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Mohammad Razavi <sepent@HIDDEN>; Keywords: moreinfo; dated Sun, 5 Sep 2021 16:09:02 UTC; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 50402 <at> debbugs.gnu.org:


Received: (at 50402) by debbugs.gnu.org; 5 Sep 2021 16:19:28 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 05 12:19:28 2021
Received: from localhost ([127.0.0.1]:50827 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMurg-0005UJ-0I
	for submit <at> debbugs.gnu.org; Sun, 05 Sep 2021 12:19:28 -0400
Received: from eggs.gnu.org ([209.51.188.92]:52480)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eliz@HIDDEN>) id 1mMurd-0005U5-O6
 for 50402 <at> debbugs.gnu.org; Sun, 05 Sep 2021 12:19:26 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e]:39720)
 by eggs.gnu.org with esmtp (Exim 4.90_1)
 (envelope-from <eliz@HIDDEN>)
 id 1mMurY-0004tB-F8; Sun, 05 Sep 2021 12:19:20 -0400
Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:2647
 helo=home-c4e4a596f7)
 by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1mMurX-00074R-Te; Sun, 05 Sep 2021 12:19:20 -0400
Date: Sun, 05 Sep 2021 19:19:23 +0300
Message-Id: <83ilzft2pg.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Mohammad Razavi <sepent@HIDDEN>
In-Reply-To: <752ea308-fba2-1854-4aca-3f9860b489fe@HIDDEN> (message from
 Mohammad Razavi on Sun, 5 Sep 2021 14:43:02 +0430)
Subject: Re: bug#50402: 27.0.90;
 column-number-mode breaks Farsi/Arabic character shaping
References: <752ea308-fba2-1854-4aca-3f9860b489fe@HIDDEN>
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 50402
Cc: 50402 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Mohammad Razavi <sepent@HIDDEN>
> Date: Sun, 5 Sep 2021 14:43:02 +0430
> 
> As you may know in scripts such as Farsi (Persian) or Arabic characters
> may change shape depending on their adjacent characters
> (http://www.unicode.org/versions/Unicode1.0.0/V2appA.pdf).
> 
> 
> This behavior works fine in emacs; but if you enable
> "column-number-mode" and copy/paste Farsi/Arabic script into the buffer
> character shaping will not work correctly.

This is bug#41005, which was solved in Emacs 27.1.  You are running a
pretest of Emacs 27.1, from before that bug was solved.  Please
upgrade to Emacs 27.1 or 27.2, and I believe the problem you see
should go away.

Thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#50402; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 5 Sep 2021 16:08:43 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sun Sep 05 12:08:43 2021
Received: from localhost ([127.0.0.1]:50816 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mMuhH-0005De-7M
	for submit <at> debbugs.gnu.org; Sun, 05 Sep 2021 12:08:43 -0400
Received: from lists.gnu.org ([209.51.188.17]:46114)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <sepent@HIDDEN>) id 1mMp9I-0006db-OZ
 for submit <at> debbugs.gnu.org; Sun, 05 Sep 2021 06:13:17 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45630)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <sepent@HIDDEN>) id 1mMp9E-0003YR-7H
 for bug-gnu-emacs@HIDDEN; Sun, 05 Sep 2021 06:13:16 -0400
Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]:44835)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <sepent@HIDDEN>) id 1mMp9B-0003ju-Nc
 for bug-gnu-emacs@HIDDEN; Sun, 05 Sep 2021 06:13:11 -0400
Received: by mail-ej1-x62f.google.com with SMTP id me10so7176528ejb.11
 for <bug-gnu-emacs@HIDDEN>; Sun, 05 Sep 2021 03:13:08 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=to:subject:from:message-id:date:user-agent:mime-version
 :content-transfer-encoding:content-language;
 bh=B5dOQc2eoiYPSXVAUwDX0HoTCQWS9gCG1vPtAJ9fay4=;
 b=pJuZ3PWG0bPFU8+8iW8exoJrfybnn1metIwqe806wmC4Gw+4Q69ASJ6rgfF8EVTRQL
 dA3igaDGHYWmQuHIEjqyDBoPs/KRDtLpnYQin6mekwclaigwQ2LyiISI76ySaibY54Lg
 4ojLXixK5Olp0O50OvruabI6f/G24NI7sfdE8I91T7K1ucxy0c5KWYMMz49CDQFsO+cA
 nSsp2MF+jhm/zSXfuZ+PuLr9V8xILsnqap1APvz/gZXxVXNE43xx5aBXusArkdlt/ZN2
 XAX4Mz5WZUrS80IEiQaEusbPxoifJqZyGNfqymIuUxmVHGr2prQoZRA03WTMSNC2uZfD
 At2A==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:to:subject:from:message-id:date:user-agent
 :mime-version:content-transfer-encoding:content-language;
 bh=B5dOQc2eoiYPSXVAUwDX0HoTCQWS9gCG1vPtAJ9fay4=;
 b=j1jchbSTKJ7IrSQOjxVXKakfgDY+WLuaUHeRNWSIPQ8lGJu4Uju2TcKhnETG2RLp/v
 V1HXvAaaiY/6WANef8biYat6N/gU4b76AQt/jKZRgXqnMybg0FFWc8tuAa7PAIReceQZ
 HwO7bGvtT4T4cyL57WzJc/g6/rGRpFbCF13JuW++FpZIPHbpbHY5GFKY70S3K8G4ssTI
 XPo4CzhxCyain1Oe5fsPVzaU8ekFsifLrmMuskWWHVwh7PTh1cS9p4e6d90041G1KH3N
 fQbGNrlEu+W1gqI8Pox52puzRqrOSFz3wyDRdn2i88cevm6jXLVAE48U8kOmULEYsZF8
 wrjA==
X-Gm-Message-State: AOAM533s85G7wNw8gNDDQSLElQhcNA2adukaWdw5KKxCarXkYoD/hWnn
 sVRvF6TfgMGIS3e++ZW4e2v2DLdJw9uhow==
X-Google-Smtp-Source: ABdhPJxZPlejLvm0SJAoERUZzhFVIqtcQfXdqgWUe2ikXCGNW5ehX83ekpGt7PtC9axVStZeTa0j3A==
X-Received: by 2002:a17:907:76d8:: with SMTP id
 kf24mr8202101ejc.404.1630836787384; 
 Sun, 05 Sep 2021 03:13:07 -0700 (PDT)
Received: from ?IPv6:2a01:5ec0:b802:6673:68aa:d6af:86e3:69dc?
 ([2a01:5ec0:b802:6673:68aa:d6af:86e3:69dc])
 by smtp.gmail.com with ESMTPSA id x11sm2612448edq.58.2021.09.05.03.13.06
 for <bug-gnu-emacs@HIDDEN>
 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128);
 Sun, 05 Sep 2021 03:13:06 -0700 (PDT)
To: bug-gnu-emacs@HIDDEN
Subject: 27.0.90; column-number-mode breaks Farsi/Arabic character shaping
From: Mohammad Razavi <sepent@HIDDEN>
Message-ID: <752ea308-fba2-1854-4aca-3f9860b489fe@HIDDEN>
Date: Sun, 5 Sep 2021 14:43:02 +0430
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
 Thunderbird/78.13.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Content-Language: en-US
Received-SPF: pass client-ip=2a00:1450:4864:20::62f;
 envelope-from=sepent@HIDDEN; helo=mail-ej1-x62f.google.com
X-Spam_score_int: -20
X-Spam_score: -2.1
X-Spam_bar: --
X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001,
 RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-Mailman-Approved-At: Sun, 05 Sep 2021 12:08:42 -0400
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

As you may know in scripts such as Farsi (Persian) or Arabic characters
may change shape depending on their adjacent characters
(http://www.unicode.org/versions/Unicode1.0.0/V2appA.pdf).


This behavior works fine in emacs; but if you enable
"column-number-mode" and copy/paste Farsi/Arabic script into the buffer
character shaping will not work correctly.


To reproduce the problem, you can run


emacs -q --eval '(progn (setq column-number-mode t) (switch-to-buffer
"foobar"))'


and then copy (only one of) the strings from below:


افغانستان


ایران


(The first word is "Afghanistan" and the second one is "Iran" in Farsi
script)


and paste it on the emacs buffer. You will see:


ﺎﻔﻏﺎﻨﺴﺗﺎﻧ


ﺎﯾﺭﺎﻧ


in which the character shaping is broken. If it didn't work with this
simple words try long Farsi/Arabic texts.


This problem only exists if  column-number-mode is enabled. Strangely,
if you type the words usually it works fine but if you copy/paste from
somewhere else it will not work. Also if you type some word and then
copy/paste the same work the character shaping works fine.



In GNU Emacs 27.0.90 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.14)
of 2020-03-29 built on 30bc0080ed46
Repository revision: c5f255d68156926923232b1edadf50faac527861
Repository branch: HEAD
Windowing system distributor 'The X.Org Foundation', version 11.0.12011000
System Description: Ubuntu 20.04.3 LTS

Recent messages:
For information about GNU Emacs and the GNU system, type C-h C-a.
Making completion list...

Configured using:
'configure --build x86_64-linux-gnu --prefix=/opt/emacs
--with-mailutils=yes --with-sound=alsa --without-gconf --with-x=yes
--with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2
-fstack-protector-strong -Wformat -Werror=format-security -Wall'
'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2'
'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro''

Configured features:
XPM JPEG TIFF GIF PNG RSVG SOUND GPM DBUS GSETTINGS GLIB NOTIFY INOTIFY
ACL LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF XFT ZLIB
TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD PDUMPER
LCMS2 GMP

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

Major mode: Fundamental

Minor modes in effect:
tooltip-mode: t
global-eldoc-mode: t
electric-indent-mode: t
mouse-wheel-mode: t
tool-bar-mode: t
menu-bar-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
column-number-mode: t
line-number-mode: t
transient-mark-mode: t

Load-path shadows:
None found.

Features:
(shadow sort mail-extr emacsbug message rmc puny dired dired-loaddefs
format-spec rfc822 mml easymenu mml-sec password-cache epa derived epg
epg-config gnus-util rmail rmail-loaddefs text-property-search time-date
subr-x seq byte-opt gv bytecomp byte-compile cconv mm-decode mm-bodies
mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader cl-loaddefs
cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils
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 tab-bar menu-bar rfn-eshadow isearch
timer select scroll-bar mouse jit-lock font-lock syntax facemenu
font-core term/tty-colors frame minibuffer 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
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 45662 7148)
(symbols 48 5981 1)
(strings 32 16013 1905)
(string-bytes 1 518187)
(vectors 16 10056)
(vector-slots 8 129239 10066)
(floats 8 20 39)
(intervals 56 214 0)
(buffers 1000 13))




Acknowledgement sent to Mohammad Razavi <sepent@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#50402; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 5 Sep 2021 16:30:02 UTC

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