emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: testing for a remote file to include file on a Windows mappeddrive


From: Stefan Monnier
Subject: Re: testing for a remote file to include file on a Windows mappeddrive
Date: Wed, 30 Jan 2008 09:45:16 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux)

>> I think the same goes for `unhandled-file-name'.

> I don't understand.  unhandled-file-name-directory is used to get
> a directory that can be used as cwd for subprocesses.  And the new
> operation is meant to be used to get a filename that can be passed
> to subprocesses.  So AFAICT they share everything and should use the
> same name.

And actually the default implementation of unhandled-file-name-directory
should be changed from

  /* If the file name has special constructs in it,
     call the corresponding file handler.  */
  handler = Ffind_file_name_handler (filename, Qunhandled_file_name_directory);
  if (!NILP (handler))
    return call2 (handler, Qunhandled_file_name_directory, filename);
  return Ffile_name_directory (filename);

to

  Lisp_Object ufn = Funhandled_file_name (Ffile_name_directory (filename));
  if (!NILP (ufn))
    return ufn;
  /* In most cases the unhandled-file-name handler already took care of it
     but there might be yet-unknown corner cases where it's not enough
     or maybe the file-name-handler hasn't been updated yet to define
     unhandled-file-name.  */
  handler = Ffind_file_name_handler (filename, Qunhandled_file_name_directory);
  if (!NILP (handler))
    return call2 (handler, Qunhandled_file_name_directory, filename);
  else
    return build_string ("/");

and my guess is that there won't be any file-name-handler that will ever
need to define unhandled-file-name-directory any more.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]