From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: EXPORT_FILE_NAME property default to heading content? Date: Sat, 02 Sep 2017 09:49:38 +0200 Message-ID: <87shg51qwd.fsf@nicolasgoaziou.fr> References: <87inh1fsz4.fsf@alphapapa.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1do3Bb-0003mV-MN for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 03:49:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1do3BX-0004ub-3P for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 03:49:47 -0400 Received: from relay2-d.mail.gandi.net ([2001:4b98:c:538::194]:60528) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1do3BW-0004u1-TM for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 03:49:43 -0400 In-Reply-To: <87inh1fsz4.fsf@alphapapa.net> (Adam Porter's message of "Sat, 02 Sep 2017 02:41:03 -0500") 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: Adam Porter Cc: emacs-orgmode@gnu.org Hello, Adam Porter writes: > Tim Visher writes: > >> I like the filename of the exported file to always match the content of the heading being exported. Is that possible? At the moment I basically duplicate it >> like: >> >> ** Foo Heading >> :PROPERTIES: >> :EXPORT_FILE_NAME: Foo Heading >> :END: > > I guess the simplest way would be to advise the org-export function with > a function that sets that property in the heading being exported. You > could even add another advice that would clear the property afterward. I suggest to use a hook to add this property right before export, e.g., in `org-export-before-processing-hook'. Regards, -- Nicolas Goaziou