From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rasmus Subject: Re: [Feature Request] Let publishing-function decide :output-file and whether publishing is needed Date: Tue, 28 Jul 2015 15:21:48 +0200 Message-ID: <87d1zcs9hv.fsf@gmx.us> References: <87oaj0d43r.fsf@ayanami.rkm.id.au> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39565) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4pf-0004Pb-In for emacs-orgmode@gnu.org; Tue, 28 Jul 2015 09:22:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZK4pc-0004VE-CZ for emacs-orgmode@gnu.org; Tue, 28 Jul 2015 09:22:11 -0400 Received: from plane.gmane.org ([80.91.229.3]:59310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZK4pc-0004UY-6I for emacs-orgmode@gnu.org; Tue, 28 Jul 2015 09:22:08 -0400 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZK4pa-0003C1-CJ for emacs-orgmode@gnu.org; Tue, 28 Jul 2015 15:22:06 +0200 Received: from ip5b4025d5.dynamic.kabel-deutschland.de ([91.64.37.213]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Jul 2015 15:22:06 +0200 Received: from rasmus by ip5b4025d5.dynamic.kabel-deutschland.de with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 28 Jul 2015 15:22:06 +0200 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: emacs-orgmode@gnu.org Hi Ruben, Thanks for your patch. Ruben Maher writes: > I've been working on a derived exporter to publish a static blog, and > I've run into some issues. Say that `:publishing-directory' is > "~/public_html" and I have `:base-directory' with an Org file foo.org. > > foo.org has option keywords like this: > > #+title: foo.org > #+date: <2015-07-25 Sat 17:21:41> OK. That's nice. > I have achieved this using the attached diff, which tells > `org-export-output-file-name' to respect the property `:output-file' in > the communications channel. OK. I did not test your patch, but can you please test and indicate whether the following features work as expected with your patch: - automatic sitemap. - linking org files (foo.org links to bar.org). - async export (since you change org-export-output-file-name) Some quick thoughts. Perhaps it would be better to allow either a user-supplied function that takes an org parse tree or an org file location and returns an output name. Alternatively, maybe you could provide a way to format file names in :publish-direction via a format-string (e.g. keywords, date etc). > From 13c92b87b728da134a73ef173be8957453ef90a6 Mon Sep 17 00:00:00 2001 > From: Ruben Maher > Date: Sat, 25 Jul 2015 16:54:28 +0930 > Subject: [PATCH] org-export-output-file-name: respect :output-file > > There is a property :output-file defined in the communications channel > but it is ignored by `org-export-output-file-name'. > > * lisp/ox.el (org-export-output-file-name): Add optional argument > EXT-PLIST, and try to get `base-name' from its property `:output-file' > if SUBTREEP is nil or there was no EXPORT_FILE_NAME at point. Nicolas would have to say whether this is OK. I don't know the details here well enough. Rasmus -- May the Force be with you