[users] "fill-paragraph"

2005-02-16 Thread David Welton
[ CCing a reply to me would be appreciated. Thanks! ] Hi, I have a bit of a problem. I've written a portion of a book in emacs, mostly because it's what I'm most comfortable working in, so I have a large quantity of ascii text, interspersed with examples - source code fragments. Emacs wraps lin

Re: [users] "fill-paragraph"

2005-02-16 Thread David Teague
uary 16, 2005 12:52 PM Subject: [users] "fill-paragraph" > [ CCing a reply to me would be appreciated. Thanks! ] > > Hi, > > I have a bit of a problem. I've written a portion of a book in emacs, > mostly because it's what I'm most comfortable working in

Re: [users] "fill-paragraph"

2005-02-17 Thread David Welton
On Wed, 16 Feb 2005 14:43:04 -0500, David Teague <[EMAIL PROTECTED]> wrote: > David Welton wrote: > > > [ need to remove empty paragraphs from portions of code and text] > > Daniel suggested > > Try the macro from: > http://www.oooforum.org/forum/viewtopic.phtml?t=6429&highlight= > It works gre

Re: [users] "fill-paragraph"

2005-02-17 Thread Anthony Chilco
Hi David, Very weird. You can search for row breaks (shift-enter), but you can't replace with them. This is from the regular expressions help page: \n Finds a hard row break that was inserted with Shift+Enter. To change row breaks into paragraph breaks, enter \n in the Search for and Replace w

Re: [users] "fill-paragraph"

2005-02-17 Thread David Welton
On Thu, 17 Feb 2005 10:40:17 -0500, Anthony Chilco <[EMAIL PROTECTED]> wrote: > Hi David, > Very weird. You can search for row breaks (shift-enter), but > you can't replace with them. This is from the regular > expressions help page: Yeah I had read that, but hoped that there was some way to get a

Re: [users] "fill-paragraph"

2005-02-17 Thread Anthony Chilco
Looking at the regular expressions, it get stranger and stranger. Someone else wanted to delete all lines starting with %. Regular expressions should do it with: ^%*$ ^% is a % at the start of a paragraph * is any number of characters $ a paragraph break It doesn't work. If I try just ^%*, only

Re: [users] "fill-paragraph"

2005-02-17 Thread Anthony Chilco
Hi David, Brute force method: I recorded a macro to find the next paragraph mark, then press shift-enter. I assigned it to a keystroke. Not pretty, but it works. Here's the macro: sub para2row rem -- rem define variables dim do

Re: [users] "fill-paragraph"

2005-02-17 Thread David Welton
On Thu, 17 Feb 2005 11:12:21 -0500, Anthony Chilco <[EMAIL PROTECTED]> wrote: > Looking at the regular expressions, it get stranger and > stranger. Someone else wanted to delete all lines starting > with %. Regular expressions should do it with: > > ^%*$ > > ^% is a % at the start of a paragraph

Re: [users] "fill-paragraph"

2005-02-17 Thread Anthony Chilco
I didn't read the help carefully on that one. %[:alnum:]*$ will do the job to get rid of the lines starting with %. No help for you, though. tc David Welton wrote: In normal regular expressions, * is any number _of the character it follows_, so M* would be zero or more consecutive M's, and %* wou

Re: [users] "fill-paragraph"

2005-02-18 Thread Ian Laurenson
Reply at bottom. On Fri, 2005-02-18 at 04:40, Anthony Chilco wrote: > Hi David, > Very weird. You can search for row breaks (shift-enter), but > you can't replace with them. This is from the regular > expressions help page: > > \n > Finds a hard row break that was inserted with Shift+Enter. >