[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: FYI: replacement for MODULES.html.sh
From: |
Bruno Haible |
Subject: |
Re: FYI: replacement for MODULES.html.sh |
Date: |
Tue, 9 Nov 2010 11:04:12 +0100 |
User-agent: |
KMail/1.9.9 |
Hi Thien-Thi,
On 2010-10-06 you wrote:
> The script MODULES.html.sh takes 50 minutes to run on my computer,
> so i wrote a replacement in Emacs Lisp ...
>
> I attach it in hopes that others might find it useful, without any
> strong ambition for its inclusion in gnulib, since not everyone
> uses Emacs (or so it is said ;-), and not everyone minds waiting.
I'm sorry to say this, since you spent time on it, but: There is no
point in trying to use Emacs Lisp for non-interactive tasks in gnulib.
The point is that most of us here are not familiar with Emacs Lisp
programming, whereas the main gnulib contributors are familiar with
sh shell script programming:
Eric: https://savannah.gnu.org/people/resume.php?user_id=1389
me: https://savannah.gnu.org/people/resume.php?user_id=1871
Paolo: https://savannah.gnu.org/people/resume.php?user_id=386
(Jim and Paul don't have published their skill sets, but I guess
both of them have been doing more shell script programming than
Emacs Lisp programming lately.)
It's not about the technical merits of one or the other language.
- Shell scripts are immediately executable. Downside: Dozens of
pitfalls, fortunately documented in the Autoconf manual. And
slow speed.
- Emacs Lisp allows to define macros with abstraction. Downside:
Not standardized => the functions change in every Emacs release.
Still no lexical binding of variables (computer science progress
from 1970 to 1980 being ignored).
Really the main point is that we all want to be able to modify this
script.
Maybe your point is that you are a skilled Emacs Lisp hacker, and
want something to hack on? In that case, I have three proposals:
1) Create an Emacs add-on for analyzing portability problems
with the help of gnulib. When someone builds and installs
the POSIX part of gnulib (the modules 'string', 'stdlib', etc)
in, say, /usr/local, and then compiles part of a program with
"-I/usr/local/include -DGNULIB_POSIXCHECK", he will get a lot
of warnings of the kind
"warning: attribute: "memmem is unportable and often quadratic - use
gnulib module memmem-simple for portability, and module memmem for speed"
It would be good to display these warnings with a direct pointer
to the source code (like 'M-x compile' does), and possibly even
help the programmer to select the right gnulib modules.
2) A more trivial Emacs add-on, targeted at gnulib developers that
use Emacs in their daily work, would be a command that opens all
files of a gnulib module in a single frame. The module list is
found in the module description.
3) The GNU gettext po-mode is rusty - precisely because of lack
of Emacs Lisp skills on my side. If you want to revamp and
extend it, I have some suggestions.
Bruno
- Re: FYI: replacement for MODULES.html.sh,
Bruno Haible <=