From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Boruch Baum Newsgroups: gmane.emacs.bugs Subject: bug#39002: [feature requests] calendar-hebrew [code included] Date: Tue, 7 Jan 2020 13:29:27 -0500 Message-ID: <20200107182927.jk65jen72cq225ft@E15-2016.optimum.net> References: <20200107062830.kyzjn43p4i3fmdzz@E15-2016.optimum.net> <83r20bcle9.fsf@gnu.org> <20200107171141.rcapyzcwrd4hqdfn@E15-2016.optimum.net> <835zhncgt6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="165261"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: NeoMutt/20180716 Cc: 39002@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Jan 07 19:32:36 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1ioted-000eYX-AI for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2020 19:32:35 +0100 Original-Received: from localhost ([::1]:54778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ioteb-000476-JK for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Jan 2020 13:32:33 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49619) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iotcG-0001bK-0D for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2020 13:30:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iotcB-0004is-B4 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2020 13:30:07 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:43294) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iotcB-0004hn-77 for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2020 13:30:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iotcB-0001lk-4G for bug-gnu-emacs@gnu.org; Tue, 07 Jan 2020 13:30:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Boruch Baum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Jan 2020 18:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39002 X-GNU-PR-Package: emacs Original-Received: via spool by 39002-submit@debbugs.gnu.org id=B39002.15784217806727 (code B ref 39002); Tue, 07 Jan 2020 18:30:03 +0000 Original-Received: (at 39002) by debbugs.gnu.org; 7 Jan 2020 18:29:40 +0000 Original-Received: from localhost ([127.0.0.1]:49263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iotbn-0001kQ-Pf for submit@debbugs.gnu.org; Tue, 07 Jan 2020 13:29:40 -0500 Original-Received: from mout.gmx.net ([212.227.17.22]:49435) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iotbl-0001kD-J1 for 39002@debbugs.gnu.org; Tue, 07 Jan 2020 13:29:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1578421771; bh=tbhV/PMLGM+hDCZvCuR2zB0QWNjHDzN2llR+j3ozFVs=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=PAKzvEFsg2ZLMou/YxVLA8U7gvf4k5cSuCVumnCMy/Kg08PfrgzcgRmzjqQJAyzEQ AoB4YptX5QwngLDa9U+nyvp469i5OEA/XKzuRnpGbGDGmwpHi53WphERGzWNutKBOZ hbX9PGbS4sJy0sZyWe/yvDmHxcyUeVnaG9WXnNdk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Original-Received: from E15-2016.optimum.net ([96.246.226.236]) by mail.gmx.com (mrgmx104 [212.227.17.174]) with ESMTPSA (Nemesis) id 1McpJq-1jOVL63cri-00ZymQ; Tue, 07 Jan 2020 19:29:31 +0100 Content-Disposition: inline In-Reply-To: <835zhncgt6.fsf@gnu.org> X-Provags-ID: V03:K1:2FqS8fOTLHI2YiyLjzGK+qMW52sR3tds1Uw+Msz3AENqcvxQW1g IkrddTvR/wUS1pCO84UlMfMVwAw5ibKjKzSbHr4Zxrmj9Q7v5NPx4ApvAxI18yJRj4ul4zT 93iFYx/JogyEhk2WQwS3kRWfaFWHE3kxamvM6lHHblM5v4W2tSPWGZRF4LtrWKDGh/H7YiU L2NCeEy6DcCWTxJI9W0GQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:edD1h57oh7k=:KaV9vjcpJpo24k7GjZpWR+ UEspWyWkvp+2ElnKXFQ8btO4ZGXiLJclocbIxcn9wiPSxVr6bbi1+WG172mKB4QGLlH4TY/yK ILSv6a7ETF9QU+NCzJ9dnkpdZ8Xst06k14zVwwy4JGVMVx8GzgDX2AnwkDUm9AgYdptPZRbtV c+cKPkHJVQ43gxQkqCge6jbckO3Vz00HxtI5j75AxfAu/2HqyikEJYZY97t0c7FZSblcUMN/+ 1tIFthU34FPFlhOJ6VhScmuKAD8zP23qHGAGHOdSzuvQ/BPpb+y/EkpKhvVPnlL6cQgXBbrAO OfF2wxnYYwU4ONq84TU/7U69XbY2a26/oUOxw9JQuaM/Aa6DhKUbir/p16axdTYz/dWuuhEAA nAOi5JqMQrc8z1oRoZdV6XbUCNVewZ201NnCkVdv86B9+q5JphS0TrWyXCNfrqClC8283RKTQ 7s1uT5jkX+Z5G7qngfZJDIDz8ZdYcF5AvrTyqA2FhXILN7LrqAKsW8oaY/jw4elYmuZ0NIdxY e1QsDYxXuIW0Q/YTkL8kpvv46InObqZ0FLIATV+7kK7gulpS/+ilR9B4dYnx4q05w3fodMFmE g2+NwV5a/CLQGU+Y4vIxm834cUUXJ2Jr73UgTNBh/+mhPoPQWMXfv5QMCJOt7snh+GLBkY9Ow woxvZSNg/zl2tTqKmFq96INb/Bye/roZ+GuNmU7HFKsMsBoTzwVdqvGrgohmB5YI/7aPia/66 HaIb/yRw0d7N68YmzeFbsJaBKaxFvQR7XKYe7utkxvmjbn0sJUlJ6iEhcIdK9QLExg7kO0IB X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:174333 Archived-At: On 2020-01-07 19:33, Eli Zaretskii wrote: > > Date: Tue, 7 Jan 2020 12:11:41 -0500 > > > > 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 display= ed > > in the sequence 1,4,2,3. > > I don't think I see the part with the 1,4,2,3 order Look at the sequence of displayed lines in the screenshot - for example, the first line after the LTR heading line is the parasha RTL line, but the diary file (the middle buffer) says that the parasha should be the fourth line, after the sun times. > did you try to use the function bidi-string-mark-left-to-right? I don't remember, but I can give it a try. I did play with manually inserting several unicode bidi control sequences, and none were helpful. > 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. But these aren't sub-strings, they're discrete paragraphs, as defined by the bidi regex. Even without the regex redefinition, they are discrete lines. > 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. That's doable, but generally burdensome, especially for discrete lines / paragraphs. > IOW, it should not be necessary to change the paragraph direction in > these cases. But in the current environment, it's much easier. It's the difference of a one-time setting of a general rule (the bidi paragraph regex), and having to programmatically perform concatenations for each and every relevant string in the buffer. > > That covers bugs B & C. Bug A and a fix for it > > would be reproduced by applying / removing the hook function at line 3= 72 > > 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? With the hook function installed, you can open a diary page and see the Hebrew lines properly aligned. Without the function, those lines justify left. > > 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. It's marked "won't fix". See the discussion there. > 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). The common case is a single line Hebrew heading, followed by a window resize, shrinking the number of columns. I presented a case of very long headings in order for it to obvious that what is happening is that the lines are being displayed down-up. Finally, I don't want to lose focus that this report was primarily a feature request, with working code submitted. This bug discussion is important, but if you feel it's worth continuing, should I file it/them as separate reports? =2D- hkp://keys.gnupg.net CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0