From 0ff8ba5907bf32dd7533c7a89a3fd2206fbd13f9 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 7 Jun 2017 00:14:35 +0200 Subject: [PATCH] ox-texinfo: Use @code instead of @verb for inline src blocks * lisp/ox-texinfo.el (org-texinfo-inline-src-block): Use @code. --- etc/ORG-NEWS | 4 ++++ lisp/ox-texinfo.el | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index 3e2222ef8..eb0af8507 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -354,6 +354,10 @@ is now obselete. Now ~=...=~ markup uses ~@samp{}~ instead of ~@verb{}~. You can use ~@verb{}~ again by customizing the variable. +*** Texinfo exports inline src blocks as ~@code{}~ + +It is possible to write an inline src block filter to use ~@verb{}~ +again. * Version 9.0 diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el index 488c95ab6..8c7d48cf7 100644 --- a/lisp/ox-texinfo.el +++ b/lisp/ox-texinfo.el @@ -873,9 +873,9 @@ See `org-texinfo-format-headline-function' for details." "Transcode an INLINE-SRC-BLOCK element from Org to Texinfo. CONTENTS holds the contents of the item. INFO is a plist holding contextual information." - (let* ((code (org-element-property :value inline-src-block)) - (separator (org-texinfo--find-verb-separator code))) - (concat "@verb{" separator code separator "}"))) + (format "@code{%s}" + (org-texinfo--sanitize-content + (org-element-property :value inline-src-block)))) ;;;; Inlinetask