* universal backup directory
@ 2003-01-27 15:43 john doe
0 siblings, 0 replies; 8+ messages in thread
From: john doe @ 2003-01-27 15:43 UTC (permalink / raw)
I have the following entry in my dotfile:
;; MAKE ALL BACKUPS TO A SINGLE DIRECTORY
(setq backup-directory-alist `(("." .
,(file-name-nondirectory "~/.emacs_backups"))))
This will make backups in the current directory to a
dir called .emacs_backups -- however, is there a way
to make one universal backup directory that all emacs
files go to regardless of where they are saved?
Thanks!
__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: universal backup directory
[not found] <mailman.1039.1043683280.21513.help-gnu-emacs@gnu.org>
@ 2003-01-27 17:48 ` Kai Großjohann
2003-01-27 19:27 ` Jay Belanger
2003-01-27 21:25 ` Stefan Monnier <foo@acm.com>
2003-01-27 17:56 ` Phillip Lord
2003-01-27 18:02 ` Benjamin Riefenstahl
2 siblings, 2 replies; 8+ messages in thread
From: Kai Großjohann @ 2003-01-27 17:48 UTC (permalink / raw)
john doe <m0nkeyd0g2000@yahoo.com> writes:
> ;; MAKE ALL BACKUPS TO A SINGLE DIRECTORY
> (setq backup-directory-alist `(("." .
> ,(file-name-nondirectory "~/.emacs_backups"))))
>
> This will make backups in the current directory to a
> dir called .emacs_backups -- however, is there a way
> to make one universal backup directory that all emacs
> files go to regardless of where they are saved?
Doesn't the above do that? It chooses ~/.emacs_backups for all
directory names which contain at least one non-newline character,
IIUC.
--
Ambibibentists unite!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: universal backup directory
[not found] <mailman.1039.1043683280.21513.help-gnu-emacs@gnu.org>
2003-01-27 17:48 ` universal backup directory Kai Großjohann
@ 2003-01-27 17:56 ` Phillip Lord
2003-01-27 18:02 ` Benjamin Riefenstahl
2 siblings, 0 replies; 8+ messages in thread
From: Phillip Lord @ 2003-01-27 17:56 UTC (permalink / raw)
>>>>> "john" == john doe <m0nkeyd0g2000@yahoo.com> writes:
john> I have the following entry in my dotfile:
john> ;; MAKE ALL BACKUPS TO A SINGLE DIRECTORY (setq
john> ;; backup-directory-alist
john> `(("." . ,(file-name-nondirectory "~/.emacs_backups"))))
john> This will make backups in the current directory to a dir
john> called .emacs_backups -- however, is there a way to make one
john> universal backup directory that all emacs files go to
john> regardless of where they are saved?
The "backup-dir" package does exactly what you want. I've used it for
a while, and found it to do what I want. google will provide, I'm
sure.
Phil
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: universal backup directory
[not found] <mailman.1039.1043683280.21513.help-gnu-emacs@gnu.org>
2003-01-27 17:48 ` universal backup directory Kai Großjohann
2003-01-27 17:56 ` Phillip Lord
@ 2003-01-27 18:02 ` Benjamin Riefenstahl
2 siblings, 0 replies; 8+ messages in thread
From: Benjamin Riefenstahl @ 2003-01-27 18:02 UTC (permalink / raw)
john doe <m0nkeyd0g2000@yahoo.com> writes:
> ;; MAKE ALL BACKUPS TO A SINGLE DIRECTORY
> (setq backup-directory-alist `(("." .
> ,(file-name-nondirectory "~/.emacs_backups"))))
>
> This will make backups in the current directory to a dir called
> .emacs_backups -- however, is there a way to make one universal
> backup directory that all emacs files go to regardless of where they
> are saved?
Read the variable documentation.
Hope this helps, benny
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: universal backup directory
2003-01-27 17:48 ` universal backup directory Kai Großjohann
@ 2003-01-27 19:27 ` Jay Belanger
2003-01-27 20:02 ` Todd Wylie
2003-01-27 21:25 ` Stefan Monnier <foo@acm.com>
1 sibling, 1 reply; 8+ messages in thread
From: Jay Belanger @ 2003-01-27 19:27 UTC (permalink / raw)
john doe <m0nkeyd0g2000@yahoo.com> writes:
> ;; MAKE ALL BACKUPS TO A SINGLE DIRECTORY
> (setq backup-directory-alist `(("." .
> ,(file-name-nondirectory "~/.emacs_backups"))))
>
> This will make backups in the current directory to a
> dir called .emacs_backups -- however, is there a way
> to make one universal backup directory that all emacs
> files go to regardless of where they are saved?
The `file-name-nondirectory' strips the "~/" from "~/.emacs_backups",
and so what you have is equivalent to
(setq backup-directory-alist '(("." ".emacs_backups")))
and so .emacs_backup is put in the current directory. You probably
want
(setq backup-directory-alist '(("." "~/.emacs_backups")))
Jay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: universal backup directory
2003-01-27 19:27 ` Jay Belanger
@ 2003-01-27 20:02 ` Todd Wylie
2003-01-27 22:49 ` Kevin Rodgers
0 siblings, 1 reply; 8+ messages in thread
From: Todd Wylie @ 2003-01-27 20:02 UTC (permalink / raw)
Using:
(setq backup-directory-alist '(("." . "~/.emacs_backups")))
Seems to do the trick... thanks! Interestingly, filenames seem to be keeping entire directory path and simply replacing "/" with "!".
Cheers.
Jay Belanger <belanger@truman.edu> writes:
> john doe <m0nkeyd0g2000@yahoo.com> writes:
>
> > ;; MAKE ALL BACKUPS TO A SINGLE DIRECTORY
> > (setq backup-directory-alist `(("." .
> > ,(file-name-nondirectory "~/.emacs_backups"))))
> >
> > This will make backups in the current directory to a
> > dir called .emacs_backups -- however, is there a way
> > to make one universal backup directory that all emacs
> > files go to regardless of where they are saved?
>
> The `file-name-nondirectory' strips the "~/" from "~/.emacs_backups",
> and so what you have is equivalent to
>
> (setq backup-directory-alist '(("." ".emacs_backups")))
>
> and so .emacs_backup is put in the current directory. You probably
> want
>
> (setq backup-directory-alist '(("." "~/.emacs_backups")))
>
> Jay
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: universal backup directory
2003-01-27 17:48 ` universal backup directory Kai Großjohann
2003-01-27 19:27 ` Jay Belanger
@ 2003-01-27 21:25 ` Stefan Monnier <foo@acm.com>
1 sibling, 0 replies; 8+ messages in thread
From: Stefan Monnier <foo@acm.com> @ 2003-01-27 21:25 UTC (permalink / raw)
>> (setq backup-directory-alist
>> `(("." . ,(file-name-nondirectory "~/.emacs_backups"))))
Use
(setq backup-directory-alist
`(("" . ,(file-name-nondirectory "~/.emacs_backups"))))
if you want it to work with file names that only contain line-feeds.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: universal backup directory
2003-01-27 20:02 ` Todd Wylie
@ 2003-01-27 22:49 ` Kevin Rodgers
0 siblings, 0 replies; 8+ messages in thread
From: Kevin Rodgers @ 2003-01-27 22:49 UTC (permalink / raw)
Todd Wylie wrote:
> Interestingly, filenames seem to be keeping entire directory path and
> simply replacing "/" with "!".
So that files with the same name in different directories can be backed up
(e.g. /a/b/c/foo and /x/y/z/foo).
--
<a href="mailto:<kevin.rodgers@ihs.com>">Kevin Rodgers</a>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-01-27 22:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <mailman.1039.1043683280.21513.help-gnu-emacs@gnu.org>
2003-01-27 17:48 ` universal backup directory Kai Großjohann
2003-01-27 19:27 ` Jay Belanger
2003-01-27 20:02 ` Todd Wylie
2003-01-27 22:49 ` Kevin Rodgers
2003-01-27 21:25 ` Stefan Monnier <foo@acm.com>
2003-01-27 17:56 ` Phillip Lord
2003-01-27 18:02 ` Benjamin Riefenstahl
2003-01-27 15:43 john doe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).