bug-ed
[Top][All Lists]
Advanced

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

Re: [bug-ed] Cut buffer does not persist between files


From: Bob Proulx
Subject: Re: [bug-ed] Cut buffer does not persist between files
Date: Mon, 13 Jan 2020 14:45:27 -0700

I am late to the discussion but I can't resist.

Brian Zwahr wrote:
> Antonio Diaz Diaz wrote:
> > Brian Zwahr wrote:
> > > I'm running into an issue that I'm not sure if it's a feature, a bug, or
> > > just an oversight. If I open a file in ed, yank some text with `y`, then
> > > open a new file for editing using `e`, I can't paste the yanked text with
> > > `x`.
> > 
> > This has been GNU ed's behavior since the yank buffer was introduced in 
> > version 0.2 (1994). The yank buffer is cleared before closing the old file 
> > and opening the new.

And I must include Paul's comment.

Paul Jackson wrote:
> Even though "ed" continues to be my primary editor,
> throughout the years, I did not even know that "yank"
> existed until just now.

Although ed is not my primary edit it was almost the first editor I
ever learned to use.  (I learned qed first which is a close cousin of
ed.)  I still often use ed quite often for various reasons and think I
am still rather proficient with it.

And so if you asked me what the 'x' command did I would have said it
did encryption!  Here is what the FreeBSD man page for ed says;

     x       Prompt for an encryption key which is used in subsequent reads
             and writes.  If a newline alone is entered as the key, then
             encryption is turned off.  Otherwise, echoing is disabled while a
             key is read.

And there is no 'y' command there.  I checked the Unix v7 sources and
it was the same.

But I know that during the old days when encryption was regulated in
the US as a munition under the ITAR and export of strong encryption
was effectively banned that encryption was stripped from many programs
so that they could be freely distributed.

So maybe this new fangled 'y' command and different 'x' command
instead of encryption will catch on.  Maybe not.  Who is to say?  It
is only been in GNU since 1994 after all.  Wouldn't want to rush into
things.  But if you depend upon it and then end up on a BSD system you
would find it a missing feature there.  So perhaps it is better to
stick to the common functionality anyway so that the fingers don't
learn habits that don't port well.  :-)

Bob



reply via email to

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