From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Mon, 7 May 2007 22:02:45 -0700 From: Yard Ape To: 9fans@cse.psu.edu Message-ID: <46400475.CD8IinOH3SQR21Fj%yard-ape@telus.net> References: <2899e2610705062257r3f619e72v1de67f779c0a1cf4@mail.gmail.com> <32d987d50705062302p63ec0931m608d0ee03b9454e5@mail.gmail.com> <2899e2610705062304k1a9ef778y79c1e6a405697aea@mail.gmail.com> <2899e2610705062353p32697498n601a7566b905b78a@mail.gmail.com> <20070507083522.GA898@shodan.homeunix.net> <32d987d50705070311j1ebf0379od50947ae03d456cd@mail.gmail.com> <2899e2610705071710i47125c9dl22727abfe13233c3@mail.gmail.com> In-Reply-To: <2899e2610705071710i47125c9dl22727abfe13233c3@mail.gmail.com> User-Agent: nail 11.25 7/29/05 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: [9fans] Sam: m and "changes not in sequence" Topicbox-Message-UUID: 5f5242cc-ead2-11e9-9d60-3106f5b1d025 One of my favourite functions of ed is to arrange the lines of a file by regex: g/foobar/m0 (The usefulness of this becomes clear when you're working on horrendus spreadsheets, for example.) In Sam, I tried variations of: x g/foobar/m0 but consistently received "changes not in sequence" errors. I don't understand. As I read Mr. Pike's paper, Sam works much as ed in these loops; one pass over the file to mark the changes to be made, another to make the changes. Thanks in advance!