From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adam Porter Subject: Re: EXPORT_FILE_NAME property default to heading content? Date: Sat, 02 Sep 2017 02:41:03 -0500 Message-ID: <87inh1fsz4.fsf@alphapapa.net> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:40018) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1do33c-0000SZ-G0 for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 03:41:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1do33X-0001ub-Tt for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 03:41:32 -0400 Received: from [195.159.176.226] (port=39454 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1do33X-0001uB-MH for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 03:41:27 -0400 Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1do33I-0006nS-75 for emacs-orgmode@gnu.org; Sat, 02 Sep 2017 09:41:12 +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" To: emacs-orgmode@gnu.org 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. Otherwise, it probably wouldn't be too difficult to add an option to set the export file name to the heading when exporting a subtree--but I've never looked into the org-export code so maybe it would be. :)