From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?UTF-8?Q?Ond=C5=99ej_Grover?= Subject: Re: [PATCH]Extend export hook example for removing headlines with tag ignore_heading Date: Mon, 13 Apr 2015 17:23:33 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a113d587472bb5e05139cb2d4 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:39607) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhgD1-0002jn-Tu for emacs-orgmode@gnu.org; Mon, 13 Apr 2015 11:23:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YhgD0-0002Xu-HB for emacs-orgmode@gnu.org; Mon, 13 Apr 2015 11:23:35 -0400 Received: from mail-oi0-x22d.google.com ([2607:f8b0:4003:c06::22d]:33445) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YhgD0-0002Xq-9p for emacs-orgmode@gnu.org; Mon, 13 Apr 2015 11:23:34 -0400 Received: by oica37 with SMTP id a37so6989615oic.0 for ; Mon, 13 Apr 2015 08:23:33 -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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --001a113d587472bb5e05139cb2d4 Content-Type: multipart/alternative; boundary=001a113d587472bb5805139cb2d2 --001a113d587472bb5805139cb2d2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Rasmus, I wasn't aware of this functionality being added to ox-extra, thank you for pointing it out. I've revised my patch to accommodate your suggestions and attached the new version. Now it excludes noexport tagged headlines from removal and promotes child headlines. Using properties for this is also possible because the match string can match properties too. I just find tags simpler for this case. I'm trying to point out that something like this is often needed and a definitive solution should be listed somewhere, preferably in the manual. Otherwise someone looking for a solution to this common problem will end up finding only half-baked, possibly broken examples. Kind regards, Ond=C5=99ej Grover On Sun, Apr 12, 2015 at 3:32 PM, Rasmus wrote: > Hi, > > Thanks for the patch. I have not read it as I'm on the mobile. > > What is the difference between your patch and org-export-ignore-headlines > in > ox-extra? > > If you want the functionality in ox.el you should write a solution that > uses > a property like UNNUMBERED. It's however a non-trivial problem as discuss= ed > on the org-hacks worg page. This is, IMO, the right way to tackle this > issue, if it is an issue. > > Skimming the so answer you link to your suggestion is not robust for > ignored > headlines following a no export headline. > > > Rasmus > > > --001a113d587472bb5805139cb2d2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hi Rasmus,

I wasn't aware of this function= ality being added to ox-extra, thank you for pointing it out.
I= 9;ve revised my patch to accommodate your suggestions and attached the new = version. Now it excludes noexport tagged headlines from removal and promote= s child headlines.
Using properties for this is also possible= because the match string can match properties too. I just find tags simple= r for this case.
I'm trying to point out that something like t= his is often needed and a definitive solution should be listed somewhere, p= referably in the manual.
Otherwise someone looking for a solution = to this common problem will end up finding only half-baked, possibly broken= examples.

Kind regards,
Ond=C5=99ej Grover
=

On Sun,= Apr 12, 2015 at 3:32 PM, Rasmus <rasmus@gmx.us> wrote:
Hi,

Thanks for the patch. I have not read it as I'm on the mobile.

What is the difference between your patch and org-export-ignore-headlines i= n
ox-extra?

If you want the functionality in ox.el you should write a solution that use= s
a property like UNNUMBERED. It's however a non-trivial problem as discu= ssed
on the org-hacks worg page. This is, IMO, the right way to tackle this
issue, if it is an issue.

Skimming the so answer you link to your suggestion is not robust for ignore= d
headlines following a no export headline.


Rasmus




--001a113d587472bb5805139cb2d2-- --001a113d587472bb5e05139cb2d4 Content-Type: text/x-diff; charset=US-ASCII; name="0001-org.texi-Extend-export-hook-example-with-ignore_head.patch" Content-Disposition: attachment; filename="0001-org.texi-Extend-export-hook-example-with-ignore_head.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_i8g148vx0 RnJvbSA5Yzc1Zjk3OTZh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