Re: whatnow: problems with edit--draft left

Robert Elz <[email protected]>
Newsgroups gmane.mail.nmh.devel
Message-ID <[email protected]>
    Date:        Tue, 11 Jun 2024 14:41:21 +0100
    From:        Ralph Corderoy <[email protected]>
    Message-ID:  <[email protected]>

  | I'm puzzled why g/x/= prints 3 twice rather than 1, 3.

Add an extra line at the end (not containing x) and you'll see it
prints 4 4, which makes what happened obvious.

The = command with no address prints the number of lines in the file,
which in your case happened to be 3 (that line 3 contained x was a
coincidence).

	g/x/.=

would do what you intended.   (Most commands that you'd use with a g//
prefix default to '.' if no address is given, '=' happens to be one which
doesn't.)

kre
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.