From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Bidirectional text and URLs Date: Sat, 06 Dec 2014 01:19:57 +0200 Message-ID: <83zjb11y76.fsf@gnu.org> References: <87a93cngwv.fsf@uwakimon.sk.tsukuba.ac.jp> <837fyfml31.fsf@gnu.org> <874mtio7wh.fsf@uwakimon.sk.tsukuba.ac.jp> <83r3wml8kq.fsf@gnu.org> <83a938aeuc.fsf@gnu.org> <838uir8huv.fsf@gnu.org> <831toi6r4w.fsf@gnu.org> <83sigy53m2.fsf@gnu.org> <83d28061nt.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417821603 20614 80.91.229.3 (5 Dec 2014 23:20:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Dec 2014 23:20:03 +0000 (UTC) Cc: larsi@gnus.org, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Dec 06 00:19:56 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xx2AF-00010O-Py for ged-emacs-devel@m.gmane.org; Sat, 06 Dec 2014 00:19:55 +0100 Original-Received: from localhost ([::1]:52856 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx2AF-0005Nd-Bt for ged-emacs-devel@m.gmane.org; Fri, 05 Dec 2014 18:19:55 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48386) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx2A6-0005N3-L5 for emacs-devel@gnu.org; Fri, 05 Dec 2014 18:19:52 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xx2A0-00088V-A9 for emacs-devel@gnu.org; Fri, 05 Dec 2014 18:19:46 -0500 Original-Received: from mtaout22.012.net.il ([80.179.55.172]:53411) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xx2A0-00088E-2F; Fri, 05 Dec 2014 18:19:40 -0500 Original-Received: from conversion-daemon.a-mtaout22.012.net.il by a-mtaout22.012.net.il (HyperSendmail v2007.08) id <0NG400D00TWB1W00@a-mtaout22.012.net.il>; Sat, 06 Dec 2014 01:19:39 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout22.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NG400CLOU4RZ620@a-mtaout22.012.net.il>; Sat, 06 Dec 2014 01:19:39 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.172 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:179069 Archived-At: > Date: Fri, 05 Dec 2014 17:44:37 -0500 > From: Richard Stallman > CC: larsi@gnus.org, emacs-devel@gnu.org > > > > One use of disabling bidi is that you'll see what the strange URL > > > really consists of. > > > We already have a better solution for that, I just added yesterday the > > infrastructure that enables such a solution. > > Could you tell me what that solution is? I'm concerned that we > may be miscommunicating again. I meant this primitive: (bidi-find-overridden-directionality FROM TO &optional OBJECT) Return position between FROM and TO where directionality was overridden. This function returns the first character position in the specified region of OBJECT where there is a character whose `bidi-class' property is `L', but which was forced to display as `R' by a directional override, and likewise with characters whose `bidi-class' is `R' or `AL' that were forced to display as `L'. If no such character is found, the function returns nil. OBJECT is a Lisp string or buffer to search for overridden directionality, and defaults to the current buffer if nil or omitted. OBJECT can also be a window, in which case the function will search the buffer displayed in that window. Passing the window instead of a buffer is preferable when the buffer is displayed in some window, because this function will then be able to correctly account for window-specific overlays, which can affect the results. Strong directional characters `L', `R', and `AL' can have their intrinsic directionality overridden by directional override control characters RLO (u+202e) and LRO (u+202d). See the function `get-char-code-property' for a way to inquire about the `bidi-class' property of a character.