I'm currently going through the source code for ed and given that
stuff like second_address is in multiple files and multiple functions,
it's a bit confusing how to do this. For anyone who knows more about
the program source code than I do, which file do you think I should be
looking into for this? With a casual glance at it, it appears that ed
just dumps the file contents into a buffer and just sets the last line
as the default. Any suggestions?

On Sun, Feb 19, 2023 at 7:07 AM John Cowan <co...@ccil.org> wrote:
>
> Sounds good to me, but I don't have the time/energy to write the code at the 
> moment.
>
> On Sun, Feb 19, 2023 at 6:04 AM Martin Guy <martinw...@gmail.com> wrote:
>>
>> On 19/02/2023, John Cowan <co...@ccil.org> wrote:
>> > I would suggest [...] line argument +n causes the current line to be n,
>> > and [...] +/pattern causes the current line to be the first line matching
>> > the pattern.
>>
>> I concur. I was surprised to find that it doesn't already do this.
>> Let's call it a GNU extension :)
>> Would you like to prepare a patch to review?
>> That way, even if it doesn't get accepted for mainline,
>> we can all have our own versions that do :))
>>
>>     M

Reply via email to