bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: ed could make clearer error messages


From: Andrew L. Moore
Subject: Re: ed could make clearer error messages
Date: Wed, 27 Mar 2002 15:12:41 -0800

In message <address@hidden>, Dan Jacobson writes:
>ed could be clearer in its error messages.  e.g. instead of saying
>script, line 2: Unknown command
>it could say
>script, line 2: {: Unknown command

Agreed.

>  ed $i <<EOF
>H
>/<ADDRESS>/,/<\/ADDRESS>/{
>s#href="http://www.jidanni.org/";>Dan Jacobson#href="$home">Dan Jacobson#
>}
>wq
>EOF
...
>By the way, perhaps add all sed stuff missing in ed to ed, e.g. "{"

`{' could be interpreted as shorthand for for `g/.*/\', but
the global command (g) masks some errors that could cause unexpected
results.

FYI, the above example in (inefficient) ed syntax:

ed  -s o.tmp <<EOF
H
/<ADDRESS>/,/<\/ADDRESS>/g/.*/\
s#href="http://www.jidanni.org/";>Dan Jacobson#href="$home">Dan Jacobson#
wq
EOF

>Also make sure both sed and ed produce emacs M-x compile parsable
>error line numbers... 

Okay.
Thank you for your suggestions and diligence!

-AM



reply via email to

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