From: Lars Ingebrigtsen <larsi@gnus.org>
To: Johan Claesson <johanclaesson@bredband.net>
Cc: 23142@debbugs.gnu.org
Subject: bug#23142: 25.1.50; Kind of duplicated lines in info TOC
Date: Mon, 29 Jul 2019 00:52:02 +0200 [thread overview]
Message-ID: <87wog193hp.fsf@mouse.gnus.org> (raw)
In-Reply-To: <8760w55wpg.fsf@bredband.net> (Johan Claesson's message of "Tue, 29 Mar 2016 13:51:07 +0200")
Johan Claesson <johanclaesson@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
next prev parent reply other threads:[~2019-07-28 22:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-29 11:51 bug#23142: 25.1.50; Kind of duplicated lines in info TOC Johan Claesson
2019-07-28 22:52 ` Lars Ingebrigtsen [this message]
2019-07-28 23:23 ` Juri Linkov
2019-07-29 11:20 ` Lars Ingebrigtsen
2019-07-29 18:19 ` Juri Linkov
2019-07-30 20:39 ` Johan Claesson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87wog193hp.fsf@mouse.gnus.org \
--to=larsi@gnus.org \
--cc=23142@debbugs.gnu.org \
--cc=johanclaesson@bredband.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.