From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Luis O. Silva" Newsgroups: gmane.emacs.help Subject: Re: How i can backup files in one particular directory? Date: Tue, 16 Jul 2002 13:51:03 +0400 Sender: help-gnu-emacs-admin@gnu.org Message-ID: <15667.60551.746478.54111@localhost.localdomain> References: <20020716041723.89292.qmail@web14808.mail.yahoo.com> Reply-To: "Luis O. Silva" NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: main.gmane.org 1026812387 22649 127.0.0.1 (16 Jul 2002 09:39:47 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 16 Jul 2002 09:39:47 +0000 (UTC) Cc: help-gnu-emacs@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17UOo6-0005tC-00 for ; Tue, 16 Jul 2002 11:39:46 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17UOnb-0002Jw-00; Tue, 16 Jul 2002 05:39:15 -0400 Original-Received: from relay.wplus.net ([195.131.52.142]) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17UOmy-0002JI-00 for ; Tue, 16 Jul 2002 05:38:36 -0400 X-Real-To: Original-Received: from emaile.wplus.net (email.wplus.net [195.131.52.155]) by relay.wplus.net (8.9.1/8.9.1/wplus.2) with ESMTP id NAA26402 for ; Tue, 16 Jul 2002 13:38:34 +0400 (MSD) Original-Received: by emaile.wplus.net with scanned-ok (WebPlus antispam mailer ) id 17UOmr-000AH3-00 for help-gnu-emacs@gnu.org; Tue, 16 Jul 2002 13:38:29 +0400 Original-Received: from [195.131.50.200] (helo=localhost.localdomain) by emaile.wplus.net with esmtp (WebPlus antispam mailer ) id 17UOmp-000AGi-00; Tue, 16 Jul 2002 13:38:28 +0400 Original-To: Shailesh Joshi In-Reply-To: <20020716041723.89292.qmail@web14808.mail.yahoo.com> X-Mailer: VM 6.97 under Emacs 21.1.1 X-Virus-Scanned: by AVP (http://www.avp.ru/) X-IP: 195.131.50.200 X-From: silva@paloma.spbu.ru Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:664 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:664 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.