Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!think.com!paperboy!meissner From: meissner@osf.org (Michael Meissner) Newsgroups: comp.editors Subject: Re: How to write this macro? Message-ID: Date: 12 Apr 91 18:30:38 GMT References: <1991Apr11.211336.19184@massey.ac.nz> Sender: news@OSF.ORG Organization: Open Software Foundation Lines: 29 In-reply-to: news@massey.ac.nz's message of 11 Apr 91 21:13:36 GMT In article <1991Apr11.211336.19184@massey.ac.nz> news@massey.ac.nz (USENET News System) writes: | How do I write a macro to do this? | | In a file, delete the first 25 chars of every line. Another approach with GNU emacs is to use kill-rectangle. Many people seem to not know about the rectangle functions. The rectangle functions are safe even if the line doesn't contain 25 characters. Quoting from the fine help file: kill-rectangle: Delete rectangle with corners at point and mark; save as last killed one. Calling from program, supply two args START and END, buffer positions. But in programs you might prefer to use delete-extract-rectangle. yank-rectangle: Yank the last killed rectangle with upper left corner at point. open-rectangle: Blank out rectangle with corners at point and mark, shifting text right. The text previously in the region is not overwritten by the blanks, but insted winds up to the right of the rectangle. -- Michael Meissner email: meissner@osf.org phone: 617-621-8861 Open Software Foundation, 11 Cambridge Center, Cambridge, MA, 02142 Considering the flames and intolerance, shouldn't USENET be spelled ABUSENET?