[Top][All Lists]

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

Re: Tramp, "[]" in file names, and file-expand-wildcards

From: Stefan Monnier
Subject: Re: Tramp, "[]" in file names, and file-expand-wildcards
Date: Mon, 08 Oct 2001 18:16:29 -0400

> Some time ago, Eli (I think it was him) said it's not a good idea to
> use a file-name-handler-alist entry which has overlap in the file
> names with an existing entry.  (If only one of the entries is supposed
> to be called.)
> The old Tramp filename format was "/r:address@hidden:/path/to/file".  Of
> course, this collides with Ange-FTP which interprets this as a file on
> host "r".  Things _mostly_ worked okay since Tramp came first in
> file-name-handler-alist, but there were some glitches.

I still think that overlapping handlers *should* work: if they don't
it should be fixed.  After all, jka-compr and ange-ftp do overlap.

> So I changed it to "/address@hidden/path/to/file".
> But this one collides with file-expand-wildcards: if it finds "[", it
> extracts the directory component of the filename and expands wildcards
> there.  Of course, the directory component still contains
> "/address@hidden", and hence, still a "[", and so an infloop results.

Sounds like a bug.  Can you show a backtrace ?
[ the code in find-file-noselect seems to be careful to avoid expanding
  wildcards repeatedly, so the problem must be in file-expand-wildcards,
  which could possibly loop forever if applying file-name-directory
  directory-file-name repeatedly loops.  Does it ? ]

> Is there a strategy which can help me choose the right filename
> syntax, or is the file-expand-wildcards infloop just a bug which ought
> to be fixed?  (The fix could be as simple as making this an operation
> handled by filename handlers.)

I do think using [...] is a rather poor choice since it collides with the
wildchar patterns.  How about using parens instead ?

        Stefan "who liked the old Tramp syntax"

reply via email to

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