From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: Strange behaviour with dired and UTF8 Date: Fri, 2 May 2003 11:59:33 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: References: <200305020856.RAA16599@etlken.m17n.org> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v552) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1051869781 20841 80.91.224.249 (2 May 2003 10:03:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 2 May 2003 10:03:01 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri May 02 12:02:59 2003 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 19BXN5-0005OC-00 for ; Fri, 02 May 2003 12:02:27 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19BXOZ-0001EC-00 for ; Fri, 02 May 2003 12:03:59 +0200 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 19BXNE-0007SV-00 for emacs-devel@quimby.gnus.org; Fri, 02 May 2003 06:02:36 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19BXMf-000780-00 for emacs-devel@gnu.org; Fri, 02 May 2003 06:02:01 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19BXMN-0006eo-00 for emacs-devel@gnu.org; Fri, 02 May 2003 06:01:44 -0400 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19BXLH-0005q9-00 for emacs-devel@gnu.org; Fri, 02 May 2003 06:00:35 -0400 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h42ApDbL019235; Fri, 2 May 2003 12:51:14 +0200 Original-To: Kenichi Handa In-Reply-To: <200305020856.RAA16599@etlken.m17n.org> X-Mailer: Apple Mail (2.552) 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:13619 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13619 >> This sounds very complicated. As I understand it, dired first gets >> the file name from ls (original representation), then converts that to >> whatever encoding it shall use to show it in the buffer (view >> representation). When dired operates on the file (opening for >> example), >> it converts back from the view representation, hoping to get the >> original representation. But this may fail, since conversion >> from view back to original is not one-to-one. > > It is sure that there's a possibility that encoding a > filename can't get the original filename. But, Emacs anyway > can't handle such a filename. Why not if it has the original filename? >> This work (original representation -> view representation -> original >> representation) should not be needed, IMHO. Why just not keep the >> original representation around (some kind of text property on the file >> name?) and always use that when operating on the file? That change >> would be transparent to users. > > A user may type C-x C-f FILENAME in the dired buffer. With > the above method, we don't know how to encode FILENAME. Why would this change? I am only talking about file names that dired reads from a directory. No need to change C-x C-f. > And, even if one types `f' to visit a file, in that file > buffer, we loose the information of the original > representation. Then Emacs as a whole should change. If I open a file from dired, modify it and save it, I expect it to save to the same file name. Are you saying there are situations where Emacs fails to do this? That sounds like a major bug to me. Maybe the buffer itself also needs to keep the original file name around. Jan D.