From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tim Visher Subject: EXPORT_FILE_NAME property default to heading content? Date: Thu, 31 Aug 2017 10:18:55 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a114e58587e6bad05580d5514" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:42196) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnQJp-0004N2-HF for emacs-orgmode@gnu.org; Thu, 31 Aug 2017 10:19:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnQJk-0005hk-N7 for emacs-orgmode@gnu.org; Thu, 31 Aug 2017 10:19:41 -0400 Received: from mail-vk0-x231.google.com ([2607:f8b0:400c:c05::231]:35170) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dnQJk-0005hf-GM for emacs-orgmode@gnu.org; Thu, 31 Aug 2017 10:19:36 -0400 Received: by mail-vk0-x231.google.com with SMTP id z187so2246823vkd.2 for ; Thu, 31 Aug 2017 07:19:36 -0700 (PDT) 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 --001a114e58587e6bad05580d5514 Content-Type: text/plain; charset="UTF-8" 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: Thanks in advance! -- In Christ, Timmy V. http://blog.twonegatives.com/ http://five.sentenc.es/ -- Spend less time on mail --001a114e58587e6bad05580d5514 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I like the filename of the exported file to always match t= he content of the heading being exported. Is that possible? At the moment I= basically duplicate it like:

** Foo Heading
<= div>=C2=A0 =C2=A0:PROPERTIES:
=C2=A0 =C2=A0:EXPORT_FILE_NAME: Foo= Heading
=C2=A0 =C2=A0:END:

T= hanks in advance!

--

In C= hrist,

Timmy V.

<= div>http://five.sentenc.es/ -- Spen= d less time on mail
--001a114e58587e6bad05580d5514-- 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. :) 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