From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Sun, 23 Dec 2007 20:17:04 -0800 From: Anthony Martin To: 9fans@cse.psu.edu Message-ID: <20071224041704.GA14349@dinah> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Subject: [9fans] Acme aborts on a pointless Edit command Topicbox-Message-UUID: 2132625a-ead3-11e9-9d60-3106f5b1d025 I was feeling obscene and decided to test out stupid commands in sam and acme. Here's something I didn't expect. Sam: , x g/^/m. no change to file Acme (Edit): , x g/^/m. aborts in /sys/src/cmd/acme/ecmd.c:/^move It aborts because "move overlaps itself" but the question I have is, should it work like sam and do *visually* nothing at all? Anthony P.S. This came about because I was trying to find a way to move lines matching a certain pattern to the beginning of a file (like g/pattern/m0 in ed). Is there a nice way to do this in sam? Something that works like the ed command but leaves the lines in original order, not reversed, would be even better. -- I spent a night with a blow-up girl and some LSD. -Freeheat