all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Adam Porter <adam@alphapapa.net>
To: emacs-orgmode@gnu.org
Subject: Re: EXPORT_FILE_NAME property default to heading content?
Date: Sat, 02 Sep 2017 02:41:03 -0500	[thread overview]
Message-ID: <87inh1fsz4.fsf@alphapapa.net> (raw)
In-Reply-To: CAHa53uyNnWvbXaLaz0vTBc2-dZLeTLVwHuauWwwyyf9TCXPX3A@mail.gmail.com

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.  :)

  reply	other threads:[~2017-09-02  7:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 14:18 EXPORT_FILE_NAME property default to heading content? Tim Visher
2017-09-02  7:41 ` Adam Porter [this message]
2017-09-02  7:49   ` Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87inh1fsz4.fsf@alphapapa.net \
    --to=adam@alphapapa.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.