emacs-pretest-bug
[Top][All Lists]
Advanced

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

backup-buffer fails when using ange-ftp


From: Chris Moore
Subject: backup-buffer fails when using ange-ftp
Date: 30 Apr 2003 01:35:15 +0100

In Emacs 21.2 I used to be able to use ange-ftp to edit files on a
remote machine via FTP.  On a recent build of Emacs from CVS,
however, I find that this no longer works due to backup-buffer
failing.

I know I could switch off the writing of backups when using ange-ftp
by setting ange-ftp-make-backup-files to nil, but that's not the
point.

backup-buffer uses backup-buffer-copy, which tries to use the file
modes that backup-buffer passed it.  backup-buffer passed it nil for
the modes, which it got by running (file-modes buffer-file-name).
file-modes doesn't work for ange-ftp paths.

In Emacs 21.2 this call to file-modes wasn't present in
backup-buffer - in fact the last but one line of backup-buffer in
Emacs 21.2 seems (to my untrained eye) to be doing nothing at all
with 'setmodes'.

Chris.



The backtrace is as follows:

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
  logand(nil 1023)
  (set-file-modes to-name (logand modes 1023))
  backup-buffer-copy("/address@hidden:/mydir/file.pl" 
"/address@hidden:/mydir/Backup/file.pl.~1~" nil)
  (if (or file-precious-flag backup-by-copying (and modes ...) (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()
  basic-save-buffer-2()
  basic-save-buffer-1()
  basic-save-buffer()
  save-buffer(1)
  call-interactively(save-buffer)

In GNU Emacs 21.3.50.1 (i386-mingw-nt5.1.2600)
 of 2003-04-22 on CHRISLAP
configured using `configure --with-gcc (3.2)'

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: ENG
  locale-coding-system: iso-latin-1
  default-enable-multibyte-characters: t

Recent messages:
Retrieving file.pl...done
Quit
Doing CD...done
Listing Backup/...done
Getting file.pl...done
Putting /address@hidden:/mydir/Backup/file.pl.~1~...done
Entering debugger...
Mark set [5 times]
Quit [2 times]
Loading emacsbug...done






reply via email to

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