emacs-devel
[Top][All Lists]
Advanced

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

Re: backup method


From: Richard Stallman
Subject: Re: backup method
Date: Fri, 28 Jan 2005 23:16:34 -0500

    My prove is:

      unset TMP TMPDIR
      export VISUAL='emacs -q' # which does backup by moving by default
      crontab -e

    And you can edit your crontab fine since emacs won't make a backup
    of files in /tmp

So you're not editing the crontab files under their real names, but
rather, editing copies that were made in /tmp?

If so, I understand the situation now.  Thanks.  Does this fix it?


*** files.el    24 Jan 2005 20:08:31 -0500      1.743
--- files.el    28 Jan 2005 09:33:33 -0500      
***************
*** 2844,2856 ****
  
  (defun normal-backup-enable-predicate (name)
    "Default `backup-enable-predicate' function.
! Checks for files in `temporary-file-directory' or
! `small-temporary-file-directory'."
    (not (or (let ((comp (compare-strings temporary-file-directory 0 nil
                                        name 0 nil)))
             ;; Directory is under temporary-file-directory.
             (and (not (eq comp t))
                  (< comp (- (length temporary-file-directory)))))
           (if small-temporary-file-directory
               (let ((comp (compare-strings small-temporary-file-directory
                                            0 nil
--- 2844,2861 ----
  
  (defun normal-backup-enable-predicate (name)
    "Default `backup-enable-predicate' function.
! Checks for files in `temporary-file-directory',
! `small-temporary-file-directory', and /tmp."
    (not (or (let ((comp (compare-strings temporary-file-directory 0 nil
                                        name 0 nil)))
             ;; Directory is under temporary-file-directory.
             (and (not (eq comp t))
                  (< comp (- (length temporary-file-directory)))))
+          (let ((comp (compare-strings "/tmp" 0 nil
+                                       name 0 nil)))
+            ;; Directory is under /tmp.
+            (and (not (eq comp t))
+                 (< comp (- (length "/tmp")))))
           (if small-temporary-file-directory
               (let ((comp (compare-strings small-temporary-file-directory
                                            0 nil




reply via email to

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