bug-texinfo
[Top][All Lists]
Advanced

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

Re: [PATCH] install-info: fix delete dir file section code


From: John Wheeler
Subject: Re: [PATCH] install-info: fix delete dir file section code
Date: Fri, 24 Mar 2023 15:19:45 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

On 3/24/23 14:41, Gavin Smith wrote:
Thanks for the detailed instructions on how to replicate this
problem.  I agree that the extra blank line being inserted is
not a good thing.

Could it be fixed by avoiding adding an extra blank line if
not needed, rather than by deleting an extra line?

With your proposed fix, it is possible for a non-blank line
to be removed.  So if 'dir' contains

* Menu:

Animals
* Gnu: (gnu).                    Wildebeest native to Africa.
Livestock
* Cow: (cow).                    A farm animal.

then running

../ginstall-info --remove --info-dir=. --info-file=./cow; \
../ginstall-info --info-dir=. --info-file=./cow \
cat dir

deletes the "* Gnu (gnu). ..." line.

I think that install-info should handle this case as well, which
would be possible if, for example, somebody hand-edited dir.
Unconditionally removing the line before the section doesn't seem
right.
Very good point, I had rashly assumed the sections would
never occur without an intervening blank line.  Also, I will
consider your suggestion to avoid adding the extra blank
line.  Will submit a revised patch when I get that done.

Can you think of a legitimate reason for there to be
multiple blank lines (a sequence of more that two
consecutive newline characters) in a valid dir file?

Thank you,
John




reply via email to

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