emacs-devel
[Top][All Lists]
Advanced

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

RE: arrow keys vs. C-f/b/n/p


From: Drew Adams
Subject: RE: arrow keys vs. C-f/b/n/p
Date: Sat, 12 Jun 2010 12:19:05 -0700

> > But I think you should also make it clear (clearer) that 
> > this "logical" order corresponds to buffer position
> 
> I did:
>        Emacs stores right-to-left and bidirectional text in 
>     the so-called "logical" (or "reading") order: the buffer
>     or string position of the first character you read precedes
>     that of the next character.

Good.  My point was to make clear also the behavior of movement (e.g. typical
`forward-*' commands), not just the order of storage.  Forward movement follows
the storage order (typically).  That's worth saying.

> > In fact, you might drop "logical" altogether - the word 
> > itself doesn't really help here.
> 
> This term is widely used in literature about editing bidirectional
> text.

I see.  Then keep it, for readers familiar with that literature.  For those who
might not be familiar, "reading" order is perhaps the most helpful.  And it
helps to point out that this is the same as the buffer (storage) order that you
mentioned.

> > And changing "character position" to "buffer position" would help.
> 
> See above: the text does talk about buffer positions.

That text is not a problem.  I was referring to a passage where you spoke of
"character position" or character order.  That's less clear: character position
wrt what?  Answer: position in the buffer; position in reading order.

> > What I got from your mail yesterday, which I think is clear 
> > there, is that (a) the buffer text stays put, regardless of
> > how it might be displayed (I already supposed that), and
> > (b) cursor movement always follows buffer order: forward
> > means toward eob; backward means toward bob.
> > 
> > It is (b) that is not so clear from the doc. That notion of 
> > "logical" movement (movement along the buffer-position gradient)
> > is important to understand. 
> 
> The manual does touch on that:
> 
>        Because characters are reordered for display, Emacs 
>     commands that operate in the logical order or on stretches
>     of buffer positions may produce unusual effects.  For
>     example, `C-f' and `C-b' commands move point in the logical
>     order, so the cursor will sometimes jump when point
>     traverses reordered bidirectional text.  Similarly, 
>     a highlighted region covering a contiguous range of
>     character positions may look discontinuous if the region
>     spans reordered text.  This is normal and
>     similar to behavior of other programs that support 
>     bidirectional text.

Yes, I read that.  It's fine as far as it goes, but it stresses clearing up some
particular behavior (gotcha) that users might find confusing.  It mentions `C-f'
as a particular _example_, to illustrate the point.  But I'm not sure the
general point is communicated as such - it might be lost in the detailed
description of the gotcha.

This is not only about some particular commands that might happen to move point
in the logical order.  The important point that I think isn't brought out enough
is that one's existing notion of "forward" movement, and the typical `forward-*'
commands that one is used to, all act the same as does that `C-f' example.  They
act the same as they always have: forward typically means (continues to mean)
_toward eob_, even in a bidi setting.  That's not obvious.

> > Admittedly, it can be tricky to talk about these things. 
> > But I found your mail yesterday to be clearer than the
> > current doc. In the doc you say things like
> > "the buffer is reordered for display", which is correct but 
> > which could also be misunderstood. The chars are not
> > reordered in the buffer - the buffer itself is
> > not reordered. It is just that the displayed order differs 
> > from the buffer order (which does not change).
> 
> I see no "buffer is reordered" in the manual.

Hm.  That was a direct quote, from GNU Emacs 24.0.50.1 (i386-mingw-nt5.1.2600)
of 2010-06-07 on 3249CTO. Emacs manual, node Bidirectional Editing:

  "The buffer-local variable `bidi-display-reordering'
   controls whether text in the buffer is reordered for display."

Yes, I admitted I was splitting hairs.  Do as you like with the feedback.  You
are welcome to ignore it.

> I see these instead:
...
>        The buffer-local variable `bidi-display-reordering' 
>     controls whether text in the buffer is reordered for display.

So you do `see "buffer is reordered" in the manual', after all. ;-)

> > BTW, maybe the node should be called Bidirectional Text (or Editing
> > Bidirectional Text) instead of Bidirectional Editing. We've 
> > all been doing bidirectional (multidirectional) editing forever.
> 
> I will rename the section, thanks.

Thanks for your patience.




reply via email to

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