From owner-freebsd-questions@FreeBSD.ORG Tue Nov 24 21:19:47 2009 Return-Path: Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 88BA61065679 for ; Tue, 24 Nov 2009 21:19:47 +0000 (UTC) (envelope-from kline@thought.org) Received: from aristotle.thought.org (aristotle.thought.org [209.180.213.210]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7568FC0C for ; Tue, 24 Nov 2009 21:19:46 +0000 (UTC) Received: from thought.org (tao.thought.org [10.47.0.250]) (authenticated bits=0) by aristotle.thought.org (8.14.2/8.14.2) with ESMTP id nAOLJNl3020276 for ; Tue, 24 Nov 2009 13:19:23 -0800 (PST) (envelope-from kline@thought.org) Received: by thought.org (nbSMTP-1.00) for uid 1002 kline@thought.org; Tue, 24 Nov 2009 13:19:42 -0800 (PST) Date: Tue, 24 Nov 2009 13:19:42 -0800 From: Gary Kline To: FreeBSD Mailing List Message-ID: <20091124211942.GF54631@thought.org> References: <20091124002920.GA51110@thought.org> <20091124003652.GH11723@hal.rescomp.berkeley.edu> <20091124013934.GA51279@thought.org> <20091124200741.GA1799@guilt.hydra> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20091124200741.GA1799@guilt.hydra> User-Agent: Mutt/1.4.2.3i X-Organization: Thought Unlimited. Public service Unix since 1986. X-Of_Interest: With 23 years of service to the Unix community. X-Spam-Status: No, score=-4.4 required=3.6 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on aristotle.thought.org Cc: Subject: Re: need a newline between paragraphs.... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Nov 2009 21:19:47 -0000 On Tue, Nov 24, 2009 at 01:07:41PM -0700, Chad Perrin wrote: > On Mon, Nov 23, 2009 at 05:39:35PM -0800, Gary Kline wrote: > > > > PS: is there any one-liner to add back one newline between > > paragraphs? > > As someone else said -- that depends on how you define a "paragraph" in > the file. If any time there's a newline you've got a new paragraph, you > can just use a simple substitution regex to replace all instances of one > newline with two newlines. If some of your paragraphs are already > separated by two newlines, you could just use \n+ in the matching part of > your substitution regex to indicate that you want any instance of one or > more newlines in succession to be replaced with exactly two newlines -- > if that doesn't screw up some other formatting you have in the file. > > In order to answer this question properly, we'd need to know more about > how you define "paragraph" in this context, and whether there are special > cases of non-paragraph formatting that might cause conflicts with > paragraph formatting while doing a substitution. > precisely. in this case, every paragraph that is not on a newline wraps. so anything that has an EOL is a new paragraph. there are a few places that require different formatting; these are easily re-done thanks to OOo! > -- > Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ] -- Gary Kline kline@thought.org http://www.thought.org Public Service Unix http://jottings.thought.org http://transfinite.thought.org The 7.31a release of Jottings: http://jottings.thought.org/index.php