* bug#397: 23.0.60; T in Info when in (dir)
@ 2008-06-12 15:53 Drew Adams
2016-04-27 16:11 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2008-06-12 15:53 UTC (permalink / raw
To: emacs-pretest-bug
`T' in Info when you are at the directory level (dir), should either
raise an error or DTRT.
To DTRT, it could do either of these:
- return to the directory listing (which is useless),
which is the top-level TOC
- show the contents of all manuals (pretty costly),
which is the detailed TOC
Currently, what `T' does is worse than useless. It shows this, where
(dir) and the second Top are links to the same place - the directory
you just came from:
Up: (dir)
File: toc, Node: Top
Table of Contents
*****************
Top.
This is not only useless; it is wrong. Top cannot be the same thing as
(dir), but both links lead to the same place. And the Top listed as
the current node is different from the destination of the Top link.
Please, at a minimum, (1) raise an error if `T' is used in the
directory (dir), and (2) disable (dim) the corresponding item in the
Info menu when in (dir).
In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
of 2008-05-29 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags -Ic:/g/include
-fno-crossjumping'
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
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
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-27 16:11 UTC (permalink / raw
To: Drew Adams; +Cc: 397
"Drew Adams" <drew.adams@oracle.com> writes:
> `T' in Info when you are at the directory level (dir), should either
> raise an error or DTRT.
>
> To DTRT, it could do either of these:
>
> - return to the directory listing (which is useless),
> which is the top-level TOC
> - show the contents of all manuals (pretty costly),
> which is the detailed TOC
>
> Currently, what `T' does is worse than useless. It shows this, where
> (dir) and the second Top are links to the same place - the directory
> you just came from:
>
> Up: (dir)
> File: toc, Node: Top
>
> Table of Contents
> *****************
>
> Top.
This seems like it's fixed now. If I `T' in the top level node, it just
says "user-error: No such node or anchor: *TOC*".
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 16:11 ` Lars Ingebrigtsen
@ 2016-04-27 16:42 ` Drew Adams
2016-04-27 16:47 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2016-04-27 16:42 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: 397
> -----Original Message-----
> From: Lars Ingebrigtsen [mailto:larsi@gnus.org]
> Sent: Wednesday, April 27, 2016 9:12 AM
> To: Drew Adams
> Cc: 397@debbugs.gnu.org
> Subject: Re: bug#397: 23.0.60; T in Info when in (dir)
>
> "Drew Adams" <drew.adams@oracle.com> writes:
>
> > `T' in Info when you are at the directory level (dir), should either
> > raise an error or DTRT.
> >
> > To DTRT, it could do either of these:
> >
> > - return to the directory listing (which is useless),
> > which is the top-level TOC
> > - show the contents of all manuals (pretty costly),
> > which is the detailed TOC
> >
> > Currently, what `T' does is worse than useless. It shows this, where
> > (dir) and the second Top are links to the same place - the directory
> > you just came from:
> >
> > Up: (dir)
> > File: toc, Node: Top
> >
> > Table of Contents
> > *****************
> >
> > Top.
>
> This seems like it's fixed now. If I `T' in the top level node, it just
> says "user-error: No such node or anchor: *TOC*".
Thanks, but that is not the whole fix. You missed this part:
and (2) disable (dim) the corresponding item in the
Info menu when in (dir).
The Info menu correctly has things like Up disabled (dimmed).
But menu item Table of Contents (T) is not disabled.
Please fix this part of the bug also.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 16:42 ` Drew Adams
@ 2016-04-27 16:47 ` Lars Ingebrigtsen
2016-04-27 17:12 ` Drew Adams
0 siblings, 1 reply; 14+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-27 16:47 UTC (permalink / raw
To: Drew Adams; +Cc: 397
Drew Adams <drew.adams@oracle.com> writes:
> Thanks, but that is not the whole fix. You missed this part:
>
> and (2) disable (dim) the corresponding item in the
> Info menu when in (dir).
>
> The Info menu correctly has things like Up disabled (dimmed).
> But menu item Table of Contents (T) is not disabled.
> Please fix this part of the bug also.
Hm... I don't quite follow. Do you have a complete recipe, starting
from -Q?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 16:47 ` Lars Ingebrigtsen
@ 2016-04-27 17:12 ` Drew Adams
2016-04-27 17:35 ` Lars Ingebrigtsen
0 siblings, 1 reply; 14+ messages in thread
From: Drew Adams @ 2016-04-27 17:12 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: 397
> > Thanks, but that is not the whole fix. You missed this part:
> >
> > and (2) disable (dim) the corresponding item in the
> > Info menu when in (dir).
> >
> > The Info menu correctly has things like Up disabled (dimmed).
> > But menu item Table of Contents (T) is not disabled.
> > Please fix this part of the bug also.
>
> Hm... I don't quite follow. Do you have a complete recipe, starting
> from -Q?
emacs -Q
C-h i
Look at the Info menu, in the menu bar. See the menu item
`Table of Contents T'? It should be disabled
when at the (dir), i.e., the top, level.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 17:12 ` Drew Adams
@ 2016-04-27 17:35 ` Lars Ingebrigtsen
2016-04-27 17:46 ` Drew Adams
[not found] ` <<5a64ed8a-d9c7-4b33-b63a-11d83b7dab99@default>
0 siblings, 2 replies; 14+ messages in thread
From: Lars Ingebrigtsen @ 2016-04-27 17:35 UTC (permalink / raw
To: Drew Adams; +Cc: 397
Drew Adams <drew.adams@oracle.com> writes:
>> > Thanks, but that is not the whole fix. You missed this part:
>> >
>> > and (2) disable (dim) the corresponding item in the
>> > Info menu when in (dir).
>> >
>> > The Info menu correctly has things like Up disabled (dimmed).
>> > But menu item Table of Contents (T) is not disabled.
>> > Please fix this part of the bug also.
>>
>> Hm... I don't quite follow. Do you have a complete recipe, starting
>> from -Q?
>
> emacs -Q
> C-h i
>
> Look at the Info menu, in the menu bar. See the menu item
> `Table of Contents T'? It should be disabled
> when at the (dir), i.e., the top, level.
Oh, I see. I didn't think you meant the Emacs menu menu, but a menu in
the Info buffer. :-)
Let's see... Yes, that menu item should be dimmed.
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.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 17:35 ` Lars Ingebrigtsen
@ 2016-04-27 17:46 ` Drew Adams
2016-04-27 17:58 ` Eli Zaretskii
[not found] ` <<5a64ed8a-d9c7-4b33-b63a-11d83b7dab99@default>
1 sibling, 1 reply; 14+ messages in thread
From: Drew Adams @ 2016-04-27 17:46 UTC (permalink / raw
To: Lars Ingebrigtsen; +Cc: 397
> 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")
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 17:46 ` Drew Adams
@ 2016-04-27 17:58 ` Eli Zaretskii
2016-04-27 18:22 ` Andreas Schwab
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2016-04-27 17:58 UTC (permalink / raw
To: Drew Adams; +Cc: larsi, 397
> Date: Wed, 27 Apr 2016 10:46:38 -0700 (PDT)
> From: Drew Adams <drew.adams@oracle.com>
> Cc: 397@debbugs.gnu.org
>
> `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 "@@@@@@@@@@@@@@@@@"))
So, from now on, no Info manual can be called "dir" or "dir.info", or
suchlikes? Does dimming an option in a rarely-used menu really
justify this? I don't think so.
We should look for a better solution, if one exists. If it doesn't,
then it isn't a catastrophe to have that option be available and fail
if invoked where it cannot work. No one who knows something about
Info will invoke that function in this situation, anyway.
> But probably not. `Info-index' does only this:
> (equal Info-current-file "dir")
Bad, bad Info-index!
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 17:58 ` Eli Zaretskii
@ 2016-04-27 18:22 ` Andreas Schwab
2016-04-27 19:27 ` Eli Zaretskii
0 siblings, 1 reply; 14+ messages in thread
From: Andreas Schwab @ 2016-04-27 18:22 UTC (permalink / raw
To: Eli Zaretskii; +Cc: larsi, 397
Eli Zaretskii <eliz@gnu.org> writes:
> So, from now on, no Info manual can be called "dir" or "dir.info", or
> suchlikes?
dir has always been special.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 18:22 ` Andreas Schwab
@ 2016-04-27 19:27 ` Eli Zaretskii
2016-04-30 20:08 ` Juri Linkov
0 siblings, 1 reply; 14+ messages in thread
From: Eli Zaretskii @ 2016-04-27 19:27 UTC (permalink / raw
To: Andreas Schwab; +Cc: larsi, 397
> From: Andreas Schwab <schwab@linux-m68k.org>
> Cc: Drew Adams <drew.adams@oracle.com>, larsi@gnus.org, 397@debbugs.gnu.org
> Date: Wed, 27 Apr 2016 20:22:07 +0200
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > So, from now on, no Info manual can be called "dir" or "dir.info", or
> > suchlikes?
>
> dir has always been special.
It's name is special, but its structure could be anything, and could
support a TOC.
^ permalink raw reply [flat|nested] 14+ messages in thread
* bug#397: 23.0.60; T in Info when in (dir)
2016-04-27 19:27 ` Eli Zaretskii
@ 2016-04-30 20:08 ` Juri Linkov
0 siblings, 0 replies; 14+ messages in thread
From: Juri Linkov @ 2016-04-30 20:08 UTC (permalink / raw
To: Eli Zaretskii; +Cc: larsi, Andreas Schwab, 397
>> > So, from now on, no Info manual can be called "dir" or "dir.info", or
>> > suchlikes?
>>
>> dir has always been special.
>
> It's name is special, but its structure could be anything, and could
> support a TOC.
I remember an idea to display a table of contents of (usually very long)
dir itself with a list of its section names.
^ permalink raw reply [flat|nested] 14+ messages in thread
[parent not found: <<5a64ed8a-d9c7-4b33-b63a-11d83b7dab99@default>]
end of thread, other threads:[~2022-03-21 22:06 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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
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.