emacs-devel
[Top][All Lists]
Advanced

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

Optional argument for `file-local-copy'


From: Michael Albinus
Subject: Optional argument for `file-local-copy'
Date: Sat, 29 Nov 2014 12:29:21 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hi,

I would like to introduce an optional argument REUSE-IF-ALREADY-EXISTS
for `file-local-copy'. The docstring would be something like this:

--8<---------------cut here---------------start------------->8---
file-local-copy is a compiled Lisp function in `files.el'.

(file-local-copy FILE &optional REUSE-IF-ALREADY-EXISTS)

Copy the file FILE into a temporary file on this machine.
Returns the name of the local copy, or nil, if FILE is directly
accessible.

If REUSE-IF-ALREADY-EXISTS is non-nil, if there exists already a local
copy of FILE, and if the file attributes of FILE have not been changed
since the last copy operation, the name of the existing local copy of
FILE will be returned.
--8<---------------cut here---------------end--------------->8---

A typical use case for this has been discussed on the org-mode ML
<http://thread.gmane.org/gmane.emacs.orgmode/92856/focus=92970>. The
idea there is to cache downloaded images. But this parameter could be
used for caching copies of remote files in general.

Comments?

Best regards, Michael.



reply via email to

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