bug-texinfo
[Top][All Lists]
Advanced

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

Re: [bug #45602] makeinfo could warn when given a file with a .info suff


From: Patrice Dumas
Subject: Re: [bug #45602] makeinfo could warn when given a file with a .info suffix
Date: Thu, 23 Jul 2015 21:27:40 +0200
User-agent: Mutt/1.5.20 (2009-12-10)

On Wed, Jul 22, 2015 at 10:20:47AM +0000, Gavin D. Smith wrote:
> 
> Details:
> 
> Sometimes I write "makeinfo FILE.info" when I meant to write "makeinfo
> FILE.texi" instead, and end up with a file "file.info.info" being created.
> (The warning I get is that the Info file has no nodes.) Maybe makeinfo could
> issue a warning that running it on a file with a .info suffix probably wasn't
> intended. Alternatively, maybe it could even go looking for a file "FILE.texi"
> when invoked as "makeinfo FILE.info" and use that instead.
> 
> I think this is an easy mistake to make because in my mind I am "*make*ing an
> *info* file, *FILE.info*" which turns into "makeinfo FILE.info".

In fact, makeinfo already does some magic with file extentions, as it
tries to append ('.txi','.texinfo','.texi','.txinfo','').

I think that it is already too magic.  I would advise against adding
more, except if it could cause some loss of file, but that case should
not as no file named FILE.info.info should exist.

What could probably be interesting, however, could be to have a better
warning when it can be established that the input file is not a Texinfo
file.  I think that it should not be in the parser, but in the makeinfo
file directly.  Maybe if the tree is only a 'text_root' element and
$parser->global_commands_information() is empty there could be a
specific warning in addition to the document without node warning?

-- 
Pat



reply via email to

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