help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Backup Blacklist


From: Juanma Barranquero
Subject: Re: Backup Blacklist
Date: Wed, 3 Jan 2007 12:56:43 +0100

On 1/3/07, Matthew Flaschen <matthew.flaschen@gatech.edu> wrote:

(and it's still
not persistent if you put it in .emacs, just repeated)

That's a kind of Emacs persistency :)

I'll see if I can
rig up a persistent version.

It shouldn't be difficult: you use `kill-emacs-hook' to save the data
to a file in your home dir, and load it again in your .emacs.

For example, you can add the following to your .emacs:

(add-hook 'kill-emacs-hook
         #'(lambda ()
             (with-temp-file "~/.emacs.d/persistent-excludes"
               (mapc #'(lambda (file)
                         (insert (format "(my-exclude-from-backup
\"%s\")\n" file)))
                     (get 'my-exclude-from-backup :files)))))

(load-file "~/.emacs.d/persistent-excludes")

                   /L/e/k/t/u




reply via email to

[Prev in Thread] Current Thread [Next in Thread]