From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Harald Hanche-Olsen Newsgroups: gmane.emacs.help Subject: Re: replacing endline Date: Thu, 20 Apr 2006 21:25:44 +0200 Organization: Norwegian university of science and technology Message-ID: References: <1145492327.354125.133060@j33g2000cwa.googlegroups.com> <87lku1t3fn.fsf@gmail.com> <7efyk8pxjz.fsf@ada2.unipv.it> <87acagux25.fsf@gmail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1145562101 19980 80.91.229.2 (20 Apr 2006 19:41:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 20 Apr 2006 19:41:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Apr 20 21:41:36 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 1FWf1x-00026K-KY for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Apr 2006 21:41:33 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1FWf1x-0002yc-5e for geh-help-gnu-emacs@m.gmane.org; Thu, 20 Apr 2006 15:41:33 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.gamma.ru!Gamma.RU!newsfeed.cw.net!cw.net!news-FFM2.ecrc.de!uio.no!ntnu.no!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: fiinbeck.math.ntnu.no Original-X-Trace: orkan.itea.ntnu.no 1145560711 23799 129.241.15.140 (20 Apr 2006 19:18:31 GMT) Original-X-Complaints-To: usenet@itea.ntnu.no Original-NNTP-Posting-Date: Thu, 20 Apr 2006 19:18:31 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) Cancel-Lock: sha1:RxDXZ3pe/7j4jhzUwxVt1pEZfeA= Original-Xref: shelby.stanford.edu gnu.emacs.help:138904 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:34522 Archived-At: + Lennart Borgman : | Fredrik Bulow wrote: |> So once again, what is the good reason that (query-replace "\n" "#") |> behave differenty than calling the same function with its keybinding |> and providing it interactively with the same arguments? |> | I also have difficulties understanding the prompting in cases like | this. I have nothing against the "C-q C-j" solution but it is not | the first I think of. Is there any reason not to just convert the | input as needed so that it in the interactive case works as Fredrik | and I expect it to do? Uh. You would like to be able to type M-x query-replace RET \n RET # RET and have that \n behave like it was typed between quotes in a lisp expression? That, to me, is very unintuitive behaviour. The \n syntax is a special escape for the convenience of programmers. It should not be allowed to pollute interactive commands. The difficulty here comes from the very fact that entering a string in a program, and supplying one to an interactive command, are two very different things, and they need different escape conventions to enter special characters like the newline. Once you understand that, the difficulty should indeed evaporate. You might of course disagree with the choice of escape conventions, but I think it would confuse people more to use the backslash as an escape character in the interactive setting. -- * Harald Hanche-Olsen - It is undesirable to believe a proposition when there is no ground whatsoever for supposing it is true. -- Bertrand Russell