From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: configurable link export Date: Mon, 22 May 2006 11:22:44 +0200 Message-ID: <2301523295d062f63acce8cebd734108@science.uva.nl> References: <446E1D82.4060806@gmail.com> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Fi6ch-0008NM-Mt for emacs-orgmode@gnu.org; Mon, 22 May 2006 05:22:47 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Fi6ch-0008Mw-88 for emacs-orgmode@gnu.org; Mon, 22 May 2006 05:22:47 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Fi6ch-0008Mt-2O for emacs-orgmode@gnu.org; Mon, 22 May 2006 05:22:47 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: David O'Toole Cc: emacs-orgmode@gnu.org On May 20, 2006, at 15:01, David O'Toole wrote: > I have been thinking about inter-file links in preparation for > implementing some of the more advanced features for org-publish (page > rewriting, sitemap generation, etc) and I think this will be very > simple to straighten out. > > All we need is for people to specify a property called :link-base that > is the prefix for a URL. For example, if :publishing-directory is > "/ssh:user@host:~/public_html/images", the user should probably set > the :link-base to "/images" or "http://foosite.org/images" > > Given this one extra piece of information, then it is a simple matter > for the :link-transform function to actually generate proper URLs > (instead of simply validating them.) This would free projects from the > requirement that the web server must have the exact same directory > layout as your local project files. I don't quite understand yet how this will allow you to generate a different directory structure on the server. Yes, within one project component this would allow you to use absolute path names for links. But if I am in an org-mode file and I am linking to "../../images/David.jpg", at least the current component does not know where the link files will end up. My approach would have been the following: 1. Yes, enforce the same directory structure on the server. I think this makes a lot of sense anyway. 2. When publishing a project, make a list of all files published by this project, including source files, images, you name it. Cache that list somewhere during the publishing process. 3. Check any queries for safe links against this list. As far as I can see this would remove the need to do *any* further customization. Or am I overlooking something? But it is also quite possible that I simply have not fully understood your idea about handling this. - Carsten