argp --help formatting bug with non-ASCII characters

2024-04-11 Thread Bruno Haible
Reported by Lasse Collin: The argp module from Gnulib has a rendering problem in the --help output of the program. Namely, it counts bytes when it should count screen columns. How to reproduce: 1. Build GNU tar (1.33 or 1.35, for example). 2. Install it. 3. You can see misindentation: $ LC_ALL=de_

Re: gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Bruno Haible
Hi Collin, > > Oh, this means that r'[x\$]' contains dollar and backslash, whereas the > > programmer might have thought that it contains only the dollar? Indeed, > > it's worth to listen to these warnings! > > I don't think it changes the meaning: > > import re > re.match(r'[x$]*', 'x\\

Re: gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Collin Funk
On 4/11/24 12:25 PM, Bruno Haible wrote: > Oh, this means that r'[x\$]' contains dollar and backslash, whereas the > programmer might have thought that it contains only the dollar? Indeed, > it's worth to listen to these warnings! I don't think it changes the meaning: import re re.match(r

Re: gnulib-tool.py: Optimize module set lookups

2024-04-11 Thread Collin Funk
Hi Bruno, On 4/11/24 12:51 PM, Bruno Haible wrote: > The func_transitive_closure function in the shell implementation can take > a lot of time. So I wondered whether in the Python implementation, there > is room for speedup at this place as well. And indeed, there is. Nice work. I noticed this to

gnulib-tool.py: Optimize module set lookups

2024-04-11 Thread Bruno Haible
The func_transitive_closure function in the shell implementation can take a lot of time. So I wondered whether in the Python implementation, there is room for speedup at this place as well. And indeed, there is. Profiling the test-create-testdir-4.sh unit test, I saw this profiler output: +

Re: gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Bruno Haible
Hi Collin, > I decided to try PyCharm again since I remember liking it when I used > it ~1 year ago. It seems that it has pretty good warnings for regular > expressions. Both patches applied; thanks. > Patch 0002 removes some redundant backslashing. I am pretty sure most > of these were introduc

gnulib-tool.py: Simplify regular expressions.

2024-04-11 Thread Collin Funk
I decided to try PyCharm again since I remember liking it when I used it ~1 year ago. It seems that it has pretty good warnings for regular expressions. Patch 0001 changes simplifies '[A-Z][A-Z]*' to '[A-Z]+'. I'm not sure if this was intentional to match gnulib-tool.sh better though: 's,lib_

users.txt: Correct some entries

2024-04-11 Thread Bruno Haible
A few updates: - GNU anubis no longer uses gnulib-tool. - No need any more to refer to the gnuit home page. - GNU pdf moved from bzr to git. - libtasn1 moved its repository to gitlab.com. diff --git a/users.txt b/users.txt index 4d6d654546..8e0e02bb93 100644 --- a/users.txt +++ b/users.txt @@ -4,7

Re: gnulib-tool.py current status

2024-04-11 Thread Bruno Haible
Collin Funk wrote: > * Packages successfully tested with gnulib-tool.py > > bison > coreutils > cppi > cpio > diffutils > findutils > freedink > Update AC_PREREQ to 2.64 required. > gnutls > grep > groff > gzip > inetutils > libiconv > mailutils > patch > pspp

gnulib-tool.sh: Improve sort order of directories

2024-04-11 Thread Bruno Haible
In the 'poke' package, I'm seeing that gnulib-tool.sh sorts directory names with a trailing slash, whereas gnulib-tool.py sorts them without a trailing slash. How to reproduce: $ export GNULIB_TOOL_IMPL=sh+py $ git clone https://git.savannah.gnu.org/git/poke.git $ cd poke $ git submodule update -

gnulib-tool.sh: Remove './' prefix from file names to update or remove

2024-04-11 Thread Bruno Haible
In the 'gnuit' and 'acct' packages, I see that gnulib-tool.sh and gnulib-tool.py provide slightly different outputs. Namely, gnulib-tool.sh shows file names that start with './' if - a module contains a file 'build-aux/...' and - the configure.ac does not contain an AC_CONFIG_AUX_DIR invocation

Re: gnulib-tool.py in wget

2024-04-11 Thread Collin Funk
On 4/11/24 3:51 AM, Bruno Haible wrote: > => Applied. Thanks. Nice! Thanks for writing the ChangeLog entry. Collin

Re: gnulib-tool.py in jugtail

2024-04-11 Thread Collin Funk
On 4/10/24 7:23 PM, Bruno Haible wrote: > $ cat ../glpyFfCgil-sh-err > .../gnulib-tool.sh: *** missing --doc-base option. --doc-base has been > introduced on 2006-07-11; if your last invocation of 'gnulib-tool > --import' is before that date, you need to run 'gnulib-tool --import' > once, with a

Re: gnulib-tool.py in wget

2024-04-11 Thread Bruno Haible
Hi Collin, > Can you test the attached patch for me? It is just an addition of a > sorted() call, which should hopefully fix it. The patch works fine. It fixes gnulib-tool.py in the packages wget wdiff freedink => Applied. Thanks. Bruno

Re: gnulib-tool.py in wget

2024-04-11 Thread Collin Funk
Hi Bruno, On 4/10/24 5:07 AM, Bruno Haible wrote: > The reason is a different order of the languages in LINGUAS. > gnulib-tool.sh uses > LC_ALL=C ls -1 *.po | sed -e 's,\.po$,,' > which produces sorted output. Whereas GLImport.py uses > for file in os.listdir(joinpath(destdir, pobase)) > which