From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: Re: want to go to the 2345th byte, not character Date: Thu, 23 Jun 2005 06:44:59 +0200 Message-ID: References: <874qbqjol4.fsf@jidanni.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1119498781 9228 80.91.229.2 (23 Jun 2005 03:53:01 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 23 Jun 2005 03:53:01 +0000 (UTC) Cc: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 23 05:52:54 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1DlIla-0000H8-M8 for geb-bug-gnu-emacs@m.gmane.org; Thu, 23 Jun 2005 05:52:38 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DlIsL-0003z3-CV for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Jun 2005 23:59:37 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1DlIpu-0003GP-TQ for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2005 23:57:08 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1DlIpd-00038U-Ff for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2005 23:56:52 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1DlIpb-00034P-9G for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2005 23:56:48 -0400 Original-Received: from [192.114.186.66] (helo=romy.inter.net.il) by monty-python.gnu.org with esmtp (Exim 4.34) id 1DlIhV-0004oG-T2 for bug-gnu-emacs@gnu.org; Wed, 22 Jun 2005 23:48:26 -0400 Original-Received: from HOME-C4E4A596F7 (IGLD-80-230-33-20.inter.net.il [80.230.33.20]) by romy.inter.net.il (MOS 3.5.8-GR) with ESMTP id BPS57275 (AUTH halo1); Thu, 23 Jun 2005 06:45:01 +0300 (IDT) Original-To: Dan Jacobson In-reply-to: <874qbqjol4.fsf@jidanni.org> (message from Dan Jacobson on Thu, 23 Jun 2005 01:20:07 +0800) X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:12309 X-Report-Spam: http://spam.gmane.org/gmane.emacs.bugs:12309 > From: Dan Jacobson > 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.