From: Drew Adams <drew.adams@oracle.com>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: 397@debbugs.gnu.org
Subject: bug#397: 23.0.60; T in Info when in (dir)
Date: Wed, 27 Apr 2016 10:46:38 -0700 (PDT) [thread overview]
Message-ID: <5a64ed8a-d9c7-4b33-b63a-11d83b7dab99@default> (raw)
In-Reply-To: <8760v3gdkm.fsf@gnus.org>
> Basically, Info calls
> (Info-find-node "dir" "*TOC*")
> which then fails. Looking at that code, it's quite long and convoluted,
> and calling that just to gray out the menu item is probably not a good
> idea. Does anybody know of a quick shortcut to determine whether the
> TOC isn't available? I'm quite unfamiliar with the Info code.
`Info-toc' should raise an error immediately, if the current node
is the top. Something like this, perhaps:
(defun Info-toc ()
"@@@@@@@@@"
(interactive)
(when (equal Info-current-file "dir") (error "@@@@@@@@@@@@@@@@@"))
(Info-find-node Info-current-file "*TOC*")
(let ((prev-node (nth 1 (car Info-history))) p)
(goto-char (point-min))
(if (setq p (search-forward (concat "*Note " prev-node ":") nil t))
(setq p (- p (length prev-node) 2)))
(goto-char (or p (point-min)))))
But you might need to worry about different versions of "dir", such
as is done in function `Info-insert-dir'. Dunno. I took only a
quick look. Maybe you also need to check for the node name being
"top", as in `Info-directory' - dunno.
But probably not. `Info-index' does only this:
(equal Info-current-file "dir")
next prev parent reply other threads:[~2016-04-27 17:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-12 15:53 bug#397: 23.0.60; T in Info when in (dir) Drew Adams
2016-04-27 16:11 ` Lars Ingebrigtsen
2016-04-27 16:42 ` Drew Adams
2016-04-27 16:47 ` Lars Ingebrigtsen
2016-04-27 17:12 ` Drew Adams
2016-04-27 17:35 ` Lars Ingebrigtsen
2016-04-27 17:46 ` Drew Adams [this message]
2016-04-27 17:58 ` Eli Zaretskii
2016-04-27 18:22 ` Andreas Schwab
2016-04-27 19:27 ` Eli Zaretskii
2016-04-30 20:08 ` Juri Linkov
[not found] ` <<5a64ed8a-d9c7-4b33-b63a-11d83b7dab99@default>
[not found] ` <<83vb33x7b6.fsf@gnu.org>
2016-04-27 18:09 ` Drew Adams
2016-04-27 18:28 ` Lars Ingebrigtsen
2022-03-21 22:06 ` Lars Ingebrigtsen
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5a64ed8a-d9c7-4b33-b63a-11d83b7dab99@default \
--to=drew.adams@oracle.com \
--cc=397@debbugs.gnu.org \
--cc=larsi@gnus.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).