Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 07 Jan 1995 01:46:38 -0800
From:      "Jordan K. Hubbard" <jkh@time.cdrom.com>
To:        hackers@freefall.cdrom.com
Subject:   The Meta-dir file for info.
Message-ID:  <25294.789471998@time.cdrom.com>

next in thread | raw e-mail | index | archive | help
Who was talking about that awhile back, Satoshi?  Well whatever you
want to call it, we need one.  We need a dir file that's looked at by
/usr/bin/info, which we now install by default (didn't know that, eh?
:), and which points to:

	1. All the top nodes of various info packages provided by
	   /usr/src/gnu/* and installed into /usr/share/info.
	   (e.g. our own doc should have a pointer, at the very least)

	2. Any and all _additional_ GNU or other whatsits that want to
	   paste an entry into it!  This means that a package should be
	   able to drop its pages into /usr/local/info someplace and
	   then run some specialized utility (addinfo?  addtop?) to
	   add a pointer to it to the "global" dir file.

We could probably do this immediately by just inventing a magic cookie
format for marking a section in the dir file.  Say you seed the file
initially with something like this:

-*- Text -*-
This is the file .../info/dir, which contains the topmost node of the
.. blah blah blah ..

File: dir	Node: Top	This is the top of the INFO tree
  This (the Directory node) gives a menu of major topics. 
  Typing "d" returns here, "q" exits, "?" lists all INFO commands, "h" 
  gives a primer for first-timers, "mTexinfo<Return>" visits Texinfo topic,
  etc.
  --- PLEASE ADD DOCUMENTATION TO THIS TREE. (See INFO topic first.) ---

* Menu: The list of major topics begins on the next line.

* Info: (info).		Documentation browsing system.
* Texi: (texi).		TexInfo guide.
* Makeinfo: (makeinfo). Makeinfo guide.

/*/[editors]	Text Editors
/*/[utils]	Utilities
/*/[devel]	Development Tools

[EOF]

Assuming our cookie is `/*/', we have three markers: editors, utils &
devel.  Now, when our intrepid package wishes to register itself,
let's say it calls our little utility like so:

	info_install -c editors -h "The GNU EMACS Editor, version 19.27" \
		-d /usr/local/info -f emacs -i <descriptive text file>

The result being the dir file now looks like this:

...
* Menu: The list of major topics begins on the next line.

* Info: (info).		Documentation browsing system.
* Texi: (texi).		TexInfo guide.
* Makeinfo: (makeinfo). Makeinfo guide.

* Emacs: (emacs). The GNU EMACS Editor, version 19.27
*  Emacs is a large, comprehensive editor for blah blah blah ..
*
/*/[editors]	Various Editors
/*/[utils]	Utilities
/*/[devel]	Development Tools


And if you then did the following from devel/gmake:

	info_install -c devel -h "The GNU Make Utility, version 3.26" \
		-d /usr/local/info -f make.info

You'd see:

...
* Texi: (texi).		TexInfo guide.
* Makeinfo: (makeinfo). Makeinfo guide.

* Emacs: (emacs). The GNU EMACS Editor, version 19.27
*  Emacs is a large, comprehensive editor for blah blah blah ..
*
/*/[editors]	Various Editors

* Make: (make.info).  The GNU Make Utility, version 3.26
/*/[editors]	Various Editors
/*/[utils]	Utilities
/*/[devel]	Development Tools


Capiche?

I dunno, It Just Might Work.  And it'd be damned nice to have `info'
actually be a truly meaninful command!  A dir file pointing to any and
all info available as the system matured would be NICE, and I can see
many ways for the port system to cooperate nicely.

				Jordan






Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?25294.789471998>