From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Exporter question Date: Sun, 24 Feb 2013 10:50:35 +0100 Message-ID: <87zjyu82hg.fsf@bzg.ath.cx> References: <9C4C997C2CA6AA488CBC8C9E56E764EE264510C3@MBX04.uva.nl> <87r4kl9uy4.fsf@gmail.com> <4D16776B-192B-4723-80FF-AEAC5E3B458C@gmail.com> <87zjyuytt4.fsf@gmail.com> <8738wmax8h.fsf@bzg.ath.cx> <87ppzqys5y.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:51845) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9YEE-0006QR-Th for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 04:50:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9YEC-0005My-Ji for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 04:50:42 -0500 Received: from we-in-x022a.1e100.net ([2a00:1450:400c:c03::22a]:44013 helo=mail-we0-x22a.google.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9YEC-0005Mj-BA for emacs-orgmode@gnu.org; Sun, 24 Feb 2013 04:50:40 -0500 Received: by mail-we0-f170.google.com with SMTP id z53so1744725wey.1 for ; Sun, 24 Feb 2013 01:50:39 -0800 (PST) In-Reply-To: <87ppzqys5y.fsf@gmail.com> (Nicolas Goaziou's message of "Sun, 24 Feb 2013 10:31:21 +0100") 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: Nicolas Goaziou Cc: "emacs-orgmode@gnu.org List" , "Dominik, Carsten" , Carsten Dominik Hi Nicolas, Nicolas Goaziou writes: > If it has to be implemented, it's far easier to remove objects from > parsed data (e.g. in `org-export-get-optional-title'). Got it, thanks. >> `org-export-with-timestamps-in-toc', if nil, would use this arg; >> but users could remove anything from the headlines (and the TOC), >> not just from the TOC. >> >> And `org-export-with-timestamps' could be set to 'from-toc or >> 'from-headline. And we could extend `org-export-with-tags' >> similarily. >> >> (I think `org-export-with-timestamps-in-toc' is better than >> `org-export-remove-timestamps-from-toc' because `org-export-with' >> is more widely used for the same purposes.) >> >> Just a suggestion for combining backward compatibility and adding >> some flexibility thanks for the new engine. > > I have a patch ready with `org-export-with-timestamps-in-toc' variable, > but as I was writing it, I realized it might not be necessary to apply > it. I'd like to avoid over-engineering as much as possible, hence the > question. My concern is this: it would be nice to provide a simple way to get rid of _anything_ (user defined) in headlines and TOC titles. Actually, the org-export-with-* family contains two categories of variables: those who are relevant for anything in the buffer, those who are relevant for the headlines only. Like these ones: org-export-with-priority org-export-with-statistics-cookies org-export-with-todo-keywords org-export-with-tags org-export-with-section-numbers I set aside the last one, which does not impact the text of the headline itself, but the way it looks in the target format. My suggestion is to get rid of these four headlines-only org-export-with-* variable, and to replace them with org-export-headline-format org-export-headline-in-toc-format with formatters to tell whether to include the TODO keyword, the tags, the priority cookie, the statistics cookie, the headline text, etc. And two generic options org-export-headline-trim-regexp org-export-headline-in-toc-trim-regexp which the user can set to whatever he wants. I think a formatting string for the headline is good as it is quite intuitive for a vast majority of users. And the -trim-regexp options would be flexible enough to remove anything from the headlines. Please *don't* implement this :) I just need your gut feeling about org-export-headline-format as a formatting string, and if you think it might be a good idea, I'm willing to help implementing it (as I know it will change quite a lot of things in the machinery.) Thanks, -- Bastien