On Thu, Apr 22, 2021 at 9:52 AM Nicolas Goaziou wrote: > Tim Visher writes: > > > Awesome. Do you know whether there's an official way to share this sort > of > > behavior between ox backends or is it just creating a function and > calling > > it from both places or something? > > Do you want to remove all markup from some parsed text? > > You could define temporary export back-end with > `org-export-create-backend', and apply it with > `org-export-data-with-backend'. See for example, how > `org-latex-headline' formats headings (`text' binding in the function). > > If that's the case, you need to know exactly what you want. It is pretty > obvious for bold markup, but what would happen to, e.g., a_b or \alpha > or <>? > Thanks for the tip. What I'm thinking more is somehow getting the heading pre-output generation, stripping any characters that `org` would consider special (I'm hoping there's already a function that can at least mark 'markup' text in a given org string), and _then_ passing it to whatever ox function is responsible for using the title. That way it's as generic as it can possibly be. I confess though that I don't follow exactly what you're talking about defining a temporary export back-end. Why would that be necessary or beneficial to the end of teaching org how to use only the 'plain text' of a heading for the title in N ox backends? -- In Christ, Timmy V. https://blog.twonegatives.com http://five.sentenc.es