From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: dkcombs@panix.com (David Combs) Newsgroups: gmane.emacs.help Subject: Re: Using a newline character in the newstring in M-x replace-regexp Date: Thu, 11 Sep 2008 01:52:56 +0000 (UTC) Organization: Public Access Networks Corp. Message-ID: References: <804f53f5-8387-4b20-a4d5-2a2b4708d529@k30g2000hse.googlegroups.com> NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1221100850 27999 80.91.229.12 (11 Sep 2008 02:40:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Sep 2008 02:40:50 +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 Sep 11 04:41:46 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 1Kdc7q-000641-6L for geh-help-gnu-emacs@m.gmane.org; Thu, 11 Sep 2008 04:41:42 +0200 Original-Received: from localhost ([127.0.0.1]:44278 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Kdc6p-0007Im-K6 for geh-help-gnu-emacs@m.gmane.org; Wed, 10 Sep 2008 22:40:39 -0400 Original-Path: news.stanford.edu!newsfeed.stanford.edu!panix!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 38 Original-NNTP-Posting-Host: panix1.panix.com Original-X-Trace: reader1.panix.com 1221097976 23266 166.84.1.1 (11 Sep 2008 01:52:56 GMT) Original-X-Complaints-To: abuse@panix.com Original-NNTP-Posting-Date: Thu, 11 Sep 2008 01:52:56 +0000 (UTC) X-Newsreader: trn 4.0-test76 (Apr 2, 2001) Original-Xref: news.stanford.edu gnu.emacs.help:162064 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:57404 Archived-At: In article <804f53f5-8387-4b20-a4d5-2a2b4708d529@k30g2000hse.googlegroups.com>, harven wrote: > >> 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))) Looks nifty -- but what does it do? 1: what's the purpose of defining C-o? 2: what does that function/lambda-expr actually *do* when it gets called> (like, how does it get a newline inserted?) Unfortunately: | isearch-process-search-char is a compiled Lisp function in `isearch'. | (isearch-process-search-char CHAR) | | Not documented. | | [back] Thanks, David