On Sun, Feb 23, 2025 at 11:46:20AM +0000, Gavin Smith wrote:

> > This seems simple and could be enough.  Just to be clear, my
> > understanding is that there is a program named, for example,
> > missing-info on all the platforms, that gets a manual name in argument
> > and answers a sentence to be said by Info readers.  This program is
> > platform specific and ideally maintained by the platform developers.
> > Did I understand correctly?
> 
> Yes, it would get the manual name as an argument. I think the script
> would print the message itself.
> 
> There are details to be worked out such as what happens when following
> a cross-reference in an Info file, but I'm sure we could figure something
> out.
> 
> I'm starting the code to find and run such a hook.

I've commited code to use a hook program under
"XDG_CONFIG_DIRS/texinfo/info-hooks/manual-not-found", where XDG_CONFIG_DIRS
could be e.g. $HOME/.config or /etc/xdg.

------------------
$ cat info-hooks/manual-not-found 
#!/bin/sh

echo "Manual '$1' not found"

exit 0
------------------

Then if I run "info cpio", the message

Manual 'cpio' not found

is printed, and info does not load.

If the hook exits with a non-zero status (like "exit 1"), then info
continues as before and tries to load the man page.  This way the hook
program could distinguish between manuals it knows about and completely
unknown manuals, which could be looked up as manpages.

> > This looks like a good plan but it relies
> > on platforms developper volunteers and our ability to convince them to
> > do it... 
> 
> Yes, you are right here.

Perhaps there are distribution maintainers who read this mailing list
who could comment or who could help us to design the feature?  We could change
the feature freely up until the point when it appears in a released version
of Texinfo.

Reply via email to