bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#397: 23.0.60; T in Info when in (dir)


From: Drew Adams
Subject: bug#397: 23.0.60; T in Info when in (dir)
Date: Wed, 27 Apr 2016 11:09:54 -0700 (PDT)

> > `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.

It was a quick-and-dirty implementation suggestion.  I don't
argue for that implementation.

If we put the "real" code for this into an :enable menu guard
then that guard would be (Info-find-node "dir" "*TOC*").

And in the case of your hypothetical manual named "dir", there
could be such a *TOC* node, and in that case the menu item would
be correctly enabled.

> 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.

Fair enough.  Someone might actually try it: use the :enable
guard (Info-find-node "dir" "*TOC*") and see whether it is
in fact onerous.  If it is then I agree with (both of) you:
we can do without disabling the menu item.

> > But probably not.  `Info-index' does only this:
> > (equal Info-current-file "dir")
> 
> Bad, bad Info-index!

;-)





reply via email to

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