From mboxrd@z Thu Jan 1 00:00:00 1970 From: Austin Frank Subject: configurable link export Date: Fri, 19 May 2006 15:33:22 -0400 Message-ID: <446E1D82.4060806@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1FhAix-0004HT-Oq for emacs-orgmode@gnu.org; Fri, 19 May 2006 15:33:23 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1FhAiw-0004Gv-KN for emacs-orgmode@gnu.org; Fri, 19 May 2006 15:33:23 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FhAiw-0004Gs-HR for emacs-orgmode@gnu.org; Fri, 19 May 2006 15:33:22 -0400 Received: from [128.151.80.2] (helo=cvs.rochester.edu) by monty-python.gnu.org with esmtp (Exim 4.52) id 1FhAmK-0006ux-9B for emacs-orgmode@gnu.org; Fri, 19 May 2006 15:36:52 -0400 Received: from [192.168.82.242] (128.151.80.181) by cvs.rochester.edu with ESMTP (Eudora Internet Mail Server X 3.2.8) for ; Fri, 19 May 2006 15:34:15 -0400 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: emacs-orgmode@gnu.org First off, thank you to Carsten and David for org and org-publish. These tools have made it easier to get myself organized locally and online than it ever has been before. I'd like to suggest a configuration option that influences the way links are exported in the org-export-as-* functions. When I create local org files, I link to whatever files on my disk are relevant and useful. When I publish those org files, some of the org links (like to other published org files) still work and make sense as html links. Others (like links to local documents or directories) don't make any sense when published-- the resources they pointed to on the local system aren't on the remote filesystem that hosts the html pages. To be more specific, I maintain a directory ~/notes/ and a directory ~/blog/, each with a bunch of org files underneath it. I then use org-publish to generate the html files, which are then uploaded to my website. Crucially, this same directory structure is mirrored at my website, so local org links between those files work perfectly as html links when they are published and uploaded. I'd love to be able to specify that I want all org links of [file:///home/aufrank/notes/*] and [file:///home/aufrank/blog/*] to be exported as full html links, and exclude org links to any other files on my filesystem at export time. I think that David has established a good system for including and excluding files during publishing. Org-publish first generates a list of files to publish based on regex matching of the extensions of files in a directory. These are filtered through a regex-based exclude list, and then individual files can be added back in with an include list. Applying this strategy to link export, I might want to have something like the following in my org-config.el: (setq org-export-links-extension "org\\|txt" org-export-links-exclude "~/*" org-export-links-include ("~/notes/", "~/blog/")) This would result in exporting all of the .org and .txt files in ~/notes/ and ~/blog/ as working links in html files, but would ignore links in org files to anything else in my home directory during export. There's certainly a question about how org links that are not exported as html links should be handled. I would actually be fine with just exporting the double-bracketed notation, but I bet there are better ideas out there. Thanks again for the org suite, /au