Re: Bidirectional editing in Emacs -- main design decisions
mhsekhavat <[email protected]> Wed, 18 May 2016 13:56:22 -0700 (MST)
| Newsgroups | gmane.emacs.bidi |
|---|---|
| Message-ID | <[email protected]> |
--===============6375489681825628635==
Content-Type: multipart/alternative;
boundary="----=_Part_199866_823483022.1463604982308"
------=_Part_199866_823483022.1463604982308
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
Eli Zaretskii wrote
> What is the real-life use case that requires this? What kind of textare
> we talking about?
The two use cases are:
1) Manipulating serialized file formats such as:=20
* A yaml <https://en.wikipedia.org/wiki/YAML> file can have a list of
strings each of which may be left-to-right or right-to-left. such as:
full_names: - Carolyn Simon - Elijah=09Moreno - An Arabic Full Nam=
e
Which Should Be Displayed right-to-leftdate : 2001-01-23
* A SubRip <https://en.wikipedia.org/wiki/SubRip#SubRip_text_file_format> =
=20
subtitle file such as:
100:20:41,150 --> 00:20:45,109- English speaker: what is your name?- < An
Arabic name which should be displayed right-to-left >200:21:41,150 -->
00:22:45,109- Nice to meet you
2) When writing a LaTeX text, you can split a paragraph into many lines. Fo=
r
example, if you want to write A Latin paragraph with an Arabic sentence in
it
<http://tex.stackexchange.com/questions/89428/inserting-some-arabic-script-=
in-an-english-article>=20
, it is very common to write the Arabic sentence in a separated line:
This is an Latin paragraph with some \begin{Arabic}=D8=A8=D8=B3=D9=85 =D8=
=A7=D9=84=D9=84=D9=87 =D8=A7=D9=84=D8=B1=D8=AD=D9=85=D9=86
=D8=A7=D9=84=D8=B1=D8=AD=DB=8C=D9=85\end{Arabic}that is added.
This will be rendered in a simple paragraph by LaTeX, and most editors like
gedit, TexStudio, TexMaker,... display it correctly (all lines LTR directio=
n
but Arabic line in RTL direction). But emacs does not display the Arabic
sentence in correct direction.
Note that in many use cases it is either semantically wrong to add a blank
line or the file is created in other editors without this issue.
I think these two sample use cases, at least, are very common and I know
many RTL-users who have this issue with emacs and switch to other editors
like gedit when they want to work with RTL files. This behavior is only in
emacs and most editors consider different base directions for each line.
As I have previously mentioned, this behavior is a nice feature for emacs
when editing regular text files, But I think it is necessary to be able to
turn it off when manipulating a file format in which this feature is more
like a bug, and inconsistency with most other standard editors. =20
Thanks,Mohammad Hossein Sekhavat
--
View this message in context: http://emacs.1067599.n5.nabble.com/Bidirectio=
nal-editing-in-Emacs-main-design-decisions-tp248197p398329.html
Sent from the Emacs - Bidi mailing list archive at Nabble.com.
------=_Part_199866_823483022.1463604982308
Content-Type: text/html; charset=UTF8
Content-Transfer-Encoding: quoted-printable
<blockquote style=3D'border-left:2px solid #CCCCCC;padding:0 1em' class=3D"=
quote dark-border-color"><div class=3D"quote light-border-color">
<div class=3D"quote-author" style=3D"font-weight: bold;">Eli Zaretskii wrot=
e</div>
<div class=3D"quote-message">
What is the real-life use case that requires this? What kind of text
are we talking about?
</div>
</div></blockquote>
<p>
The two use cases are:
</p>
<p>
1) Manipulating serialized file formats such as:=20
</p>
* A <a href=3D"https://en.wikipedia.org/wiki/YAML" target=3D"_top" rel=3D"n=
ofollow" link=3D"external">yaml</a> file can have a list of strings each of=
which may be left-to-right or right-to-left. such as:
<pre>
full_names:
- Carolyn Simon
- Elijah=09Moreno
- An Arabic Full Name Which Should Be Displayed right-to-left
date : 2001-01-23
</pre>
* A <a href=3D"https://en.wikipedia.org/wiki/SubRip#SubRip_text_file_format=
" target=3D"_top" rel=3D"nofollow" link=3D"external">SubRip</a> subtitle fi=
le such as:
<pre>
1
00:20:41,150 --> 00:20:45,109
- English speaker: what is your name?
- < An Arabic name which should be displayed right-to-left >
2
00:21:41,150 --> 00:22:45,109
- Nice to meet you
</pre>
<p>
2) When writing a LaTeX text, you can split a paragraph into many lines. Fo=
r example, if you want to <a href=3D"http://tex.stackexchange.com/questions=
/89428/inserting-some-arabic-script-in-an-english-article" target=3D"_top" =
rel=3D"nofollow" link=3D"external"> write A Latin paragraph with an Arabic =
sentence in it </a>, it is very common to write the Arabic sentence in a se=
parated line:
<pre>
This is an Latin paragraph with some=20
\begin{Arabic}
=D8=A8=D8=B3=D9=85 =D8=A7=D9=84=D9=84=D9=87 =D8=A7=D9=84=D8=B1=D8=AD=D9=85=
=D9=86 =D8=A7=D9=84=D8=B1=D8=AD=DB=8C=D9=85
\end{Arabic}
that is added.
</pre>
This will be rendered in a simple paragraph by LaTeX, and most editors like=
gedit, TexStudio, TexMaker,... display it correctly (all lines LTR directi=
on but Arabic line in RTL direction). But emacs does not display the Arabic=
sentence in correct direction.
<p>
Note that in many use cases it is either semantically wrong to add a blank =
line or the file is created in other editors without this issue.
</p>
<p>
I think these two sample use cases, at least, are very common and I know ma=
ny RTL-users who have this issue with emacs and switch to other editors lik=
e gedit when they want to work with RTL files. This behavior is only in ema=
cs and most editors consider different base directions for each line.
</p>
<p>
As I have previously mentioned, this behavior is a nice feature for emacs w=
hen editing regular text files, But I think it is necessary to be able to t=
urn it off when manipulating a file format in which this feature is more li=
ke a bug, and inconsistency with most other standard editors. =20
</p>
Thanks,
Mohammad Hossein Sekhavat
=09
=09
=09
<br/><hr align=3D"left" width=3D"300" />
View this message in context: <a href=3D"http://emacs.1067599.n5.nabble.com=
/Bidirectional-editing-in-Emacs-main-design-decisions-tp248197p398329.html"=
>Re: Bidirectional editing in Emacs -- main design decisions</a><br/>
Sent from the <a href=3D"http://emacs.1067599.n5.nabble.com/Emacs-Bidi-f247=
806.html">Emacs - Bidi mailing list archive</a> at Nabble.com.<br/>
------=_Part_199866_823483022.1463604982308--
--===============6375489681825628635==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
emacs-bidi mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/emacs-bidi
--===============6375489681825628635==--