[Top][All Lists]

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

Re: [PATCH] ed with perl-compatible regular expressions

From: Bob Proulx
Subject: Re: [PATCH] ed with perl-compatible regular expressions
Date: Tue, 27 Jul 2021 10:43:21 -0600

John Cowan wrote:
> Paul Jackson wrote:
> The less ed(1) changes, the happier I am.

+1.  People are not using ed because it has color syntax highlighting,
integrated debugger, or vcs integration.  People use ed because it is
The Standard Editor that one can always count on being there and
operating exactly in a standard way.

> I sympathize entirely with that point of view.  However, if all non-Posix
> features are gated behind command-line options, particularly GNU-style
> options like --pcre, then I think everyone's interests are served:
>    - If you want PCRE matching, use alias ed='ed --pcre';
>    - If you don't, don't use an alias;
>    - To bypass the alias temporarily for performance or whatever reasons,
>    type \ed to the shell.

Not that long ago, well it was pre-pandemic times when we used to
meet-up in person, I used ed to rescue a friend's Ubuntu laptop that
he had messed up while at the meet-up!  He had no functional editor
that we could find other than ed.  I don't know why but he had the
packaged ed installed.  I am guessing some DE dependency pulled in a
dependency and on down the line and ed was installed.  I was able to
use ed to rescue his system!  No amount of local custom building could
have worked in that situation.

Expanding ed to include creeping features is an insidious path.  Where
does it stop?  If Emacs or Vim are the obvious goals then why not
simply use Emacs/Vim now?  Why try to mutate ed to be down that path
instead of simply using the editor that supports these features in the
first place?  And also if so then why start with ed instead of editors
like nano that are already further along the path to that goal?

> It's unlikely you'd type such an extension by mistake, unlike (say) ed -P.
> I already use alias ed=ed -p '* ' because I like prompts, but if I'm
> running an ed script, I use \ed <foo.ed.

This is not really the same thing.  Because these are features that
are portably available in every version of ed.


reply via email to

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