From cf505d2ebb8cb34cae833785acc446263508d5b7 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Fri, 9 Jun 2017 22:03:08 +0200 Subject: [PATCH] ox-texinfo: Export example blocks as @example * lisp/ox-texinfo.el (org-texinfo-example-block): Export as @example. Escape @, {, }, however, so as to get proper verbatim contents. --- etc/ORG-NEWS | 4 +--- lisp/ox-texinfo.el | 5 +++-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index b984103e0..eb0e11c4a 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -360,11 +360,9 @@ is now obselete. Now ~=...=~ markup uses ~@samp{}~ instead of ~@verb{}~. You can use ~@verb{}~ again by customizing the variable. +*** Texinfo exports example blocks as ~@example~ *** Texinfo exports inline src blocks as ~@code{}~ -It is possible to write an inline src block filter to use ~@verb{}~ -again. - * Version 9.0 ** Incompatible changes diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 9c1b8dd47..6128c09fc 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -778,8 +778,9 @@ holding contextual information." "Transcode an EXAMPLE-BLOCK element from Org to Texinfo. CONTENTS is nil. INFO is a plist holding contextual information." - (format "@verbatim\n%s@end verbatim" - (org-export-format-code-default example-block info))) + (format "@example\n%s@end example" + (org-texinfo--sanitize-content + (org-export-format-code-default example-block info)))) ;;; Export Block