Re: [19.25, efs 1.9] dired-handler-fn

sandy@ibm550.sissa.it
Mon, 18 Jul 1994 15:59:20 +0200


>>>>> On Mon, 18 Jul 94 14:49:44 BST,
      Denis Howe <dbh@doc.ic.ac.uk> said:

>> (defun file-truename (filename)
>> ...
>>     (if handler
>> 	(funcall handler 'file-truename filename)
>>       (let ((dir (file-name-directory filename))
>> 	    target dirfile file-name-handler-alist)

 > That seems to do the business for me!  Thanks.

So now we know the culprit.  It's file-truename in GNU Emacs V19.
It's  s l o w.  Also, from the code it looks to me like it suffers an
exponential degradation in performance when file handlers exist.

 > What if there is no handler for some file name but there is a handler
 > for a prefix of it?  Eg. something weird like "/ant/bat.dir/foo" with
 > regexp "\\.dir/$".  Probably totally contrived.

Just write the regexp in such a way that it can match in the middle of
a string, if you care to handle something like this.

--sandy