emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
To: Org Mode <emacs-orgmode@gnu.org>
Subject: ox-hugo-like "DWIM" cope for other exporters?
Date: Thu, 27 Sep 2018 16:09:05 -0400	[thread overview]
Message-ID: <CAN_Dec-O2NTX33KnHhpsv5Vna5LCEt4PkekQSJV8SV3PKHEotA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

Kaushal's ox-hugo includes  a "Do what I mean" scope which is different
from other exporters I've seen. It goes up the heading tree looking for a
heading with the "export_file_name" property set, and exports from there,
or if it doesn't find one, from the whole file.   The code is here:
https://github.com/kaushalmodi/ox-hugo/blob/2be4bc02629bee8848f868fdfc35d9904a82d53a/ox-hugo.el#L3581

I find this feature incredibly useful, and I've copied the function to work
with ox-reveal as well.  For both of these export formats, I tend to write
iteratively, checking the appearance of the rendered document as I go.
Though it's not particularly difficult to move traverse the org-document
before calling the export dispatcher and choosing the subtree scope, it
takes some mental effort and tends to distract me from writing.  Kaushal's
code really helps me with that slight relief of mental burden.

I've just been sitting here wondering if this scope would be worth
introducing at a more basic level, so that it could be available to a wider
set of exporters.  Have other people been making use of it? What do you
think?

Thanks,
Matt

[-- Attachment #2: Type: text/html, Size: 1498 bytes --]

             reply	other threads:[~2018-09-27 20:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-27 20:09 Matt Price [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-09-30  0:21 ox-hugo-like "DWIM" cope for other exporters? Thomas S. Dye
2018-10-02 17:44 ` Kaushal Modi
2018-10-02 19:40   ` 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

  List information: https://www.orgmode.org/

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

  git send-email \
    --in-reply-to=CAN_Dec-O2NTX33KnHhpsv5Vna5LCEt4PkekQSJV8SV3PKHEotA@mail.gmail.com \
    --to=moptop99@gmail.com \
    --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 public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).