Re: "Attempt to get a remote listening for the local file"
Joerg-Martin Schwarz (schwarz@hal1.physik.uni-dortmund.de)
Tue, 6 Dec 1994 11:29:02 +0100
JP>
JP> It seems that there is a bugglette/misunderstanding on my part in
JP> the use of efs-filename completions: when I tried to complete
JP>
JP> C-x C-f //the-tech.mit.edu:^ftp/pub/GNU-Emacs/faq TAB
JP> or
JP> C-x C-f //ftp.yukawa.kyoto-u.ac.jp:^ftp/
JP>
JP> I get an error, relating to the `^' in the filename above which
JP> the parser didn't seem to like with the error
JP>
JP> Attempt to get a remote listening for the local file
JP>
JP> I don't know if this is a feature or a bug??
JP>
It's a bug.
If e.g. "~root" == "/" on your machine, like on our machine
you get the substitutions
"/127.0.0.1:~root/" --> "/127.0.0.1://",
and the latter is expanded again to "/", due to an old but not so lucky
design decision of emacs.
The following works for me (line numbers may differ):
diff -u /u/schwarz/lisp/efs-1.14/efs.el.~2~.gz /u/schwarz/lisp/efs-1.14/efs.el.gz
--- /u/schwarz/lisp/efs-1.14/efs.el.~2~.gz Tue Dec 6 11:12:21 1994
+++ /u/schwarz/lisp/efs-1.14/efs.el.gz Tue Dec 6 11:12:21 1994
@@ -7081,11 +7081,12 @@
host (nth 2 s-c-res)
user (nth 3 s-c-res))
(cond ((string-match "^~[^/]*" path)
- (let ((start (match-end 0)))
- (setq path (concat
- (efs-expand-tilde
+ (let* ((start (match-end 0))
+ (tilde (efs-expand-tilde
(substring path 0 start)
- host-type host user)
+ host-type host user)))
+ (setq path (concat
+ (if (string-equal tilde "/") "" tilde)
(substring path start)))))
((and host-type (not (file-name-absolute-p path)))
;; We expand the empty string to a directory.
By the way, wouldn't it make sense to assume
(expand-file-name (expand-file-name fn)) == (expand-file-name fn)
and optimize expand-file-name for this case ?
--
Mit besten Gruessen,
Joerg-Martin Schwarz
/------------------------------+---------------------------------------------\
|Addresse: | e-mail: |
| Abteilung Physik (T III) | uph508@unidozr.hrz.uni-dortmund.de |
| Universitaet Dortmund | schwarz@{hal1,het}.physik.uni-dortmund.de |
| Otto Hahn-Strasse 4 |---------------------------------------------|
| D44221 Dortmund | |
|Telefon: | |
| +49/231/755-3581 | ___ |
|Fax: -3569 | (o o) |
\------------------------------+--ooO-(_)-Ooo--------------------------------/