9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] Acme aborts on a pointless Edit command
@ 2007-12-24  4:17 Anthony Martin
  2007-12-24  4:28 ` Pietro Gagliardi
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Anthony Martin @ 2007-12-24  4:17 UTC (permalink / raw)
  To: 9fans

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


^ permalink raw reply	[flat|nested] 13+ messages in thread
* Re: [9fans] Acme aborts on a pointless Edit command
@ 2007-12-28  6:08 Joshua Wood
  0 siblings, 0 replies; 13+ messages in thread
From: Joshua Wood @ 2007-12-28  6:08 UTC (permalink / raw)
  To: 9fans

The fix builds cleanly and stops the crash described above, for me. I  
hadn't hit the bug except by contrivance, so maybe one of the  
original discussants can say if I'm missing something.

--
Josh




^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2007-12-28  6:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-24  4:17 [9fans] Acme aborts on a pointless Edit command Anthony Martin
2007-12-24  4:28 ` Pietro Gagliardi
2007-12-24  4:37   ` Anthony Martin
2007-12-24  9:50   ` Rob Pike
2007-12-24  5:25 ` erik quanstrom
2007-12-24 17:24   ` Joel C. Salomon
2007-12-24 17:35     ` Pietro Gagliardi
2007-12-25  1:51       ` [9fans] ipod + plan9 Philipp
2007-12-25  5:20         ` Pietro Gagliardi
2007-12-26 12:52 ` [9fans] Acme aborts on a pointless Edit command roger peppe
2007-12-26 17:52   ` ron minnich
2007-12-27  3:36 ` Rob Pike
2007-12-28  6:08 Joshua Wood

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).