emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] editing text in "visual mode"


From: Eli Zaretskii
Subject: Re: [emacs-bidi] editing text in "visual mode"
Date: Thu, 22 Nov 2001 15:59:26 +0200 (IST)

On Thu, 22 Nov 2001, Alex Schroeder wrote:

> How about a visual-edit-region command which pastes the stuff into a
> new buffer, converts logical to visual, disables bidi for display,
> allows some editing, and when the user hits C-c C-c, the buffer is
> transformed back to logical (with some arbitrary optimizing), and
> replaces the original region.

Yes, I thought about this.  But I'd rather prefer a different UI: how 
about a command, insert-visually, which will simply insert the character 
I type next so that it appears where the cursor was?

For this you need:

  - convert the whole paragraph to visual, keeping track of the original 
    buffer positions with each character;

  - find out what is the buffer position that corresponds to the cursor 
    position, using the result of the previous step;

  - insert the character where the cursor was displayed; and

  - convert back to logical and replace the paragraph in the original 
    buffer.

> The entire thing could be developped now, using
> the bidi stuff I wrote (since it has both visual to logical and back).

Please feel free.  You get bonus points for service above and beyond
duty ;-)



reply via email to

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