Subject: bug#12694: 24.2.50; `file-cache-add-file(-list)' commands

From: Chong Yidong <[email-masked]>
Date: Sat, 17 Nov 2012 14:22:57 +0800

"Drew Adams" <[email-masked]> writes:

> 2. Doc string of `file-cache-add-file-list':
>  
> a. Typo: "files names" -> "file names".
>  
> b. The doc string should say that the input you provide is read as a
> Lisp sexp and evaluated to produce a list of (absolute?) file names.

Fixed in the branch, thanks.

> 3. A cursory scan of the code suggests that the behavior might not be
> correct if you input a relative file name to `file-cache-add-file-list'.

Fixed in trunk.

> 4. `file-cache-add-file': Why does the file need to exist for
> interactive use?

I believe that's somewhat inherent in the design of filecache.el.  The
package assumes that the cached file names have unique non-directory
parts.  If `file-cache-add-file' lets you enter a non-existent file
name, and that inadvertently has the same non-directory part as an
existing cache entry, the result would be to wipe out the cache entry
for the existing file in favor of a non-existent entry, which would be
annoying.  That said, I don't personally use filecache.el; this is only
from my reading of the code.