Kit-Yan Choi <k...@kychoi.org> writes:

> But is it theoretically possible to have two remote file paths sharing
> the same local copy file name? i.e. `make-temp-file' generates the
> same temporary file name for two separate calls?

No, never ever. After choosing a random file name, make-temp-file checks
whether there exists already such a file. In case of yes, it chosses
another random file name, and so on.

> As far as org-mode is concerned, and assuming the current stable
> version of tramp, I think there are two options (1) the current
> approach which preserves the path of the remote file and therefore
> avoid unnecessary downloads; however we forgo the capability of
> compression that tramp's file-local-copy offers, (2) use
> `file-local-copy' but risk overwriting (albeit unlikely) downloaded
> local copy; this is possible with or with out a look-up table for
> reusing files.

Again, the risk of overwriting something else does not exist.

> Thanks,
> Kit

Best regards, Michael.

Reply via email to