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: Thu, 04 Dec 2014 11:41:57 +0200 Message-ID: <83vblr4uqi.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> <83wq6a5c1q.fsf@gnu.org> <83lhmo63a9.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1417686129 30592 80.91.229.3 (4 Dec 2014 09:42:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 4 Dec 2014 09:42:09 +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 Thu Dec 04 10:42:02 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 1XwSvA-0007WT-7a for ged-emacs-devel@m.gmane.org; Thu, 04 Dec 2014 10:42:00 +0100 Original-Received: from localhost ([::1]:45100 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwSv9-0005Oo-Qa for ged-emacs-devel@m.gmane.org; Thu, 04 Dec 2014 04:41:59 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47420) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwSv1-0005Ob-E2 for emacs-devel@gnu.org; Thu, 04 Dec 2014 04:41:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XwSuv-0003BB-CS for emacs-devel@gnu.org; Thu, 04 Dec 2014 04:41:51 -0500 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:32904) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XwSuv-0003B1-3z; Thu, 04 Dec 2014 04:41:45 -0500 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0NG100300XH00H00@a-mtaout20.012.net.il>; Thu, 04 Dec 2014 11:41:43 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NG1002OTXLJMS90@a-mtaout20.012.net.il>; Thu, 04 Dec 2014 11:41:43 +0200 (IST) In-reply-to: <83lhmo63a9.fsf@gnu.org> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.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:178809 Archived-At: > Date: Wed, 03 Dec 2014 19:39:42 +0200 > From: Eli Zaretskii > Cc: larsi@gnus.org, emacs-devel@gnu.org > > > Date: Wed, 03 Dec 2014 03:39:03 -0500 > > From: Richard Stallman > > CC: larsi@gnus.org, emacs-devel@gnu.org > > > > The second proposed interface would copy the text of a region, while > > adding to it something to reproduce the bidi effect of its context. > > That was how I understood the first suggestion, so that's what I'm > working on. It is easier to do that than invent a representation. I have now implemented on master: (defun buffer-substring-with-bidi-context (start end &optional no-properties) "Return portion of current buffer between START and END with bidi context. This function works similar to `buffer-substring', but it prepends and appends to the text bidi directional control characters necessary to preserve the visual appearance of the text if it is inserted at another place. This is useful when the buffer substring includes bidirectional text and control characters that cause non-trivial reordering on display. If copied verbatim, such text can have a very different visual appearance, and can also change the visual appearance of the surrounding text at the destination of the copy. Optional argument NO-PROPERTIES, if non-nil, means copy the text without the text properties." Based on the fuss this generated, I now expect to see Lisp programs using this to start popping like mushrooms after the rain ;-)