From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Thomas L Roche Newsgroups: gmane.emacs.help Subject: Re: silly regexp-replace question: how to delete empty lines Date: Wed, 3 Mar 2004 23:07:37 -0500 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <200403040341.i243ftF7381474@e1.ny.us.ibm.com> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-Trace: sea.gmane.org 1078600480 599 80.91.224.253 (6 Mar 2004 19:14:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 6 Mar 2004 19:14:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Mar 06 20:14:29 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AzhFl-0001I2-00 for ; Sat, 06 Mar 2004 20:14:29 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1AzhFT-0006fY-RH for geh-help-gnu-emacs@m.gmane.org; Sat, 06 Mar 2004 14:14:11 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Ayk9n-0000a3-Dv for help-gnu-emacs@gnu.org; Wed, 03 Mar 2004 23:08:23 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Ayk9C-0000Gi-6P for help-gnu-emacs@gnu.org; Wed, 03 Mar 2004 23:08:18 -0500 Original-Received: from [32.97.110.130] (helo=e32.co.us.ibm.com) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.30) id 1Ayk9B-0000GS-Q7 for help-gnu-emacs@gnu.org; Wed, 03 Mar 2004 23:07:45 -0500 Original-Received: from westrelay04.boulder.ibm.com (westrelay04.boulder.ibm.com [9.17.193.32]) by e32.co.us.ibm.com (8.12.10/8.12.2) with ESMTP id i2447e0Y663966 for ; Wed, 3 Mar 2004 23:07:40 -0500 Original-Received: from d03nm120.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.193.82]) by westrelay04.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i2447c2A131306 for ; Wed, 3 Mar 2004 21:07:40 -0700 In-Reply-To: <200403040341.i243ftF7381474@e1.ny.us.ibm.com> Original-To: help-gnu-emacs@gnu.org X-Mailer: Lotus Notes Release 6.0.2CF1 June 9, 2003 X-MIMETrack: Serialize by Router on D03NM120/03/M/IBM(Release 6.0.2CF2|July 23, 2003) at 03/03/2004 21:07:40, Serialize complete at 03/03/2004 21:07:40 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:17435 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:17435 "leo" Wed, 3 Mar 2004 12:11:08 +1100 > in a buffer like > text is here > and here and > here > further text is here > an the endtext > i want to delete the two empty lines by an regexp-replace. Umm ... do you know that you don't need a regexp? You can just do > M-x replace-string > C-q C-j C-q C-j > C-q C-j That being said, > M-x replace-regexp > C-q C-j C-q C-j > C-q C-j also works ... but you're not really replacing regexp, just a fixed string.