From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Barry Margolin Newsgroups: gmane.emacs.help Subject: Re: autosave/backup file problem Date: Fri, 15 Jun 2012 16:52:38 -0400 Organization: A noiseless patient Spider Message-ID: References: NNTP-Posting-Host: plane.gmane.org X-Trace: dough.gmane.org 1339793715 24394 80.91.229.3 (15 Jun 2012 20:55:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 15 Jun 2012 20:55:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jun 15 22:55:15 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SfdY0-0008VL-Kk for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jun 2012 22:55:12 +0200 Original-Received: from localhost ([::1]:47992 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SfdY0-00014V-Le for geh-help-gnu-emacs@m.gmane.org; Fri, 15 Jun 2012 16:55:12 -0400 Original-Path: usenet.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!news-2.dfn.de!news.dfn.de!feeder.erje.net!news2.arglkargh.de!news.mixmin.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 47 Injection-Info: barmar.motzarella.org; posting-host="ePtxJaRXJPFeIWBMlKfZaA"; logging-data="32371"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Z9XSpkpF2qEiaf8xxd4D6" User-Agent: MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) Cancel-Lock: sha1:My6/UzDEFGhnWd/F7AWmMEmARWw= Original-Xref: usenet.stanford.edu gnu.emacs.help:192858 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:85257 Archived-At: In article , Jannis wrote: > Hi emacs users, > > > i have the problem that emacs creates > > .#filename.txt > > files in the directory file while working on a file. These files create > problems when I want to automatically create Software packages of the > parent folder. > > Is there any way to tell emacs to create these files in a different > location? > > > I have put the following in my .emacs file but it seems to not change > the behaviour of the above mentioned files: > > > ;; Put autosave files (ie #foo#) and backup files (ie foo~) in ~/.emacs.d/. > (custom-set-variables > '(auto-save-file-name-transforms '((".*" "~/.emacs.d/autosaves/\\1" t))) > '(backup-directory-alist '((".*" . "~/.emacs.d/backups/")))) Two problems: 1. custom-set-variables doesn't evaluate the value part of each argument list, so you shouldn't have the inner quotes. 2. Your regexp for auto-save-file-name-transforms doesn't contain any \\(...\\), so there's nothing for \\1 to be replaced with. Use \\& to substitute the entire matched string, or write a more complex regular expression where \\1 picks up just the filename part of the pathname. > > > Thanks a lot for your help! > > Jannis -- Barry Margolin, barmar@alum.mit.edu Arlington, MA *** PLEASE post questions in newsgroups, not directly to me ***