emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Message Mode and bidi


From: Eric Abrahamsen
Subject: Re: Message Mode and bidi
Date: Mon, 19 Feb 2024 21:16:51 -0800
User-agent: Gnus/5.13 (Gnus v5.13)

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Eric Abrahamsen <eric@ericabrahamsen.net>
>> Date: Mon, 19 Feb 2024 16:46:22 -0800
>> 
>> Christopher Culver via "Emacs development discussions."
>> <emacs-devel@gnu.org> writes:
>> 
>> > Joost Kremers <joostkremers@fastmail.fm> writes:
>> >> When you compose a new message, is there a line "--text follows this 
>> >> line--"
>> >> separating the headers and the message text? In my case, there is (I use 
>> >> mu4e)
>> >> and when I type Arabic text on the line below this text, I get the effect 
>> >> you
>> >> mention. If I leave an empty line after "--text follows this line--", 
>> >> bidi works
>> >> as expected.
>> >
>> > Indeed, if I just go down one line and then begin typing, bidi works as
>> > expected. I am feeling very foolish that I did not even try this. Thank
>> > you for clearing up this problem, and for shedding light on how Emacs
>> > considers paragraphs.
>> 
>> This is a bit weird, because the value of `mail-header-separator'
>> ("--text follows this line--") is added to both `paragraph-start' and
>> `paragraph-separate') in `message-mode'. You'd think one of those would
>> do it.
>
> Emacs doesn't use paragraph-separate and paragraph-start to define
> where a paragraph starts and ends, for the purposes of determining the
> base directionality of a paragraph.  It uses separate variables for
> that, see the node "Bidirectional Editing" in the Emacs user manual.
> The reason for using separate variables is because several modes,
> including (but not limited to) message-mode, set the former variables
> to regexps that get in the way of bidi reordering, and could easily
> produce wrong results on display.

Do you think we'd stand a chance of finding values for
bidi-paragraph-start|separate-re that would resolve this particular
issue? Some of the message headers should be individually considered as
paragraphs for the purpose of bidi text as well, but that seems
considerably more challenging.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]