From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Cross Subject: Re: why prepend "file://" to abs paths in html output? Date: Tue, 11 Jul 2017 08:12:20 +1000 Message-ID: <877ezgym9n.fsf@gmail.com> References: <87lgnz43qk.fsf@nicolasgoaziou.fr> <87h8yn3tsa.fsf@nicolasgoaziou.fr> <87bmou4u8a.fsf@nicolasgoaziou.fr> <874lumfqk7.fsf@gmail.com> <877ezh51ns.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54190) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dUgvF-0003wh-Ps for emacs-orgmode@gnu.org; Mon, 10 Jul 2017 18:12:55 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dUgvE-0005ww-Rs for emacs-orgmode@gnu.org; Mon, 10 Jul 2017 18:12:53 -0400 Received: from mail-pg0-x244.google.com ([2607:f8b0:400e:c05::244]:33585) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dUgvE-0005kI-Le for emacs-orgmode@gnu.org; Mon, 10 Jul 2017 18:12:52 -0400 Received: by mail-pg0-x244.google.com with SMTP id u62so14226074pgb.0 for ; Mon, 10 Jul 2017 15:12:30 -0700 (PDT) In-reply-to: <877ezh51ns.fsf@nicolasgoaziou.fr> 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: Nicolas Goaziou Cc: Carsten Dominik , Org Mode , Kaushal Modi Having seen the other posts on this, I think I'll need to spend more time thinking about this and the various use cases. There is something I'm having trouble putting my finger on which doesn't feel quite right, but I feel I need to look more deeply into the whole idea of how to export links generally. Originally, I was thinking just about HTML export and just file:// vs site context specific links. Based on what you have provided, this certainly does seem to address the specific use case I was thinking of, but others have pointed out additional considerations, so I'm now not sure if the suggested approach won't improve one case while making others more difficult/restricted. Tim Nicolas Goaziou writes: > Hello, > > Tim Cross writes: > >> Perhaps we need a way to easily set a context for web exports. If the >> context is set, then use it, otherwise, use file:/// (actually, I >> thought this was already there, but it has been a while since I did html >> exports where links were necessary). > > The following patch implements `org-html-root', which allows to export > file links as root-relative URL. I'm not sure the docstring is clear > enough, tho. > > Also, HTML publishing process always bind the above to publishing > directory, without user intervention. > > So, basically, upon exporting the following document to HTML: > > #+html_link_root: /tmp/ > [[/tmp/unicorn.jpg]] > > the link becomes > > unicorn.jpg > > > WDYT? > > Regards, -- Tim Cross