From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: dired doesn't work properly with a multibyte locale Date: Sun, 12 Jan 2003 06:56:20 -0500 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: Reply-To: rms@gnu.org NNTP-Posting-Host: main.gmane.org X-Trace: main.gmane.org 1042373197 24661 80.91.224.249 (12 Jan 2003 12:06:37 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2003 12:06:37 +0000 (UTC) Cc: emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Xgsu-0006Pc-00 for ; Sun, 12 Jan 2003 13:06:36 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18Xgzr-00021W-00 for ; Sun, 12 Jan 2003 13:13:48 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Xgq7-0006t8-02 for emacs-devel@quimby.gnus.org; Sun, 12 Jan 2003 07:03:43 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18XgnR-0006Pw-00 for emacs-devel@gnu.org; Sun, 12 Jan 2003 07:00:57 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18XgmM-0006Cq-00 for emacs-devel@gnu.org; Sun, 12 Jan 2003 06:59:51 -0500 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18Xgiy-0005N2-00; Sun, 12 Jan 2003 06:56:20 -0500 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 18Xgiy-0004Op-00; Sun, 12 Jan 2003 06:56:20 -0500 Original-To: miles@gnu.org, handa@etl.go.jp In-reply-to: (message from Miles Bader on 06 Jan 2003 15:04:26 +0900) Original-cc: emacs-pretest-bug@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Emacs development discussions. List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:10686 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10686 It doesn't seem simple to get the byte offset information, so perhaps the best thing to do is simply not use --dired if `file-name-coding-system' is a multibyte encoding. For the moment, this may be the best we can do. But that means the other bugs that --dired was meant to fix come back. For the longer term, we need a way to make --dired work properly with multibyte decoding in Emacs. One idea is that decoding could optionally keep a record of every place it changes the length of text. Most of the time, this optional feature would be turned off, but dired would turn it on. The output would be a list of elements of the form (POS . CHANGE) where POS is the buffer position (or perhaps, position relative to the start of the input), and CHANGE would be the change in size of the text at that place. With all this information, it would be straightforward to correct all the information provided by --dired. Handa, do you think this would be feasible?