From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Lars Hansen Newsgroups: gmane.emacs.devel Subject: Re: directory-files and Tramp Date: Sat, 22 Feb 2003 23:38:59 +0100 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <3E57FC03.8030808@math.ku.dk> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1045953608 26566 80.91.224.249 (22 Feb 2003 22:40:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 22 Feb 2003 22:40:08 +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 18miJO-0006u2-00 for ; Sat, 22 Feb 2003 23:40:02 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18miY4-000797-00 for ; Sat, 22 Feb 2003 23:55:13 +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 18miJV-00010O-00 for emacs-devel@quimby.gnus.org; Sat, 22 Feb 2003 17:40:09 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18miJB-0000zW-00 for emacs-devel@gnu.org; Sat, 22 Feb 2003 17:39:49 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18miJ8-0000uQ-00 for emacs-devel@gnu.org; Sat, 22 Feb 2003 17:39:48 -0500 Original-Received: from [62.84.220.10] (helo=mail.dantel.dk) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18miI7-0000Qi-00 for emacs-devel@gnu.org; Sat, 22 Feb 2003 17:38:43 -0500 Original-Received: from math.ku.dk [62.84.221.46] by mail.dantel.dk with ESMTP (SMTPD32-7.13) id AC69189E0296; Sat, 22 Feb 2003 23:40:41 +0100 User-Agent: Mozilla/5.0 (Windows; U; Win 9x 4.90; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en Original-To: =?ISO-8859-1?Q?Kai_Gro=DFjohann?= 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:11867 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:11867 > > >I think it looks good: in the no-handler case, directory_files calls >directory_files_internal, which in turn calls expand-file-name on the >directory. So expand-file-name is called anyway. > >But should the expand-file-name call in directory_files_internal be >removed after making sure that all callers do the expansion? > Sounds like a good idea. I seems directory_files_internal is called by directory-files and directory-files-and-attributes only. But the latter is missing a call to expand-file-name, so it must have the same problem as directory-files. So i think the changes should be: diff -c dired-original.c dired.c *** dired-original.c Tue Feb 4 15:03:12 2003 --- dired.c Sat Feb 22 23:19:18 2003 *************** *** 153,159 **** Ffuncall, and cause a GC. */ list = encoded_directory = dirfilename = Qnil; GCPRO5 (match, directory, list, dirfilename, encoded_directory); - directory = Fexpand_file_name (directory, Qnil); dirfilename = Fdirectory_file_name (directory); if (!NILP (match)) --- 153,158 ---- *************** *** 346,351 **** --- 345,352 ---- { Lisp_Object handler; + directory = Fexpand_file_name (directory, Qnil); + /* If the file name has special constructs in it, call the corresponding file handler. */ handler = Ffind_file_name_handler (directory, Qdirectory_files); *************** *** 379,384 **** --- 380,387 ---- { Lisp_Object handler; + directory = Fexpand_file_name (directory, Qnil); + /* If the file name has special constructs in it, call the corresponding file handler. */ handler = Ffind_file_name_handler (directory, Qdirectory_files_and_attributes);