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: Tue, 02 Dec 2014 17:03:29 +0200 Message-ID: <83wq6a5c1q.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> <83zjb9an0q.fsf@gnu.org> <831toka82r.fsf@gnu.org> <83oaro8km7.fsf@gnu.org> <83k32b6u5l.fsf@gnu.org> <83h9xf6rzs.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417532637 29625 80.91.229.3 (2 Dec 2014 15:03:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 2 Dec 2014 15:03:57 +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 Tue Dec 02 16:03:50 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 1XvozV-00030F-67 for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2014 16:03:49 +0100 Original-Received: from localhost ([::1]:37262 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvozU-0003zW-JU for ged-emacs-devel@m.gmane.org; Tue, 02 Dec 2014 10:03:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40735) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XvozB-0003vq-2v for emacs-devel@gnu.org; Tue, 02 Dec 2014 10:03:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xvoz5-00016N-0t for emacs-devel@gnu.org; Tue, 02 Dec 2014 10:03:29 -0500 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:38001) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xvoz4-00014i-Oa; Tue, 02 Dec 2014 10:03:22 -0500 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NFY00I00MR9VH00@mtaout28.012.net.il>; Tue, 02 Dec 2014 17:00:54 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NFY00AVMN1ITE80@mtaout28.012.net.il>; Tue, 02 Dec 2014 17:00:54 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 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:178697 Archived-At: > Date: Tue, 02 Dec 2014 09:45:08 -0500 > From: Richard Stallman > CC: larsi@gnus.org, emacs-devel@gnu.org > > > A simple (as in "KISS") strategy that should always work is to copy > > the entire physical line around the region. > > 1. Is that physical line sufficient to determine the bidi context for > the region? I don't know. If you say it is, I believe you. I say yes. For this purpose, line == paragraph. > > Optimizing > > that would probably require replacing runs of certain types of > > characters with a single representative character of the same type, > > and keeping all the directional controls. > > > We could also replace strong directional characters L/R/AL with the > > corresponding mark (LRM/RLM/ALM), which are displayed as (thin) > > spaces, and so will be almost invisible, keeping an illusion of > > copying just the region of text and nothing else. > > This sounds like the sort of thing I proposed. OK, I will work on it. > Another possible interface would be > 'buffer-substring-preserve-bidi-context'. > It would copy a specified part of the buffer, but prefix and suffix it > with whatever is necessary to cause that part to display the same, > bidi-wise, as it did in its original buffer. How is this different (you say "another possible interface")?