From: Eli Zaretskii <eliz@gnu.org>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: want to go to the 2345th byte, not character
Date: Thu, 23 Jun 2005 06:44:59 +0200 [thread overview]
Message-ID: <uwtoly94k.fsf@gnu.org> (raw)
In-Reply-To: <874qbqjol4.fsf@jidanni.org> (message from Dan Jacobson on Thu, 23 Jun 2005 01:20:07 +0800)
> From: Dan Jacobson <jidanni@jidanni.org>
> 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.
next prev parent reply other threads:[~2005-06-23 4:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-22 17:20 want to go to the 2345th byte, not character Dan Jacobson
2005-06-23 4:44 ` Eli Zaretskii [this message]
2005-06-23 15:56 ` Dan Jacobson
2005-06-23 21:05 ` Kevin Rodgers
2005-06-24 10:40 ` Eli Zaretskii
2005-06-26 5:11 ` hexl vs. non-ASCII Dan Jacobson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=uwtoly94k.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=bug-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).