[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: |
Kai Großjohann |
Subject: |
Re: tramp (2.0.25); saving remote buffer fails |
Date: |
Sat, 28 Dec 2002 23:56:10 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) |
"clemens fischer" <address@hidden> writes:
> address@hidden (Kai Grojohann):
>
>> "Clemens Fischer" <address@hidden> writes:
>>
>>> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
>>> logand(nil 3072)
>>> byte-code("
>>
>> Could you produce another backtrace with more Lisp and less
>> bytecode? The solution is to look below the bytecode to find the
>> function that was called, then to find the *.el file containing this
>> function, and to load that with M-x load-library RET. Repeat if the
>> new backtrace still has bytecode.
>
> here we go:
>
> Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
> logand(nil 3072)
> (< 0 (logand modes 3072))
> (or file-precious-flag backup-by-copying (< 0 (logand modes 3072)) (and
> backup-by-copying-when-linked (> ... 1)) (and (or
> backup-by-copying-when-mismatch ...) (let ... ...)))
> (if (or file-precious-flag backup-by-copying (< 0 ...) (and
> backup-by-copying-when-linked ...) (and ... ...)) (backup-buffer-copy
> real-file-name backupname modes) (rename-file real-file-name backupname t)
> (setq setmodes (cons modes backupname)))
> (condition-case nil (if (or file-precious-flag backup-by-copying ... ...
> ...) (backup-buffer-copy real-file-name backupname modes) (rename-file
> real-file-name backupname t) (setq setmodes ...)) (file-error (setq
> backupname ...) (message "Cannot write backup file; backing up in %s" ...)
> (sleep-for 1) (backup-buffer-copy real-file-name backupname modes)))
> (let ((delete-old-versions ...) (modes ...)) (condition-case nil (if ...
> ... ... ...) (file-error ... ... ... ...)) (setq buffer-backed-up t) (if
> delete-old-versions (while targets ... ...)) setmodes)
> (condition-case nil (let (... ...) (condition-case nil ... ...) (setq
> buffer-backed-up t) (if delete-old-versions ...) setmodes) (file-error nil))
> (if backup-info (condition-case nil (let ... ... ... ... setmodes)
> (file-error nil)))
> (let ((real-file-name buffer-file-name) backup-info backupname targets
> setmodes) (setq real-file-name (file-chase-links real-file-name)) (setq
> backup-info (find-backup-file-name real-file-name) backupname (car
> backup-info) targets (cdr backup-info)) (if backup-info (condition-case nil
> ... ...)))
> (if (and make-backup-files (not backup-inhibited) (not buffer-backed-up)
> (file-exists-p buffer-file-name) (memq ... ...)) (let (... backup-info
> backupname targets setmodes) (setq real-file-name ...) (setq backup-info ...
> backupname ... targets ...) (if backup-info ...)))
> backup-buffer()
Hm. So `modes' was nil. But why? The critical part is here:
(let ((delete-old-versions
;; If have old versions to maybe delete,
;; ask the user to confirm now, before doing anything.
;; But don't actually delete til later.
(and targets
(or (eq delete-old-versions t) (eq
delete-old-versions nil))
(or delete-old-versions
(y-or-n-p (format "Delete excess backup
versions of %s? "
real-file-name)))))
(modes (file-modes buffer-file-name))) <--- HERE
;; Actually write the back up file.
(condition-case ()
(if (or file-precious-flag
See how `modes' is set? Well, I wonder how that happens. So please
try this: position point inside that function and do M-x edebug-defun
RET. Now do whatever produced the error. The debugger will show you
the source code with an `=>' arrow indicating the current line. Now
you can use SPC to single-step execution. As it evals an expression,
the echo area will show the result.
I'm interested in two questions: (1) What is the value of
buffer-file-name, and (2) what is the return value of (file-modes
buffer-file-name)?
I think that (2) will be nil. But how does that come about?
tramp-handle-file-modes should have been invoked, one could trace it
with M-x edebug-defun RET, as before.
Hm. Maybe ange-ftp doesn't implement file-modes? Maybe that's the
reason? Yeah, that's possible. Oh, boy.
So maybe what should REALLY happen is that Tramp supports the
operation find-backup-file-name and that tramp-ftp.el invokes
ange-ftp correctly. But I don't grok this sufficiently well.
Maybe I should install an ftp server and then try to test it myself.
Can you give me the values of all variables that have something to do
with backup? M-x apropos-variable RET backup RET should provide a
list.
Sorry for taking so long to respond. I was really really swamped.
--
Ambibibentists unite!
- Re: tramp (2.0.25); saving remote buffer fails,
Kai Großjohann <=