From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: harven Newsgroups: gmane.emacs.help Subject: Re: Using a newline character in the newstring in M-x replace-regexp Date: Sat, 16 Aug 2008 07:00:57 -0700 (PDT) Organization: http://groups.google.com Message-ID: <804f53f5-8387-4b20-a4d5-2a2b4708d529@k30g2000hse.googlegroups.com> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1218897722 26365 80.91.229.12 (16 Aug 2008 14:42:02 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 16 Aug 2008 14:42:02 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Aug 16 16:42:55 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 1KUMzW-0004mR-Pv for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Aug 2008 16:42:54 +0200 Original-Received: from localhost ([127.0.0.1]:60781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KUMya-0004BE-25 for geh-help-gnu-emacs@m.gmane.org; Sat, 16 Aug 2008 10:41:56 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!postnews.google.com!k30g2000hse.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 11 Original-NNTP-Posting-Host: 82.240.200.149 Original-X-Trace: posting.google.com 1218895258 16373 127.0.0.1 (16 Aug 2008 14:00:58 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Sat, 16 Aug 2008 14:00:58 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: k30g2000hse.googlegroups.com; posting-host=82.240.200.149; posting-account=hanW0AoAAADuR-PIr5jGeb298Y3jGR7p User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.4; en-US; rv:1.9.0.1) Gecko/2008070206 Firefox/3.0.1,gzip(gfe),gzip(gfe) Original-Xref: news.stanford.edu gnu.emacs.help:161367 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:56713 Archived-At: > 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. C-o or C-012 RET also work for a query-replace. C-o does not work by default for an incremental search. The following code adds this shortcut to the incremental commands. (define-key isearch-mode-map "\C-o" (lambda () (interactive) (isearch-process-search-char ?\n)))