bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#39002: [feature requests] calendar-hebrew [code included]


From: Eli Zaretskii
Subject: bug#39002: [feature requests] calendar-hebrew [code included]
Date: Tue, 07 Jan 2020 19:33:25 +0200

> Date: Tue, 7 Jan 2020 12:11:41 -0500
> From: Boruch Baum <boruch_baum@gmx.com>
> Cc: 39002@debbugs.gnu.org
> 
> Attached is a screenshot displaying three relevant buffers. Below the
> calendar buffer is the content of my ~/.emacs.d/diary file. Note the
> sequence of elements: 1) Title line (LTR, implicit; 2) Hebrew date
> (RTL); 3) sun times (LTR); 4) Parasha (RTL). However, in the diary
> output buffer, at the bottom of the screen shot, the lines are displayed
> in the sequence 1,4,2,3.

I don't think I see the part with the 1,4,2,3 order (sorry if I'm
blind), but did you try to use the function
bidi-string-mark-left-to-right?  IIUC the problem, that function was
created exactly for these use cases, where bidi reordering causes a
jumble in what is supposed to be columnar display of several
substrings.  You should wrap each substring in the wrapper produced by
bidi-string-mark-left-to-right, and then concatenate the results with
the "|" or whatever separators in-between.

IOW, it should not be necessary to change the paragraph direction in
these cases.

> That covers bugs B & C. Bug A and a fix for it
> would be reproduced by applying / removing the hook function at line 372
> of the previously submitted `cal-ivrit.el'
> 
> 
>   (defun cal-ivrit-diary-fancy-display-mode-hook-function ()
>     (setq bidi-paragraph-start-re "^")
>     (setq bidi-paragraph-separate-re "^"))
> 
>   (add-hook 'diary-fancy-display-mode-hook
>     'cal-ivrit-diary-fancy-display-mode-hook-function)

Removing this and then doing what?

> For an illustration of emacs bug #15541 (nine+ years old!), see the
> attached org-mode file.

It is not a bug, it's the intended behavior.  If you have Org files
with such long headings of RTL text, you should set the variable
bidi-paragraph-direction to nil in that buffer (or even to
right-to-left, if all of the headings use RTL text).





reply via email to

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