Revert "ox-texinfo: Escape @ { } in index"

* lisp/ox-texinfo.el (org-texinfo-keyword): Index keywords are
  specific to Texinfo back-end, so they expect regular Texinfo code.
* doc/org.texi (Indices): Update documentation.
This commit is contained in:
Nicolas Goaziou 2017-06-18 11:00:56 +02:00
parent b9b921716b
commit 8769cfc91c
2 changed files with 17 additions and 6 deletions

View File

@ -13665,16 +13665,28 @@ entry:
@subsection Indices
@cindex #+CINDEX
@cindex concept index, in Texinfo export
@cindex Texinfo export, index, concept
@cindex #+FINDEX
@cindex function index, in Texinfo export
@cindex Texinfo export, index, function
@cindex #+KINDEX
@cindex keystroke index, in Texinfo export
@cindex Texinfo export, keystroke index
@cindex #+PINDEX
@cindex program index, in Texinfo export
@cindex Texinfo export, program index
@cindex #+TINDEX
@cindex data type index, in Texinfo export
@cindex Texinfo export, data type index
@cindex #+VINDEX
@cindex variable index, in Texinfo export
@cindex Texinfo export, variable index
The Texinfo export back-end recognizes these indexing keywords if used in the
Org file: @code{#+CINDEX}, @code{#+FINDEX}, @code{#+KINDEX}, @code{#+PINDEX},
@code{#+TINDEX}, and @code{#+VINDEX}. The back-end also recognizes custom
index definitions that use raw Texinfo code in the Org file (@pxref{Quoting
Texinfo code}).
@code{#+TINDEX}, and @code{#+VINDEX}. Write their value as verbatim Texinfo
code; in particular, @samp{@{}, @samp{@}} and @samp{@@} characters need to be
escaped with @samp{@@} if they not belong to a Texinfo command.
@example
#+CINDEX: Defining indexing entries

View File

@ -970,10 +970,9 @@ contextual information."
(defun org-texinfo-keyword (keyword _contents info)
"Transcode a KEYWORD element from Org to Texinfo.
CONTENTS is nil. INFO is a plist holding contextual information."
(let* ((raw-value (org-element-property :value keyword))
(value (org-texinfo--sanitize-content raw-value)))
(let ((value (org-element-property :value keyword)))
(pcase (org-element-property :key keyword)
("TEXINFO" raw-value)
("TEXINFO" value)
("CINDEX" (format "@cindex %s" value))
("FINDEX" (format "@findex %s" value))
("KINDEX" (format "@kindex %s" value))