From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Price Subject: ox-hugo-like "DWIM" cope for other exporters? Date: Thu, 27 Sep 2018 16:09:05 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="000000000000a972130576dfe674" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37856) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g5caJ-0002pq-O6 for emacs-orgmode@gnu.org; Thu, 27 Sep 2018 16:08:28 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g5caI-0005ag-IC for emacs-orgmode@gnu.org; Thu, 27 Sep 2018 16:08:27 -0400 Received: from mail-lj1-x22b.google.com ([2a00:1450:4864:20::22b]:46685) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1g5caI-0005ZT-98 for emacs-orgmode@gnu.org; Thu, 27 Sep 2018 16:08:26 -0400 Received: by mail-lj1-x22b.google.com with SMTP id 203-v6so3608638ljj.13 for ; Thu, 27 Sep 2018 13:08:24 -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: Org Mode --000000000000a972130576dfe674 Content-Type: text/plain; charset="UTF-8" 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 --000000000000a972130576dfe674 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Kaushal's ox-hugo includes=C2=A0= 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.=C2=A0=C2=A0 The code is here: <= br>

I find this feature incredibly useful, an= d I've copied the function to work with ox-reveal as well.=C2=A0 For bo= th of these export formats, I tend to write iteratively, checking the appea= rance of the rendered document as I go.=C2=A0 Though it's not particula= rly difficult to move traverse the org-document before calling the export d= ispatcher and choosing the subtree scope, it takes some mental effort and t= ends to distract me from writing.=C2=A0 Kaushal's code really helps me = with that slight relief of mental burden.=C2=A0

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

Thanks,
Matt

--000000000000a972130576dfe674--