[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: autosave/backup file problem
From: |
Barry Margolin |
Subject: |
Re: autosave/backup file problem |
Date: |
Fri, 15 Jun 2012 16:52:38 -0400 |
User-agent: |
MT-NewsWatcher/3.5.3b3 (Intel Mac OS X) |
In article <mailman.2895.1339792377.855.help-gnu-emacs@gnu.org>,
Jannis <bt_jannis@yahoo.de> 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 ***