* EXPORT_FILE_NAME property default to heading content?
@ 2017-08-31 14:18 Tim Visher
2017-09-02 7:41 ` Adam Porter
0 siblings, 1 reply; 3+ messages in thread
From: Tim Visher @ 2017-08-31 14:18 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1: Type: text/plain, Size: 366 bytes --]
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
[-- Attachment #2: Type: text/html, Size: 682 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: EXPORT_FILE_NAME property default to heading content?
2017-08-31 14:18 EXPORT_FILE_NAME property default to heading content? Tim Visher
@ 2017-09-02 7:41 ` Adam Porter
2017-09-02 7:49 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Adam Porter @ 2017-09-02 7:41 UTC (permalink / raw)
To: emacs-orgmode
Tim Visher <tim.visher@gmail.com> 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. :)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: EXPORT_FILE_NAME property default to heading content?
2017-09-02 7:41 ` Adam Porter
@ 2017-09-02 7:49 ` Nicolas Goaziou
0 siblings, 0 replies; 3+ messages in thread
From: Nicolas Goaziou @ 2017-09-02 7:49 UTC (permalink / raw)
To: Adam Porter; +Cc: emacs-orgmode
Hello,
Adam Porter <adam@alphapapa.net> writes:
> Tim Visher <tim.visher@gmail.com> 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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-09-02 7:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-08-31 14:18 EXPORT_FILE_NAME property default to heading content? Tim Visher
2017-09-02 7:41 ` Adam Porter
2017-09-02 7:49 ` Nicolas Goaziou
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.