[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: backup-buffer-copy loops if old backup can't be deleted
From: |
martin rudalics |
Subject: |
Re: backup-buffer-copy loops if old backup can't be deleted |
Date: |
Tue, 21 Aug 2007 16:37:32 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> There now is a patch to fix this, provided by Ulrich Mueller.
> Original URL: http://bugs.gentoo.org/attachment.cgi?id=128742
>
> =================== emacs-22.1-backup-buffer.patch ===================
> --- emacs-22.1.orig/lisp/files.el 2007-05-25 14:43:31.000000000 +0200
> +++ emacs-22.1/lisp/files.el 2007-08-21 08:26:36.000000000 +0200
> @@ -3119,9 +3119,8 @@ backup-buffer-copy (from-name to-name modes)
> (set-default-file-modes ?\700)
> (while (condition-case ()
> (progn
> - (condition-case nil
> - (delete-file to-name)
> - (file-error nil))
> + (and (file-exists-p to-name)
> + (delete-file to-name))
> (copy-file from-name to-name nil t)
> nil)
> (file-already-exists t))
> =============== end of emacs-22.1-backup-buffer.patch ===============
Did you apply that patch? Suppose the file to-name exists but cannot be
deleted. `copy-file' will raise its `file-already-exists' error and you
remain trapped in that loop.
You have to either change the backup file's permissions from within the
`condition-case' or mandate error handling up to `backup-buffer' where
it attempts to do the (convert-standard-filename "~/%backup%~") stuff.
I can't test these solutions here since my file system doesn't provide
permissions.
- backup-buffer-copy loops if old backup can't be deleted, Martin von Gagern, 2007/08/20
- Re: backup-buffer-copy loops if old backup can't be deleted, Martin von Gagern, 2007/08/20
- Re: backup-buffer-copy loops if old backup can't be deleted, Martin von Gagern, 2007/08/21
- Re: backup-buffer-copy loops if old backup can't be deleted,
martin rudalics <=
- Re: backup-buffer-copy loops if old backup can't be deleted, Martin von Gagern, 2007/08/21
- Re: backup-buffer-copy loops if old backup can't be deleted, martin rudalics, 2007/08/21
- Re: backup-buffer-copy loops if old backup can't be deleted, Glenn Morris, 2007/08/21
- Re: backup-buffer-copy loops if old backup can't be deleted, martin rudalics, 2007/08/21
- Re: backup-buffer-copy loops if old backup can't be deleted, Glenn Morris, 2007/08/21
- Re: backup-buffer-copy loops if old backup can't be deleted, Martin von Gagern, 2007/08/22
- Re: backup-buffer-copy loops if old backup can't be deleted, martin rudalics, 2007/08/22
- Re: backup-buffer-copy loops if old backup can't be deleted, Martin von Gagern, 2007/08/22
- Re: backup-buffer-copy loops if old backup can't be deleted, martin rudalics, 2007/08/22
- Re: backup-buffer-copy loops if old backup can't be deleted, Michael Schierl, 2007/08/22