Nicolas Goaziou <m...@nicolasgoaziou.fr> writes: > Hello, > > Jonas Bernoulli <jo...@bernoul.li> writes: > >> Would it be okay to represent e.g. "C-c SPC" as: >> >> (export-snippet >> (:back-end "texinfo" :value "@kbd{C-c @key{SPC}}" :post-blank 0 :parent >> #2)) > > Just use (org-export-raw-string "@kbd{C-c @key{SPC}}") instead.
That works. I must of done something wrong when first trying that. >> I think that is one of the things I tried that ox-texinfo insisted on >> quoting anyway. I might misremember, so I will have another look. > > `org-export-raw-string' is a recent addition in Org. > >> Above I suggested using an `export-snippet' element (instead of `raw'); >> to me that seems appropriate too. > > I think that's abusing export snippets. They are more user-oriented, > e.g. filters can apply to them. > > Note you can write (org-export-raw-string (some-public-function "C-c > SPC")) where (some-public-function "C-c SPC") => "@kbd{C-c @key{SPC}}", > as done currently by the "kbd" macro. I named it org-texinfo-kbd-macro and wrote it so that it can be used by the kbd macro. I have changed doc/doc-setup.org to use it. DEL was missing from the list of special keys. Cheers, Jonas