From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dov Grobgeld 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> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="f403045c18c66ce309055f89a985" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36976) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eLxTF-0002Lz-Dj for emacs-orgmode@gnu.org; Mon, 04 Dec 2017 15:36:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eLxTE-0001b5-BE for emacs-orgmode@gnu.org; Mon, 04 Dec 2017 15:36:09 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: <87mv2y6xx2.fsf@nicolasgoaziou.fr> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: Eli Zaretskii , 11700@debbugs.gnu.org --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--