GNU bug report logs - #75
23.0.60; find-backup-file-name assumes base name of backup file names

Previous Next

Package: emacs;

Reported by: "Ramkumar R. Aiyengar" <andyetitmoves <at> gmail.com>

Date: Sat, 22 Mar 2008 16:35:03 UTC

Severity: normal

Done: Chong Yidong <cyd <at> stupidchicken.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 75 in the body.
You can then email your comments to 75 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-submit-list <at> lists.donarmstrong.com, Emacs Bugs <bug-gnu-emacs <at> gnu.org>:
bug#75; Package emacs. Full text and rfc822 format available.

Acknowledgement sent to "Ramkumar R. Aiyengar" <andyetitmoves <at> gmail.com>:
New bug report received and forwarded. Copy sent to Emacs Bugs <bug-gnu-emacs <at> gnu.org>. Full text and rfc822 format available.

Message #5 received at submit <at> emacsbugs.donarmstrong.com (full text, mbox):

From: "Ramkumar R. Aiyengar" <andyetitmoves <at> gmail.com>
To: emacs-pretest-bug <at> gnu.org
Subject: 23.0.60;
	find-backup-file-name assumes base name of backup file names
Date: Sat, 22 Mar 2008 02:27:39 +0000
[Message part 1 (text/plain, inline)]
Hi!

make-backup-file-name-function is a customizable variable in files.el for
deciding the backup file name for a file. find-backup-file-name uses
make-backup-file-name-1 for finding out the base names of the backup files:

from find-backup-file-name:

    (let* ((basic-name (make-backup-file-name-1 fn))
           (base-versions (concat (file-name-nondirectory basic-name)
                      ".~"))

This assumes that make-backup-file-name is used for generating the backup
file
names, while make-backup-file-name-function could be customized. The result
of
this is, any customization to make-backup-file-name-function doesn't work as
expected when the backup file name is in a different place than what is
provided
by the stock function (like say, a different directory).

Changing the code above to:

    (let* ((basic-name (file-name-sans-versions (make-backup-file-name fn)))
           (base-versions (concat (file-name-nondirectory basic-name)
                      ".~"))

would solve this problem, as this would go through the proper hook.

Ramkumar.

PS: Please CC me in the replies: I am not a part of the list.

In GNU Emacs 23.0.60.1 (i486-pc-linux-gnu, GTK+ Version 2.12.9)
 of 2008-03-20 on elegiac, modified by Debian
 (emacs-snapshot package, version 1:20080320-1)
Windowing system distributor `The X.Org Foundation', version 11.0.10300000
configured using `configure  '--build' 'i486-linux-gnu' '--host'
'i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib'
'--libexecdir=/usr/lib' '--localstatedir=/var' '--infodir=/usr/share/info'
'--mandir=/usr/share/man' '--with-pop=yes'
'--enable-locallisppath=/etc/emacs-snapshot:/etc/emacs:/usr/local/share/emacs/23.0.60/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.0.60/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.0.60/leim'
'--with-x=yes' '--with-x-toolkit=gtk' 'build_alias=i486-linux-gnu'
'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -DSITELOAD_PURESIZE_EXTRA=5000
-g -O2''

-- 
One of the main causes of the fall of the Roman Empire
was that, lacking zero, they had no way to indicate
successful termination of their C programs.
                             -- Robert Firth
[Message part 2 (text/html, inline)]

Reply sent to Chong Yidong <cyd <at> stupidchicken.com>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to "Ramkumar R. Aiyengar" <andyetitmoves <at> gmail.com>:
bug acknowledged by developer. Full text and rfc822 format available.

Message #10 received at 75-close <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Chong Yidong <cyd <at> stupidchicken.com>
To: 75-close <at> debbugs.gnu.org
Subject: Re: 23.0.60; find-backup-file-name assumes base name of backup file names
Date: Mon, 07 Apr 2008 21:21:28 -0400



bug archived. Request was from Debbugs Internal Request <don <at> donarmstrong.com> to internal_control <at> emacsbugs.donarmstrong.com. (Tue, 06 May 2008 14:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 15 years and 265 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.