bug-gnu-emacs
[Top][All Lists]
Advanced

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

Re: want to go to the 2345th byte, not character


From: Eli Zaretskii
Subject: Re: want to go to the 2345th byte, not character
Date: Thu, 23 Jun 2005 06:44:59 +0200

> From: Dan Jacobson <address@hidden>
> Date: Thu, 23 Jun 2005 01:20:07 +0800
> 
> I'm sitting in a unicode buffer and I want to go to the 2345th byte.

There are no original bytes in the Emacs buffer.  Emacs decodes the
file when it reads it; the decoding process removes the original byte
sequences that stood for the encoded characters in the file, and in
their stead inserts the characters in the Emacs internal
representation, which is very different from what's in the file.

> ESC 2 3 4 5 C-f will take me to the 2345th character, wide and narrow
> included, but not the 2345th byte.  Therefore there should be an
> additional command that operates byte wise.

Can you tell why you need that?

Anyway, if you want to treat the file as a stream of bytes, you need a
byte editing mode; use hexl-find-file for that.

>    C-f runs the command forward-char
>    Move point right N characters (left if N is negative).
> 
> Perhaps that right and left stuff should be reworded in view of BIDI
> (Arabic, Hebrew) languages?

You assume that C-f in a right-to-left language will still move in the
logical (as opposed to visual) direction.  That is not a given; when
we implement bidi support for Emacs, we will have to figure out what
is the best behavior here.  Until then, there's no need to use
abstractions where none are required.




reply via email to

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