[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp (2.0.25); saving remote buffer fails
From: |
clemens fischer |
Subject: |
Re: tramp (2.0.25); saving remote buffer fails |
Date: |
29 Dec 2002 22:01:02 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i386-unknown-freebsd4.3) |
address@hidden (Kai Großjohann):
> Michael Albinus <address@hidden> writes:
>
>> And this one doesn't know what to do:
>>
>> (find-backup-file-name "/ftp:localhost:.emacs")
>> nil
>>
>> According to the documentation this is a valid answer ("If the value
>> is nil, don't make a backup.") Usually there doesn't seem to be a
>> problem if ange-ftp is used without Tramp. Hmm.
>
> `Hmm' indeed! I wonder what would happen if Tramp was removed from
> file-name-handler-alist and Ange-FTP was added and then Clemens tried
> to access the file via Ange-FTP (using the old syntax).
i didn't find a boiler-plate function to do this (how is this done
correctly? why isn't there a list-remove function using a
string-compare on car's?), so i did this:
;
; this is to remove tramp from the file handlers and re-instantiate ange-ftp:
;
(setq file-name-handler-alist '(
("\\.\\(GIF\\|JP\\(?:E?G\\)\\|P\\(?:BM\\|GM\\|N[GM]\\|PM\\)\\|TIFF?\\|X\\(?:[BP]M\\)\\|gif\\|jp\\(?:e?g\\)\\|p\\(?:bm\\|gm\\|n[gm]\\|pm\\)\\|tiff?\\|x\\(?:[bp]m\\)\\)\\'"
. image-file-handler)
;;;("\\`/[^/:]+:" . tramp-file-name-handler)
("\\`/:" . file-name-non-special)
))
;;; This regexp takes care of real ange-ftp file names (with a slash
;;; and colon).
;;; Don't allow the host name to end in a period--some systems use /.:
(or (assoc "^/[^/:]*[^/:.]:" file-name-handler-alist)
(setq file-name-handler-alist
(cons '("^/[^/:]*[^/:.]:" . ange-ftp-hook-function)
file-name-handler-alist)))
;;; This regexp recognizes absolute filenames with only one component,
;;; for the sake of hostname completion.
(or (assoc "^/[^/:]*\\'" file-name-handler-alist)
(setq file-name-handler-alist
(cons '("^/[^/:]*\\'" . ange-ftp-completion-hook-function)
file-name-handler-alist)))
according to what i found in ange-ftp.el. it worked, but i got
distracted by the following:
ftp> open ftp.linuxlupe.de
Connected to ftp.linuxlupe.de.
220 ProFTPD 1.2.2rc1 Server ready.
user "#!ino2" Turtle Power!
ftp> 331 Password required for #!ino2.
Password:
530 Login incorrect.
the original filename in my C-x C-f was, of course,
"/address@hidden:/", which asked for my password and produced
a valid completion buffer. i completed with a new filename at this
point, resulting in the funny error message above. it's funny
because i could nevertheless enter some contents to this new file and
save it. it also got saved on the server after C-x C-s.
> I hope I have time to debug this soon.
it is unfortunate that a filename of "/ftp:address@hidden:/"
(explicit ftp scheme) doesn't work.
clemens
ps: please change the MailFollowupTo appropriately, but it's nice to
know that things move on :)