[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-ed] g /RE/COMMAND-LIST not working ?
From: |
Antonio Diaz Diaz |
Subject: |
Re: [Bug-ed] g /RE/COMMAND-LIST not working ? |
Date: |
Tue, 12 May 2015 17:22:37 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.8.1.4) Gecko/20070601 SeaMonkey/1.1.2 |
Paul Jackson wrote:
The above online ed manual looks to me to be based on the man page, not
on the info page.
On the contrary. The above online ed manual was produced with makeinfo
from the (not yet released) fixed texinfo source.
The ed man page, at least as far back as early 1990's ed-0.2, which I
have on my disk right now, and at least as far back as late 1970's
Version 7 Unix (man page for that ed here:
http://modman.unixdev.net/?manpath=v7man&page=ed&sektion=1) always had
that correct.
In the case of GNU ed, the troff source has always included extra
spaces. They were not noticed because troff, I guess, removes them from
the formatted output. For example, the following line is from ed.1 in
GNU ed 0.2:
.RI (1,$)g /re/command-list
Since version 1.6, GNU ed man page is generated with help2man.
I am reading the "info ed" pages now for the first time. Here's what
else I notice that looks either wrong, or at least dubious, to me. (Do
beware that I usually run ed 0.2, not GNU Ed 1.10, so my comments below
may reflect my archaic expectations.)
Feedback from experienced users is always welcome. :-)
1. In the "2 Introduction to line editing" section, it ways "<BACKSPACE>
(sometimes labeled <DELETE> or <DEL>)". This is dubious in my view.
Right. In fact neither <DEL> nor the arrow keys seem to work in input
mode. I have removed the reference to <DEL>. The text now says:
"Prior to typing <RETURN>, corrections to the line may be made by typing
either <BACKSPACE> to erase characters backwards, or <CONTROL>-u (i.e.,
hold the CONTROL key and type u) to erase the whole line."
2. In the same section, the "*,w junk" example is a bit silly, as the
default address range for the "w" command is the whole buffer
True. Surely nobody types the comma. And the other examples of the "w"
command do not include it. So I have removed the comma.
3. In the same section, it says "Comments begin with a '#'." It would be
more accurate, in my view, to have said "Commands beginning with a
'#' are taken as comments and ignored." (Input mode lines that begin
with '#' are just more input, otherwise it would require tricky use
of the 's' command or some other such workaround to enter '#' comment
lines into code.)
Good observation. I have modified it as you suggest.
4. In the section "3 Invoking ed", it states of the --restricted option
"This mode disables edition of files ...". Typo. Should be "This mode
disables editing of files ...".
Corrected.
5. In the section "6 Commands", when removing spaces from the 'g' and
'G' commands, don't forget to also remove spaces from the 'v' and 'V'
commands. So far as I have noticed, spaces are allowed and harmless
on other commands.
I have already removed the extra spaces from 'g', 'G', 's', 'v', 'V' and
'z' commands. Other commands, like 'e', seem to need the space:
$ ed -v
efoo
?
Unexpected command suffix
e foo
3865
Perhaps some of the above will prove useful. Thanks for continuing to
keep this ancient dog alive
Sure, thanks. And you are welcome. :-)
Best regards,
Antonio.