From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: why prepend "file://" to abs paths in html output? Date: Sat, 08 Jul 2017 12:33:55 +0200 Message-ID: <87lgnz43qk.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35380) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dTn49-0001gz-Pv for emacs-orgmode@gnu.org; Sat, 08 Jul 2017 06:34:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dTn46-0001f2-Nl for emacs-orgmode@gnu.org; Sat, 08 Jul 2017 06:34:21 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:35523) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dTn46-0001ek-HH for emacs-orgmode@gnu.org; Sat, 08 Jul 2017 06:34:18 -0400 In-Reply-To: (Matt Price's message of "Fri, 7 Jul 2017 20:38:12 -0400") 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" To: Matt Price Cc: Org Mode Hello, Matt Price writes: > in org-html-link local links of the form > > "/some/path/to/file" > > are rewritten as > > "file:///some/path/to/file". > > This makes it difficult to write root-relative URL's in the way that one > might expect to be able to (so that export produces links like > > > > Is this really the most desirable behaviour? In html export, at least, I > would think most users would want to allow links of the kind I described. > But this seems like a conscious design decision; cf. these lines from > org-html-link: > > ;; If file path is absolute, prepend it with protocol > ;; component - "file://". > (cond > ((file-name-absolute-p raw-path) > (setq raw-path (org-export-file-uri raw-path))) > ((and home use-abs-url) > (setq raw-path (concat (file-name-as-directory home) raw-path)))) > > I'm wondering whether a user oculd at least set a defcustom to control this > behaviour. Let me ask this the other way: is there any situation where "file://" prefix is desirable? Regards, -- Nicolas Goaziou