all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ramkumar R. Aiyengar" <andyetitmoves@gmail.com>
To: emacs-pretest-bug@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	[thread overview]
Message-ID: <9a9bfc170803211927g30372b2bo96fa85328ffa400e@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 2182 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 2962 bytes --]

             reply	other threads:[~2008-03-22  2:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-22  2:27 Ramkumar R. Aiyengar [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-04-07 15:18 23.0.60; find-backup-file-name assumes base name of backup file names Chong Yidong
2008-04-07 15:33 ` Ramkumar R. Aiyengar
2008-04-08  1:20   ` Chong Yidong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a9bfc170803211927g30372b2bo96fa85328ffa400e@mail.gmail.com \
    --to=andyetitmoves@gmail.com \
    --cc=emacs-pretest-bug@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.