Bastien <b...@altern.org> writes: >> Do you think it's still necessary to provide an equivalent for >> `org-export-remove-timestamps-from-toc'? It's only a matter of copying >> the headline title in the property, without timestamp. > > org-html|latex-format-headline-function allow these arguments: > > TODO the todo keyword (string or nil). > TODO-TYPE the type of todo (symbol: `todo', `done', nil) > PRIORITY the priority of the headline (integer or nil) > TEXT the main headline text (string). > TAGS the tags as a list of strings (list of strings or nil). > > Why not having another TRIM-REGEXP argument to selectively trim > the content matched by a regexp against TEXT?
Because it would have to mach TEXT against destination code, so it would be fragile (i.e. if you modify how timestamps are transcoded, you have to modify this regexp accordingly). If it has to be implemented, it's far easier to remove objects from parsed data (e.g. in `org-export-get-optional-title'). > `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. Regards, -- Nicolas Goaziou