emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bidirectional text and URLs


From: Eli Zaretskii
Subject: Re: Bidirectional text and URLs
Date: Thu, 04 Dec 2014 11:41:57 +0200

> Date: Wed, 03 Dec 2014 19:39:42 +0200
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden, address@hidden
> 
> > Date: Wed, 03 Dec 2014 03:39:03 -0500
> > From: Richard Stallman <address@hidden>
> > CC: address@hidden, address@hidden
> > 
> > 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 ;-)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]