Hi Artyom,
Artyom Bologov wrote:
But wait, does not \/HELLO/ set the dot before executing `k'?
The manual states clearly that the current address is unchanged:
http://www.gnu.org/software/ed/manual/ed_manual.html#Commands
(.)kx
Marks a line with a lower case letter 'x'. The line can then be
addressed as ''x' (i.e., a single quote followed by 'x') in subsequent
commands. The mark is not cleared until the line is deleted or otherwise
modified. The current address is unchanged.
Best regards,
Antonio.