all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Hansen <larsh@math.ku.dk>
Cc: emacs-devel@gnu.org
Subject: Re: directory-files and Tramp
Date: Sat, 22 Feb 2003 23:38:59 +0100	[thread overview]
Message-ID: <3E57FC03.8030808@math.ku.dk> (raw)

>
>
>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);

             reply	other threads:[~2003-02-22 22:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-22 22:38 Lars Hansen [this message]
2003-02-23 10:48 ` directory-files and Tramp Kai Großjohann
  -- strict thread matches above, loose matches on Subject: below --
2003-02-21 23:16 Lars Hansen
2003-02-22 12:23 ` Kai Großjohann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E57FC03.8030808@math.ku.dk \
    --to=larsh@math.ku.dk \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.