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

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

[elpa] externals-release/org 093c94e: texinfo: Fix off-by-one error


From: ELPA Syncer
Subject: [elpa] externals-release/org 093c94e: texinfo: Fix off-by-one error
Date: Wed, 2 Jun 2021 11:57:18 -0400 (EDT)

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

    texinfo: Fix off-by-one error
    
    * lisp/ox-texinfo.el (org-texinfo--menu-entries): Fix off-by-one
    error.
    
    This is a follow-up to f99f26306c57d2342069880eac4dca324d7579ec.
    
    Reported-by: Jonas Bernoulli <jonas@bernoul.li>
    <http://lists.gnu.org/r/emacs-orgmode/2021-05/msg01290.html>
---
 lisp/ox-texinfo.el | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lisp/ox-texinfo.el b/lisp/ox-texinfo.el
index 3463544..c1f4197 100644
--- a/lisp/ox-texinfo.el
+++ b/lisp/ox-texinfo.el
@@ -1232,13 +1232,13 @@ holding contextual information."
                               :texinfo-entries-cache)))
         (cached-entries (gethash scope cache 'no-cache)))
     (if (not (eq cached-entries 'no-cache)) cached-entries
-      (let ((sections (org-texinfo--sectioning-structure info)))
+      (let* ((sections (org-texinfo--sectioning-structure info))
+             (max-depth (length sections)))
         (puthash scope
                 (cl-remove-if
                  (lambda (h)
                    (or (org-not-nil (org-export-get-node-property :COPYING h 
t))
-                        (>= (org-export-get-relative-level h info)
-                            (length sections))))
+                        (< max-depth (org-export-get-relative-level h info))))
                  (org-export-collect-headlines info 1 scope))
                 cache)))))
 



reply via email to

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