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: Tue, 6 May 2003 20:05:54 +0200 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <6129D384-7FED-11D7-81D0-00039363E640@swipnet.se> References: <200305050920.SAA20197@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 1052245504 16055 80.91.224.249 (6 May 2003 18:25:04 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 6 May 2003 18:25:04 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Tue May 06 20:25:00 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 19D75v-00040d-00 for ; Tue, 06 May 2003 20:23:15 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 19D79X-0001H7-00 for ; Tue, 06 May 2003 20:26: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 19D73Y-0002YB-05 for emacs-devel@quimby.gnus.org; Tue, 06 May 2003 14:20:48 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 19D72T-0002Bi-00 for emacs-devel@gnu.org; Tue, 06 May 2003 14:19:41 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 19D71f-0001vT-00 for emacs-devel@gnu.org; Tue, 06 May 2003 14:18:54 -0400 Original-Received: from stubby.bodenonline.com ([193.201.16.94]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19D6pq-0006qH-00 for emacs-devel@gnu.org; Tue, 06 May 2003 14:06:38 -0400 Original-Received: from accessno42.bodenonline.com (IDENT:root@accessno42.bodenonline.com [193.201.16.44]) h46Iv4wI022417; Tue, 6 May 2003 20:57:05 +0200 Original-To: Kenichi Handa In-Reply-To: <200305050920.SAA20197@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:13725 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:13725 >> I agree that this is bad, but I am not sure anything can be done >> about it. > > How about my proposal? Doesn't it solve this problem? It depends on what the file-name-coding-system-alist looks like. If it contains full file name path, it could. Maybe it is best to try it. I think it is bad to hawe multiple information sources that has to be consulted to figure out the original file name (the display file name, the buffer encoding, file system encoding, and the new alist). At some point Emacs must have had the original file name. It is a shame to throw away that knowledge and then try to reconstruct it. >> Both KDE and GNOME file managers and file dialogs fail to open >> the right file in certain cases. I think it is worse if dired fails >> on >> 'f' since in that case the file name is supplied by dired, not the >> user. >> For C-x C-f there is always TAB to see what Emacs thinks the file is >> called. > > But, *Completion* buffer doesn't show correct file names > because there are names encoded by latin-1. How one can > choose what he want? In addtion, TAB says "[no match]" if > one has already typed some non-ASCII characters. An other approach would be to always keep file names as is (i.e. the original file name) and put some sort of property on it that is the encoding. This would require that the display engine can display these with right encoding. That way the manipulations is always done on and with the original file name. This is of course some work. >> I am not sure your case covers all cases. If a file name was >> latin-1 and then converted to UTF8 (outside Emacs), Emacs would think >> it is >> still latin-1, no? >> It involves a bit of user interaction, making it intrusive. > > Yes, but I think Emacs doesn't have to care about such a > case. Why not? I think this is about as bad as the failure of the *Completion* buffer. Maybe worse, because you can not open the file at all. Jan D.