bug-texinfo
[Top][All Lists]
Advanced

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

Re: [PATCH] Texinfo: inconsistent behavior: cmd line vs. env


From: Bogdan
Subject: Re: [PATCH] Texinfo: inconsistent behavior: cmd line vs. env
Date: Thu, 23 Mar 2023 21:20:44 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

Gavin Smith <gavinsmith0123@gmail.com>, Thu Mar 23 2023 20:25:27 GMT+0100 (Central European Standard Time)
On Thu, Mar 23, 2023 at 05:57:58PM +0100, Bogdan wrote:
There is still the minor question of what should happen if
TEXI2DVI_BUILD_DIRECTORY is set to '.' (the default).  Since this is the
default value, it doesn't seem right that explicitly setting
TEXI2DVI_BUILD_DIRECTORY=. in the environment should change the
behaviour of texi2dvi.


  I *was* thinking about this, too. On the other hand, if the user gives
"--build-dir=.", it *would* imply --tidy, even though this is the default.
The sole presence of the switch changes the behaviour.

It occured to me that we didn't have to make '.' the default value.  We
can make the default value empty and avoid this as a special case.  The
build_dir variable is not used that much in the program, so it is easy
to accommodate a change in default value.


Probably even better. When specifying a build directory, give an actual value. If you want just --tidy and use the default directory name, write just --tidy. Makes sense :).

[...]


Hence, I propose the following patch:

Here's an updated patch:


[...]


@@ -151,12 +151,7 @@ Build modes:
        --tidy           same as --build=tidy
    -c, --clean          same as --build=clean
        --build-dir=DIR  specify where the tidy compilation is performed;
-                         implies --tidy;
-                         defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir]
-
-The MODE specifies where the TeX compilation takes place, and, as a
-consequence, how auxiliary files are treated.  The build mode can also
-be set using the environment variable TEXI2DVI_BUILD_MODE.


I suppose the first sentence in the above removed block is still correct, so it could stay (but doesn't need to). "Tidy compilation" sounds maybe a bit strange. But "compilation in tidy mode" or "TeX compilation in tidy mode" are probably too long. Maybe "tidy build"? But, I'm not insisting. The user probably knows what this means anyway.

 [Snip the rest of the patch - agreed]


  Remember also about the help message:

"
       --build-dir=DIR  specify where the tidy compilation is performed;
                          implies --tidy;
                          defaults to TEXI2DVI_BUILD_DIRECTORY [$build_dir]

"

For some reason, it was made so that passing --build-dir implies --tidy...
But, maybe just for the non-default values, as I wrote above ("external
directories").

It's slightly more complicated than it needs to be due to the
indirection through TEXI2DVI_BUILD_DIRECTORY.  I've reworded this in the
patch above.

  From a user's point of view - looks fine. Generally, I have nothing against
your change.
  Since I began playing with fixing Automake I'm just worried if its tests
would need to pass --tidy now, which wasn't present in the older versions,
so what do we do now to have a command line that works with all versions
(maybe except really ancient ones)?
But it seems we're always passing a directory which isn't ".", so hopefully
it will work.

In the new patch above "." is no longer a special case.


 Sounds fine, thank you!

--
Regards - Bogdan ('bogdro') D.                 (GNU/Linux & FreeDOS)
X86 assembly (DOS, GNU/Linux):    http://bogdro.evai.pl/index-en.php
Soft(EN): http://bogdro.evai.pl/soft  http://bogdro.evai.pl/soft4asm
www.Xiph.org  www.TorProject.org  www.LibreOffice.org  www.GnuPG.org




reply via email to

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