From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Xah Newsgroups: gmane.emacs.help Subject: Re: Using a newline character in the newstring in M-x replace-regexp Date: Thu, 14 Aug 2008 13:35:45 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1218746611 3754 80.91.229.12 (14 Aug 2008 20:43:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 14 Aug 2008 20:43:31 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Aug 14 22:44:23 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KTjg8-0001km-Jv for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2008 22:44:16 +0200 Original-Received: from localhost ([127.0.0.1]:55467 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KTjfC-0007PR-8Q for geh-help-gnu-emacs@m.gmane.org; Thu, 14 Aug 2008 16:43:18 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!n33g2000pri.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 26 Original-NNTP-Posting-Host: 24.6.97.120 Original-X-Trace: posting.google.com 1218746146 4989 127.0.0.1 (14 Aug 2008 20:35:46 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Thu, 14 Aug 2008 20:35:46 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: n33g2000pri.googlegroups.com; posting-host=24.6.97.120; posting-account=bRPKjQoAAACxZsR8_VPXCX27T2YcsyMA User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10_4_11; en) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.22, gzip(gfe), gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:161291 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:56635 Archived-At: On Aug 14, 12:31 pm, Corey Foote wrote: > Hi, > > I've got one more quick question for you guys. The string > I'd like to use as the newstring in M-x replace-regexp contains a few new= line > characters. Normally, I insert newlines by typing C-q C-j, but this doesn= 't > work when calling this function. How do you specify a newline character w= hen > making a call to M-x replace-regexp? It works for me and should work in any emacs 22. For interactive use, i think C-q C-j is actually the only way to insert newlines. If you are calling this function in elisp, you can use =E2=80=9C\n=E2=80=9D= . But literal line feed should also work... so i'm not sure what might be your problem? Xah =E2=88=91 http://xahlee.org/ =E2=98=84