From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Dov Grobgeld Newsgroups: gmane.emacs.bugs Subject: bug#11700: 24.1.50; Bad interaction between BiDi and org-tables Date: Mon, 4 Dec 2017 21:35:40 +0100 Message-ID: References: <83mx46y4f5.fsf@gnu.org> <87mv2y6xx2.fsf@nicolasgoaziou.fr> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045c18c66ce309055f89a985" X-Trace: blaine.gmane.org 1512419775 29162 195.159.176.226 (4 Dec 2017 20:36:15 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 4 Dec 2017 20:36:15 +0000 (UTC) Cc: 11700@debbugs.gnu.org To: Nicolas Goaziou Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Dec 04 21:36:11 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLxTE-0007Dk-1m for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Dec 2017 21:36:08 +0100 Original-Received: from localhost ([::1]:45107 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLxTL-0002Lr-DT for geb-bug-gnu-emacs@m.gmane.org; Mon, 04 Dec 2017 15:36:15 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:36923) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLxTC-0002Ka-Rt for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2017 15:36:08 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLxT8-0001Y8-Kz for bug-gnu-emacs@gnu.org; Mon, 04 Dec 2017 15:36:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:37293) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eLxT8-0001Xn-Hf; Mon, 04 Dec 2017 15:36:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1eLxT8-0006J4-61; Mon, 04 Dec 2017 15:36:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Dov Grobgeld Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org, emacs-orgmode@gnu.org Resent-Date: Mon, 04 Dec 2017 20:36:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11700 X-GNU-PR-Package: emacs,org-mode X-GNU-PR-Keywords: Original-Received: via spool by 11700-submit@debbugs.gnu.org id=B11700.151241974924222 (code B ref 11700); Mon, 04 Dec 2017 20:36:02 +0000 Original-Received: (at 11700) by debbugs.gnu.org; 4 Dec 2017 20:35:49 +0000 Original-Received: from localhost ([127.0.0.1]:45974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLxSv-0006Ib-5I for submit@debbugs.gnu.org; Mon, 04 Dec 2017 15:35:49 -0500 Original-Received: from mail-wm0-f42.google.com ([74.125.82.42]:39181) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eLxSt-0006IO-8B for 11700@debbugs.gnu.org; Mon, 04 Dec 2017 15:35:47 -0500 Original-Received: by mail-wm0-f42.google.com with SMTP id i11so16607563wmf.4 for <11700@debbugs.gnu.org>; Mon, 04 Dec 2017 12:35:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=6XtwYyoCNsXyMsvmxCuWUKAUd7xHKShnPjYwTclz4og=; b=nA6tKJuER4QLwaYB5ZetTmx4+1DrsfwV9bXjMgOcBw1xPw6th3csX5mfqYZYL0uQhU xXcR96qZXUYy0SII+Plc9N9EhYtMzy38HPg5dkqByOs1j8XSHDF98fyD6j2tNHqYqDE5 8fH6xyr8Qu1GVxcpZAzaB53s/JWqY3TvoOwyn522kOfqERfTxD8njmSxwMrTabQ89sF4 ZUr59Juw2rPhOsIRVhSIBH1ZLqXc2Q34n1UMR3rrpwcHcsPO0gs5HDR7mybrUn0uh3XU aeQCaQVd0gt1codjLEHycRwAt46e9+65R1aasiCGIdzzhiNLSUNCzbzQ1d+KuoH8cPFw M1Bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=6XtwYyoCNsXyMsvmxCuWUKAUd7xHKShnPjYwTclz4og=; b=EMe8tcBVO8EYlnlcKwZfZjW/O76qtBop2ZmombIe7+Boo1ucKQF1j4bEq3lkXu6nT/ LDW7MrFuioDIL0V3KXYJh15FTajpeVw/U8kZP2KXjIVmRLwede7ZrgFa18ZWJ048GxU1 yiNTy2emR2rqpfEo9VYkRzgjSdTIQU2TIaWcoWHiNXQ7Hnfc99bSPEXX5Sxy+cvRL7y+ c2f8LhJX3BwziG16iZYDoo8EAZp96BMJuXflTgXUohIuch+9iO+gopN2ZvNjerbw3qQF EZXfSQ/HEdMDBcETGbLF+fL7MeIoaWWPYLQk4W83IaurXArNzsonM4rwVNXGlJAYLfjq mv9g== X-Gm-Message-State: AJaThX7zWWbWb9Qgouj6rkBjnupzMu0+6on5t1D6Y9/NDeMUcQZyHbjs 31HPRau82Tlx48JmehiMVUXSh+foOkZHPiE9284= X-Google-Smtp-Source: AGs4zMatVQCfpRlAotBrdw10zXuDtqsaBcrF8OImBMQrF4AouYrjgdab7j0GCCFb0D+WQ7jpUM9P9IMzHgW9ZMkvRrk= X-Received: by 10.80.144.178 with SMTP id c47mr33016042eda.188.1512419741195; Mon, 04 Dec 2017 12:35:41 -0800 (PST) Original-Received: by 10.80.172.117 with HTTP; Mon, 4 Dec 2017 12:35:40 -0800 (PST) In-Reply-To: <87mv2y6xx2.fsf@nicolasgoaziou.fr> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:140693 Archived-At: --f403045c18c66ce309055f89a985 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The correct Unicode=E2=89=A56.3 way to do this would be with the unicode is= olation characters. I.e. you would wrap each of the columns with column contents. Does emacs honor these? Should be easy to test. Regards, Dov On Mon, Dec 4, 2017 at 9:27 PM, Nicolas Goaziou wrote: > Hello, > > Eli Zaretskii writes: > > >> Date: Wed, 13 Jun 2012 22:26:35 +0300 > >> From: Dov Grobgeld > >> > >> Imagine you have a buffer with the following logical contents (using t= he > >> convention that capitals are RTL characters). > >> > >> | abcdef | abc | > >> | ABCDEF | ABC | > >> > >> I would like this to be displayed as: > >> > >> | abcdef | abc | > >> | FEDCBA | CBA | > >> > >> The problem is that I want to each column of the table to be isolated > >> (with regards to bidi influence) from other columns in the table. (Of > >> course we also want to choose the table direction, but that is a > >> different and solvable issue.) If there is no such separation, which > >> is the behaviour currently get in emacs HEAD, then the resulting > >> rendered buffer is: > >> > >> | abcdef | abc | > >> | CBA | FEDCBA | > >> > >> Is this even solvable in the current emacs bidi model? > > > > Yes, it is. The solution involves putting segment separators between > > the table columns. These could be TAB characters or a display > > property whose value is (space . :width N) or (space . :align-to COL). > > > > Org maintainers, please ask if you need help in fixing this. > > *raises a hand* > > I'd rather preserve structure of Org documents outside of Emacs. So, > `:align-to' is not an option. > > IIUC, I need to replace the closest space from vertical bars with > > #(" " 0 1 (space :width 1)) > > This doesn't sound too difficult. > > However, could someone provide tests cases so we get it right once and > for all? > > Thank you. > > Regards, > > -- > Nicolas Goaziou 0x80A93738 > --f403045c18c66ce309055f89a985 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The correct Unicode=E2=89=A56.3 way to do this would be= with the unicode isolation characters. I.e. you would wrap each of the col= umns with <FSI>column contents<BDI>. Does emacs honor these? Sh= ould be easy to test.

Regards,
Dov
<= /div>

On Mon, Dec = 4, 2017 at 9:27 PM, Nicolas Goaziou <mail@nicolasgoaziou.fr> wrote:
Hello,

Eli Zaretskii <eliz@gnu.org> writ= es:

>> Date: Wed, 13 Jun 2012 22:26:35 +0300
>> From: Dov Grobgeld <d= ov.grobgeld@gmail.com>
>>
>> Imagine you have a buffer with the following logical contents (usi= ng the
>> convention that capitals are RTL characters).
>>
>> | abcdef | abc |
>> | ABCDEF | ABC |
>>
>> I would like this to be displayed as:
>>
>> | abcdef | abc |
>> | FEDCBA | CBA |
>>
>> The problem is that I want to each column of the table to be isola= ted
>> (with regards to bidi influence) from other columns in the table. = (Of
>> course we also want to choose the table direction, but that is a >> different and solvable issue.) If there is no such separation, whi= ch
>> is the behaviour currently get in emacs HEAD, then the resulting >> rendered buffer is:
>>
>> | abcdef | abc |
>> | CBA | FEDCBA |
>>
>> Is this even solvable in the current emacs bidi model?
>
> Yes, it is.=C2=A0 The solution involves putting segment separators bet= ween
> the table columns.=C2=A0 These could be TAB characters or a display > property whose value is (space . :width N) or (space . :align-to COL).=
>
> Org maintainers, please ask if you need help in fixing this.

*raises a hand*

I'd rather preserve structure of Org documents outside of Emacs. So, `:align-to' is not an option.

IIUC, I need to replace the closest space from vertical bars with

=C2=A0 #(" " 0 1 (space :width 1))

This doesn't sound too difficult.

However, could someone provide tests cases so we get it right once and
for all?

Thank you.

Regards,

--
Nicolas Goaziou=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 0x80A93738

--f403045c18c66ce309055f89a985--