From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neon Absentius Newsgroups: gmane.emacs.help Subject: Re: repexp to collapse multiple blank lines into one Date: Sun, 9 Oct 2005 13:44:54 +0000 Message-ID: <20051009134454.GR29712@SDF.LONESTAR.ORG> References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1128866315 31319 80.91.229.2 (9 Oct 2005 13:58:35 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 9 Oct 2005 13:58:35 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun Oct 09 15:58:26 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EObgC-0005g1-4m for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Oct 2005 15:57:32 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EObgA-0000T0-3V for geh-help-gnu-emacs@m.gmane.org; Sun, 09 Oct 2005 09:57:31 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EObY0-0005kA-KQ for help-gnu-emacs@gnu.org; Sun, 09 Oct 2005 09:49:05 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EObUd-0004hj-BV for help-gnu-emacs@gnu.org; Sun, 09 Oct 2005 09:45:38 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EObUZ-0004hV-Bv for help-gnu-emacs@gnu.org; Sun, 09 Oct 2005 09:45:32 -0400 Original-Received: from [192.94.73.21] (helo=sdf.lonestar.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EObUS-000154-LC for help-gnu-emacs@gnu.org; Sun, 09 Oct 2005 09:45:25 -0400 Original-Received: from sdf.lonestar.org (IDENT:absent@ukato.freeshell.org [192.94.73.7]) by sdf.lonestar.org (8.13.1/8.12.10) with ESMTP id j99Ditoh020015 for ; Sun, 9 Oct 2005 13:44:55 GMT Original-Received: (from absent@localhost) by sdf.lonestar.org (8.13.1/8.12.8/Submit) id j99Ditxf009725 for help-gnu-emacs@gnu.org; Sun, 9 Oct 2005 13:44:55 GMT Original-To: help-gnu-emacs@gnu.org Mail-Followup-To: Neon Absentius , help-gnu-emacs@gnu.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:30080 Archived-At: On Sun, Oct 09, 2005 at 12:27:07PM +0000, B. T. Raven wrote: > Is there a way to use M-C-% to flush extra blank lines from a buffer. > Something like: > Query replace regexp: ^$+ [which of course doesn't work, presumably > because $ has to be last] > with: C-j > The following seems to work C-M-% \(^C-qC-j\)+ RET \1 RET Provided of course that your lines are really blank and do not contain any spaces, tabs etc. > Thanks, > > Ed > -- There is no national science just as there is no national multiplication table; what is national is no longer science. -- Anton Checov