From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Albinus Subject: Re: [Patch] org-display-inline-images: Add support for remote images Date: Sat, 29 Nov 2014 11:50:50 +0100 Message-ID: <8738922sc5.fsf@gmx.de> References: <87vbm3of2o.fsf@selenimh.mobile.lan> <87bnnv1e95.fsf@gmx.de> <8761e31aa6.fsf@gmx.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57843) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XufcG-0000UY-NY for emacs-orgmode@gnu.org; Sat, 29 Nov 2014 05:51:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xufc7-0006oZ-Mv for emacs-orgmode@gnu.org; Sat, 29 Nov 2014 05:51:04 -0500 Received: from mout.gmx.net ([212.227.15.19]:49906) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xufc7-0006oI-Ch for emacs-orgmode@gnu.org; Sat, 29 Nov 2014 05:50:55 -0500 In-Reply-To: (Kit-Yan Choi's message of "Wed, 26 Nov 2014 12:13:15 -0500") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Kit-Yan Choi Cc: emacs-orgmode@gnu.org Kit-Yan Choi 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.