From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Ramkumar R. Aiyengar" Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs 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-ID: <9a9bfc170803211927g30372b2bo96fa85328ffa400e@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_3909_6516149.1206152859492" X-Trace: ger.gmane.org 1206153824 15384 80.91.229.12 (22 Mar 2008 02:43:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 22 Mar 2008 02:43:44 +0000 (UTC) To: emacs-pretest-bug@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 22 03:44:14 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JctiH-0002k0-Be for ged-emacs-devel@m.gmane.org; Sat, 22 Mar 2008 03:44:14 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JcthZ-0003gK-5z for ged-emacs-devel@m.gmane.org; Fri, 21 Mar 2008 22:43:21 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JctSX-00021T-Ot for emacs-devel@gnu.org; Fri, 21 Mar 2008 22:27:49 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JctSW-00021H-77 for emacs-devel@gnu.org; Fri, 21 Mar 2008 22:27:48 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JctSW-00021E-1L for emacs-devel@gnu.org; Fri, 21 Mar 2008 22:27:48 -0400 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JctSW-00039g-0N for emacs-devel@gnu.org; Fri, 21 Mar 2008 22:27:48 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JctSV-0001tw-Dw for emacs-pretest-bug@gnu.org; Fri, 21 Mar 2008 22:27:47 -0400 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JctSS-00038w-Le for emacs-pretest-bug@gnu.org; Fri, 21 Mar 2008 22:27:47 -0400 Original-Received: from wa-out-1112.google.com ([209.85.146.177]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JctSS-00038Q-5j for emacs-pretest-bug@gnu.org; Fri, 21 Mar 2008 22:27:44 -0400 Original-Received: by wa-out-1112.google.com with SMTP id k34so2050828wah.10 for ; Fri, 21 Mar 2008 19:27:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; bh=bAesxUokM0rTam4D4TI+vCHXGf8w23qMBakZ1i0kdkU=; b=Z0BiWOnO1njvca1q/0a9423s6dY3zpGz+EgCLqETANz7spJAaxohr3DUQjEJ71Wi/nZZRtWTcr94O+aGAdpI415J9yTBHiquC0u9cF3rTjq6Zggz/qAFyZzFbjjt4wrZ18iFF7N7S0F7b3CXGMjJk5ctFcMR0JTXxJFoGUVSBZA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=message-id:date:from:to:subject:mime-version:content-type; b=c3ctp5Huzj9Z4QJbS4w2+QvdDvjbkcn3NOJbXxauE8RFiMia07ekLYqC/VSXrOQdg75NsaAD7xJ4Jd2IZ64ad7DIYGjeYwwOCcDRbe/wkvk23FOMShAkKb09i1rpnNGdVPydQHukjI62oBHn/m6Kss6KqrnbOBcELdpSZSBGRzI= Original-Received: by 10.114.135.1 with SMTP id i1mr7097276wad.115.1206152859497; Fri, 21 Mar 2008 19:27:39 -0700 (PDT) Original-Received: by 10.114.125.11 with HTTP; Fri, 21 Mar 2008 19:27:39 -0700 (PDT) X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 2) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-Mailman-Approved-At: Fri, 21 Mar 2008 22:41:46 -0400 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:93163 gmane.emacs.pretest.bugs:21644 Archived-At: ------=_Part_3909_6516149.1206152859492 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: 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 ------=_Part_3909_6516149.1206152859492 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: 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-tool kit=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

------=_Part_3909_6516149.1206152859492--