* How i can backup files in one particular directory?
@ 2002-07-16 4:17 Shailesh Joshi
2002-07-16 9:51 ` Luis O. Silva
0 siblings, 1 reply; 2+ messages in thread
From: Shailesh Joshi @ 2002-07-16 4:17 UTC (permalink / raw)
Hi,
How i can store backup files (which are created by
emacs) in one particular directory?
If possible please send me .emacs code too.
Thanks,
Shailesh
__________________________________________________
Do You Yahoo!?
Yahoo! Autos - Get free new car price quotes
http://autos.yahoo.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: How i can backup files in one particular directory?
2002-07-16 4:17 How i can backup files in one particular directory? Shailesh Joshi
@ 2002-07-16 9:51 ` Luis O. Silva
0 siblings, 0 replies; 2+ messages in thread
From: Luis O. Silva @ 2002-07-16 9:51 UTC (permalink / raw)
Cc: help-gnu-emacs
Hi, Shailesh
On Mon, 15 Jul 2002 21:17:23 -0700 (PDT), Shailesh Joshi writes:
Shailesh> ... How i can store backup files (which are
Shailesh> created by emacs) in one particular directory?
Shailesh> If possible please send me .emacs code too.
Dealing with emacs backup files is explained in the subsection
*Backup* within the *Saving files* section of the Emacs
Manual. Here is a quotation:
"you can customize the variable `backup-directory-alist' to
specify that files matching certain patterns should be
backed up in specific directories".
"A typical use is to add an element `("." . DIR)' to make
all backups in the directory with absolute name DIR; Emacs
modifies the backup file names to avoid clashes between
files with the same names originating in different
directories. Alternatively, adding, say, `("." . ".~")'
would make backups in the invisible subdirectory `.~' of
the original file's directory. Emacs creates the
directory, if necessary, to make the backup."
The following is a snippet of my .emacs. You must read the
*Backup* subsection in order to adapt it for you.
;; ------------------ Setting the handling of backups -------------------
(setq backup-directory-alist
'((".+\\.tex$" . "~/backup/tex")
("/[^\\./]+\\..+$" . "~/backup/code")
("/[^\\.]+$" . "~/backup")
("/\\.." . "~/backup/dotfiles")))
;; backup variables
(setq
version-control t
kept-new-versions 6
kept-old-versions 6
)
;; ---------------------- End handling of backups------------------------
Regards,
luis
--
Luis Octavio Silva P.
St. Petersburg State University.
66/3 Botanicheskaya St., Apt.119/2
Stary Peterhof
St. Petersburg, Russia.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-07-16 9:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-07-16 4:17 How i can backup files in one particular directory? Shailesh Joshi
2002-07-16 9:51 ` Luis O. Silva
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).