Re: Setting text direction for each line
Ali Shirvani <[email protected]> Wed, 31 Jul 2019 19:07:10 +0430
| Newsgroups | gmane.emacs.bidi |
|---|---|
| Message-ID | <CAFQ97XFq_YRoKhQ_BjB0mf2J23Ar5Y_YoH4bRRWHr6Dr-o=MQQ@mail.gmail.com> |
--===============0336324315681245833== Content-Type: multipart/alternative; boundary="000000000000233c23058efb1033" --000000000000233c23058efb1033 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Eli, Thanks for your comment, I used this method but it works only if there exist one empty line between paragraphs. I need to set direction for consecutive lines such as follow: This is a LTR line =D8=A7=DB=8C=D9=86 =D9=85=D8=AA=D9=86 =D8=B1=D8=A7=D8=B3=D8=AA =D8=A8=D9=87= =DA=86=D9=BE =D8=A7=D8=B3=D8=AA. Regards, Ali On Wed, Jul 31, 2019 at 6:43 PM Eli Zaretskii <[email protected]> wrote: > > From: Ali Shirvani <[email protected]> > > Date: Wed, 31 Jul 2019 15:46:03 +0430 > > > > I read the "Bidirectional Editing" section from Emacs manual. I found > that Emacs set direction for each > > paragraph. I want to set direction for each line of text instead of > paragraph, I tried different values for > > paragraph-start-re and bidi-paragraph-separate-re variables, but with n= o > success. > > > > Would you please guide me how to set these variable to treat each line > of text as a new paragraph and apply > > current direction for it? > > If you have Emacs 26 or later, you should be able to get what you want > by setting both bidi-paragraph-start-re and bidi-paragraph-separate-re > to "^". > --000000000000233c23058efb1033 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Hi Eli,<div><br></div><div>Thanks for your comment, I used= this method but it works only if there exist one empty line between paragr= aphs. I need to set direction for consecutive lines such as follow:</div><d= iv><br></div><div>This is a LTR line</div><div dir=3D"rtl">=D8=A7=DB=8C=D9= =86 =D9=85=D8=AA=D9=86 =D8=B1=D8=A7=D8=B3=D8=AA =D8=A8=D9=87 =DA=86=D9=BE = =D8=A7=D8=B3=D8=AA.</div><div dir=3D"rtl"><br></div><div>Regards,</div><div= >Ali</div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gm= ail_attr">On Wed, Jul 31, 2019 at 6:43 PM Eli Zaretskii <<a href=3D"mail= to:[email protected]">[email protected]</a>> wrote:<br></div><blockquote class=3D"= gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(20= 4,204,204);padding-left:1ex">> From: Ali Shirvani <<a href=3D"mailto:= [email protected]" target=3D"_blank">[email protected]</a>><br> > Date: Wed, 31 Jul 2019 15:46:03 +0430<br> > <br> > I read the "Bidirectional Editing" section from Emacs manual= . I found that Emacs set direction for each<br> > paragraph. I want to set direction for each line of text instead of pa= ragraph, I tried different values for<br> > paragraph-start-re and bidi-paragraph-separate-re variables, but with = no success.<br> > <br> > Would you please guide me how to set these variable to treat each line= of text as a new paragraph and apply<br> > current direction for it?<br> <br> If you have Emacs 26 or later, you should be able to get what you want<br> by setting both bidi-paragraph-start-re and bidi-paragraph-separate-re<br> to "^".<br> </blockquote></div> --000000000000233c23058efb1033-- --===============0336324315681245833== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZW1hY3MtYmlk aSBtYWlsaW5nIGxpc3QKZW1hY3MtYmlkaUBnbnUub3JnCmh0dHBzOi8vbGlzdHMuZ251Lm9yZy9t YWlsbWFuL2xpc3RpbmZvL2VtYWNzLWJpZGkK --===============0336324315681245833==--