On 2026-04-05 01:45, Artyom Bologov writes:
does not \/HELLO/ set the dot before executing `k'?

No. I've attached a man page for ed, since the current GNU ed
maintainer has deleted it, sigh. At the bottom of the DESCRIPTION
section, you'll find:

       In general, ed commands consist of zero or more line addresses,
       followed by a single character command and possibly additional
       parameters; i.e., commands have the structure:

             [address[,address]]command[parameters]

       The address(es) indicate the line or range of lines to be
       affected by command. If fewer addresses are given than command
       accepts, then default addresses are supplied.

So `/HELLO/kan' is actually a single command, not two (or three).
Unfortunately, the description of the `k' command itself leaves some
ambiguity, so I've updated the manual to explicitly state that the
current address is not changed:

       (.)klc Marks the addressed line with a lower case letter lc
              without changing the current address. The line can then
              be addressed as 'lc (i.e., a single quote followed by
              lc) in subsequent commands. The mark is not cleared
              until the line is deleted or otherwise modified.

Attachment: ed.1
Description: Unix manual page

Reply via email to