From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bidi,gmane.emacs.devel Subject: Re: Bidirectional editing in Emacs -- main design decisions Date: Sun, 11 Oct 2009 22:12:54 +0200 Message-ID: <838wfhk7uh.fsf@gnu.org> References: <83bpkgl113.fsf@gnu.org> <834oq8kx5c.fsf@gnu.org> <83tyy7jx7c.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1255291923 24234 80.91.229.12 (11 Oct 2009 20:12:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 11 Oct 2009 20:12:03 +0000 (UTC) Cc: emacs-bidi@gnu.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Sun Oct 11 22:11:54 2009 Return-path: Envelope-to: gnu-emacs-bidi@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Mx4lA-0001is-HZ for gnu-emacs-bidi@m.gmane.org; Sun, 11 Oct 2009 22:11:16 +0200 Original-Received: from localhost ([127.0.0.1]:39921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mx4l9-0003z0-WA for gnu-emacs-bidi@m.gmane.org; Sun, 11 Oct 2009 16:11:16 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mx4kx-0003yG-8v for emacs-bidi@gnu.org; Sun, 11 Oct 2009 16:11:03 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mx4kw-0003xa-7w for emacs-bidi@gnu.org; Sun, 11 Oct 2009 16:11:02 -0400 Original-Received: from [199.232.76.173] (port=34935 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mx4kw-0003xW-2U; Sun, 11 Oct 2009 16:11:02 -0400 Original-Received: from mtaout1.012.net.il ([84.95.2.1]:34658) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mx4kt-0003aL-3c; Sun, 11 Oct 2009 16:10:59 -0400 Original-Received: from conversion-daemon.i-mtaout1.012.net.il by i-mtaout1.012.net.il (HyperSendmail v2007.08) id <0KRD00500977TZ00@i-mtaout1.012.net.il>; Sun, 11 Oct 2009 22:10:57 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.70.84.229]) by i-mtaout1.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0KRD00LVG9E9HHD0@i-mtaout1.012.net.il>; Sun, 11 Oct 2009 22:10:57 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by monty-python.gnu.org: Solaris 9.1 X-BeenThere: emacs-bidi@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion of Emacs support for multi-directional text." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Errors-To: emacs-bidi-bounces+gnu-emacs-bidi=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bidi:425 gmane.emacs.devel:116083 Archived-At: > From: Richard Stallman > CC: emacs-devel@gnu.org, emacs-bidi@gnu.org > Date: Sun, 11 Oct 2009 04:41:22 -0400 > > move-to-left-margin shows what it means to be at the left margin. > It is a matter of matching the paragraph regexps after the right > amount of whitespace as specified by the value of `left-margin'. Would it be sufficient to account for any arbitrary amount of horizontal whitespace between the beginning of the line and the paragraph regexps? If so, that is an almost trivial modification of the code I already have. My problem was with potentially more complicated situations, since paragraph regexps may in principle be anything. I also have issues with a paragraph that is separated from the previous one by just the amount of indentation, like this: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbb Are you suggesting that Emacs should recompute the paragraph direction of the two lines with b's, and the result could be a different base direction from that used by the two preceding lines with a's? I think that such direction changes will annoy users of bidirectional scripts. What are the use-cases where such paragraphs are useful? > When `left-margin' is nonzero, a line which fails to start with that much > whitespace also starts a paragraph. You mean, a line which starts with more indentation, or a line that starts with less? Like this: aaaaaaaaaaaaaaaaaaaaaa aaaaaaaaaaaaaaaaaaaaaa xxxxxxxxxxxxxxxxxxxxxxxxxx yyyyyyyyyyyyyyyyyyyyyy Should the "xxx" line be considered a new paragraph? > To be fully correct, it ought to detect paragraphs correctly when > `left-margin' is nonzero. I think that won't be hard to do. Maybe it will be not hard -- once I make move-to-column, current-column, and the rest of indent.c work with bidirectional text. Right now, it's badly broken, because it assumes buffer positions increase linearly with screen positions. Even vertical cursor motion and C-e does not work correctly, because of that.