emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals-release/org 94be20a 2/2: ox-texinfo: Fix references to


From: ELPA Syncer
Subject: [elpa] externals-release/org 94be20a 2/2: ox-texinfo: Fix references to low-level headlines
Date: Sat, 10 Apr 2021 06:57:11 -0400 (EDT)

branch: externals-release/org
commit 94be20a33412b0e6489e07abea10117bc0d21524
Author: Nicolas Goaziou <mail@nicolasgoaziou.fr>
Commit: Nicolas Goaziou <mail@nicolasgoaziou.fr>

    ox-texinfo: Fix references to low-level headlines
    
    * lisp/ox-texinfo.el (org-texinfo-headline): Provide an anchor for
    low-level headlines.
    
    Reported-by: Ramesh Nedunchezian <rameshnedunchezian@outlook.com>
    <http://lists.gnu.org/r/emacs-orgmode/2021-04/msg00206.html>
---
 lisp/ox-texinfo.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index 87e1798..52c8180 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -899,11 +899,12 @@ holding contextual information."
           (contents
            (concat "\n"
                    (if (org-string-nw-p contents) (concat "\n" contents) "")
-                   (and index (format "\n@printindex %s\n" index)))))
+                   (and index (format "\n@printindex %s\n" index))))
+           (node (org-texinfo--get-node headline info)))
       (if (not command)
          (concat (and (org-export-first-sibling-p headline info)
                       (format "@%s\n" (if numbered? 'enumerate 'itemize)))
-                 "@item\n" full-text "\n"
+                 (format "@item\n@anchor{%s}%s\n" node full-text)
                  contents
                  (if (org-export-last-sibling-p headline info)
                      (format "@end %s" (if numbered? 'enumerate 'itemize))
@@ -911,8 +912,7 @@ holding contextual information."
        (concat
         ;; Even if HEADLINE is using @subheading and al., leave an
         ;; anchor so cross-references in the Org document still work.
-        (format (if notoc? "@anchor{%s}\n" "@node %s\n")
-                (org-texinfo--get-node headline info))
+        (format (if notoc? "@anchor{%s}\n" "@node %s\n") node)
         (format command full-text)
         contents))))))
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]