View Issue Details

IDProjectCategoryView StatusLast Update
00011311003.1(2016/18)/Issue7+TC2Shell and Utilitiespublic2024-06-11 09:09
ReporterAntonio Diaz Assigned To 
PrioritynormalSeverityObjectionTypeError
Status ClosedResolutionAccepted As Marked 
NameAntonio Diaz
OrganizationGNU
User Reference
Sectioned
Page Number2684
Line Number87533
Interp Status---
Final Accepted TextSee 0001131:0004104
Summary0001131: The synopsis of the i command is wrong and inconsistent with the synopsis of the a command
DescriptionThe synopsis of the i command states that "Address 0 shall be valid for this command; it shall be interpreted as if address 1 were specified".

But the command "1i" is invalid in an empty buffer. If interpreted literally, the synopsis implies that it is not possible to insert text in an empty buffer. IMO, address 0 should always mean "at the beginning of the buffer" instead of sometimes being considered as a synonym for address 1.

The synopsis of the i command also states that "This command differs from the a command only in the placement of the input text". This seems to imply that both commands must set the current address to the same value if no lines are appended/inserted. This value should be 0 for an empty append/insert at address 0 to be consistent with the synopsis of the a command.
See discussion at http://lists.gnu.org/archive/html/bug-ed/2016-04/msg00009.html
Desired ActionChange the synopsis of the i command to:

The i command shall insert the given text before the addressed line; the current line number shall become the address of the last inserted line or, if there were none, the addressed line. This command differs from the a command only in the placement of the input text. Address 0 shall be valid for this command; it shall cause the inserted text to be placed at the beginning of the buffer.
Tagstc3-2008

Relationships

related to 0001130 Closed Address 0 does not make sense for the c command 

Activities

nick

2018-09-06 16:32

manager   bugnote:0004104

Last edited: 2018-09-06 16:34

On page 2684 line 87533 section ed, change:

Address 0 shall be valid for this command; it shall be interpreted as if address 1 were specified.


to:

Address 0 shall be valid for this command; it is unspecified whether it causes the inserted text to be placed at the beginning of the buffer or it is interpreted as if address 1 were specified. (These two allowed behaviors differ in the case that the buffer is empty.)


nick

2018-09-06 16:42

manager   bugnote:0004106

Note that the resolution in 0001131:0004104 has impact on the rationale; the rationale was changed in 0001130

Issue History

Date Modified Username Field Change
2017-03-21 17:42 Antonio Diaz New Issue
2017-03-21 17:42 Antonio Diaz Name => Antonio Diaz
2017-03-21 17:42 Antonio Diaz Organization => GNU
2017-03-21 17:42 Antonio Diaz Section => ed
2017-03-21 17:42 Antonio Diaz Page Number => 0
2017-03-21 17:42 Antonio Diaz Line Number => 0
2018-09-06 15:46 nick Page Number 0 => 2684
2018-09-06 15:46 nick Line Number 0 => 87533
2018-09-06 15:46 nick Interp Status => ---
2018-09-06 16:32 nick Note Added: 0004104
2018-09-06 16:33 geoffclare Relationship added related to 0001130
2018-09-06 16:34 nick Note Edited: 0004104
2018-09-06 16:34 nick Note Edited: 0004104
2018-09-06 16:35 nick Final Accepted Text => See Bugnote:0004104
2018-09-06 16:35 nick Status New => Resolved
2018-09-06 16:35 nick Resolution Open => Accepted As Marked
2018-09-06 16:38 nick Tag Attached: tc3-2008
2018-09-06 16:42 nick Note Added: 0004106
2018-09-07 08:18 geoffclare Final Accepted Text See Bugnote:0004104 => See 0001131:0004104
2019-10-31 11:39 geoffclare Status Resolved => Applied
2024-06-11 09:09 agadmin Status Applied => Closed