From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fredrik Bulow Newsgroups: gmane.emacs.help Subject: Re: replacing endline Date: Thu, 20 Apr 2006 11:44:51 +1000 Message-ID: <87slo9t3zg.fsf@gmail.com> References: <1145492327.354125.133060@j33g2000cwa.googlegroups.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145500855 16375 80.91.229.2 (20 Apr 2006 02:40:55 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Apr 2006 02:40:55 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 20 04:40:52 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1FWP66-00063C-Tr for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Apr 2006 04:40:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWP63-0000Pn-9d for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Apr 2006 22:40:43 -0400 Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:MU2XZXix1IJcwQSSOjMx+uFCt+8= Original-NNTP-Posting-Host: 220.245.217.246 X-Original-NNTP-Posting-Host: 220.245.217.246 Original-X-Trace: dnews.tpgi.com.au!tpg.com.au 1145497492 220.245.217.246 (20 Apr 2006 11:44:52 +1100) Original-Lines: 34 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!syros.belnet.be!news.belnet.be!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!solnet.ch!solnet.ch!nntp.gblx.net!nntp3.phx1!dnews.tpgi.com.au!tpg.com.au!not-for-mail Original-Xref: shelby.stanford.edu gnu.emacs.help:138880 Original-To: help-gnu-emacs@gnu.org 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:34498 Archived-At: sarah.dzion@gmail.com writes: > Hi I want to convert : > 72 > 17 > 18 > 19 > 20 > 21 > 22 > 23 > 24 > 25 > > > to > > 72#17#18#19#20#21#22#23#24#25 > > how do I do this using replace-string (or something else in emacs)? > basically I do not know how to specify endline in emacs. > > Appreciate the help! > Thanks! > -A A more elegant and less general way would of course be to use regexps for this. For some reason 'query-replace-regexp' seems to choke on expressions like \n or $^ when I try it. In fact it can't even convert #'s to newlines. Regexps really ougth to do this but it doesn't work for me. :-/ /Fredrik