From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Mohsen BANAN Newsgroups: gmane.emacs.devel Subject: Re: bidi-display-reordering is now non-nil by default Date: Wed, 10 Aug 2011 19:45:25 -0700 Organization: ByStar Federation of Autonomous Libre Services -- http://www.by-star.net Message-ID: References: <834o1ypa2b.fsf@gnu.org> <87aabnn3mz.fsf@stupidchicken.com> <83mxfnwwyd.fsf@gnu.org> <87ipqbzogt.fsf@stupidchicken.com> <83liv7wqhe.fsf@gnu.org> <87liv75xsh.fsf@stupidchicken.com> <83k4arvx05.fsf@gnu.org> <87bow116je.fsf@stupidchicken.com> <83wrepyq3r.fsf@gnu.org> <87sjpar2l2.fsf@stupidchicken.com> <83aabizh94.fsf@gnu.org> <87vcu6b4rp.fsf@stupidchicken.com> <8739hank3b.fsf@fencepost.gnu.org> <87ty9ps120.fsf@stupidchicken.com> <83ty9pxls0.fsf@gnu.org> <87ipq51a5z.fsf@stupidchicken.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1313030747 22430 80.91.229.12 (11 Aug 2011 02:45:47 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 11 Aug 2011 02:45:47 +0000 (UTC) Cc: Eli Zaretskii , dak@gnu.org, emacs-devel@gnu.org To: Chong Yidong Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Aug 11 04:45:41 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QrLHA-0004v9-Rf for ged-emacs-devel@m.gmane.org; Thu, 11 Aug 2011 04:45:41 +0200 Original-Received: from localhost ([::1]:34604 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrLH9-0007Us-RC for ged-emacs-devel@m.gmane.org; Wed, 10 Aug 2011 22:45:39 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:32853) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QrLH7-0007Ub-8x for emacs-devel@gnu.org; Wed, 10 Aug 2011 22:45:38 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QrLH4-00041Y-AI for emacs-devel@gnu.org; Wed, 10 Aug 2011 22:45:37 -0400 Original-Received: from 0016.bacs.by-star.net ([198.62.92.166]:36400) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1QrLH3-000403-NW for emacs-devel@gnu.org; Wed, 10 Aug 2011 22:45:34 -0400 Original-Received: (qmail 29831 invoked from network); 10 Aug 2011 19:40:18 -0700 Original-Received: from 192.168.0.181 ([192.168.0.181]) by 0016.bacs.by-star.net ([198.62.92.166]) with ESMTP via TCP; 11 Aug 2011 02:40:18 -0000 In-Reply-To: <87ipq51a5z.fsf@stupidchicken.com> (Chong Yidong's message of "Wed, 10 Aug 2011 12:52:24 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 198.62.92.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:143135 Archived-At: >>>>> On Wed, 10 Aug 2011 12:52:24 -0400, Chong Yidong said: Chong> Eli Zaretskii writes: >> How is that different from using invisible properties in Info mode? >> You cut/paste from a manual, and the hidden text pops up >> "unexpectedly". Chong> And that is not a good thing. There's no reason to make the problem Chong> worse if we can help it. Chong> I haven't seen an argument against the idea of introducing a Chong> `string-mark-left-to-right' function; is there any? I am all for it. Permit me to make a few additional very minor suggestions that build on what you suggested. - Let's add a bidi- prefix to these function names. - Let's have two functions instead of one. The one with -perhaps- does the if, the one without does it always. - Let's put these is a file like bidi-kit.el somewhere on the trunk soon. So we can use them right away. It could be right next to bidi-menu.el starting point that suggested previously. Note that when the -perhaps- version is used, non-RTL script (e.g., ascii), remains pure ... Thanks, ...Mohsen --- starting point for bidi-kit.el starts --- (defun bidi-string-perhaps-mark-left-to-right (str) "Return a string based on STR that can be embedded in LTR text. If STR ends in right-to-left (RTL) script, return a string consisting of STR followed by a left-to-right mark (LRM) character. Otherwise, return STR." (if --??--this-string-needs-an-lrm--??-- ...(get-char-code-property (aref str i) 'bidi-class)... Check for R... (concat str "\u200E") str)) (defun bidi-string-mark-left-to-right (str) "Return a string based on STR that can be embedded in LTR text. Return a string consisting of STR followed by a left-to-right mark (LRM) character. (concat str "\u200E")) --- starting point for bidi-kit.el ends ---