GNU bug report logs -
#23142
25.1.50; Kind of duplicated lines in info TOC
Previous Next
Reported by: Johan Claesson <johanclaesson <at> bredband.net>
Date: Tue, 29 Mar 2016 12:51:01 UTC
Severity: wishlist
Tags: fixed, patch
Found in version 25.1.50
Fixed in version 27.0.50
Done: Juri Linkov <juri <at> linkov.net>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Johan Claesson <johanclaesson <at> bredband.net> writes:
> Regarding the table-of-contents that is generated by typing T in
> info. Whenever there is a new level of sections the section name
> is printed twice. For example in the start of the elisp
> manual "Introduction" and "Conventions" are duplicated (and the
> second "Conventions" is not indented which disturbs the
> readability):
>
> Top::
> Introduction::
> Introduction
> Caveats::
> Lisp History::
> Conventions::
> Conventions
> Some Terms::
> nil and t::
> [...]
Yes, that's kinda ugly.
> (defun Info-toc-insert (nodes node-list level curr-file)
> "Insert table of contents with references to nodes."
> ;; (let ((section "Top"))
> (while nodes
> (let ((node (assoc (car nodes) node-list)))
> ;; (unless (member (nth 2 node) (list nil section))
> ;; (insert (setq section (nth 2 node)) "\n"))
> (insert (make-string level ?\t))
> (insert "*Note " (car nodes) ":: \n")
> (Info-toc-insert (nth 3 node) node-list (1+ level) curr-file)
> (setq nodes (cdr nodes)))))
Yup, the following:
diff --git a/lisp/info.el b/lisp/info.el
index 3203c5f171..abef57f79f 100644
--- a/lisp/info.el
+++ b/lisp/info.el
@@ -2453,8 +2453,6 @@ Info-toc-insert
(let ((section "Top"))
(while nodes
(let ((node (assoc (car nodes) node-list)))
- (unless (member (nth 2 node) (list nil section))
- (insert (setq section (nth 2 node)) "\n"))
(insert (make-string level ?\t))
(insert "*Note " (car nodes) ":: \n")
(Info-toc-insert (nth 3 node) node-list (1+ level) curr-file)
makes the TOC much nicer. As a test case, open the ert info file and
hit `T'.
Does anybody know what the reasoning behind adding these seemingly
doubled lines is?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
This bug report was last modified 5 years and 300 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.