[Top][All Lists]

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

Re: filecache.el questions

From: Ted Zlatanov
Subject: Re: filecache.el questions
Date: Thu, 02 Oct 2008 12:29:19 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.0.60 (gnu/linux)

On Thu, 2 Oct 2008 13:36:36 +0200 "Mathias Dahl" <address@hidden> wrote: 

>> in using filecache.el I found two issues I have for now addressed on my
>> own:
>> 1) the file-cache-alist is never saved.  This is a problem with large
>> file sets (incidentally, it would be nice if Emacs had a native way of
>> storing large data sets in an external database, as I mentioned).  I
>> wrote a serialization function that essentially dumps with prin1 and
>> princ and reads back with eval.  I also added a variable with the list
>> of locations that should be scanned at startup.

MD> I had the same problem when I learnt about this and I created a page
MD> over at EmacsWiki about it:

MD> http://www.emacswiki.org/cgi-bin/wiki/FileNameCache

My save method is a bit more complicated, since it uses a method similar
to how Gnus saves its newsrc file, and do more protection of the
contents (print-quoted, print-readably, etc.).  The file has one big
setq statement:

(setq file-cache-alist '(...))

MD> Nowadays I use `anything' and the `anything-c-source-file-cache'
MD> source instead of my old iswitchb hack. I even have a special command
MD> when I want to use `anything' just to get files from the cache (the
MD> cache is so large that I don't want it to be used for normal
MD> invocations of `anything'):

MD> (defun anything-file-cache ()
MD>   (interactive)
MD>   (let ((anything-sources
MD>          (list anything-c-source-file-cache)))
MD>     (anything)))

That's a much better way than what I proposed.  I hope anything.el makes
it into the Emacs core, it's a very useful package.  I'll be using it
rather than play around with completing-read, etc.


reply via email to

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