Hi Nicolas, Nicolas Goaziou <n.goaz...@gmail.com> 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