From: Harald Hanche-Olsen <hanche@math.ntnu.no>
Subject: Re: replacing endline
Date: Thu, 20 Apr 2006 21:25:44 +0200 [thread overview]
Message-ID: <pcoirp4m4lj.fsf@shuttle.math.ntnu.no> (raw)
In-Reply-To: mailman.650.1145549499.9609.help-gnu-emacs@gnu.org
+ Lennart Borgman <lennart.borgman.073@student.lu.se>:
| 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 <URL:http://www.math.ntnu.no/~hanche/>
- It is undesirable to believe a proposition
when there is no ground whatsoever for supposing it is true.
-- Bertrand Russell
next prev parent reply other threads:[~2006-04-20 19:25 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-20 0:18 replacing endline sarah.dzion
2006-04-20 1:15 ` Katsumi Yamaoka
2006-04-20 1:17 ` Ye Wenbin
2006-04-20 1:22 ` Fredrik Bulow
2006-04-20 1:44 ` Fredrik Bulow
2006-04-20 1:56 ` Fredrik Bulow
2006-04-20 6:32 ` Thien-Thi Nguyen
2006-04-20 14:43 ` Fredrik Bulow
2006-04-20 16:11 ` Lennart Borgman
2006-04-20 18:16 ` Eli Zaretskii
2006-04-20 23:38 ` B. T. Raven
[not found] ` <mailman.650.1145549499.9609.help-gnu-emacs@gnu.org>
2006-04-20 19:25 ` Harald Hanche-Olsen [this message]
2006-04-20 22:19 ` Lennart Borgman
2006-04-21 7:38 ` Eli Zaretskii
[not found] ` <mailman.671.1145571606.9609.help-gnu-emacs@gnu.org>
2006-04-21 6:52 ` Harald Hanche-Olsen
2006-04-21 0:53 ` Thien-Thi Nguyen
2006-04-20 10:21 ` Peter Dyballa
2006-04-20 18:54 ` kgold
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=pcoirp4m4lj.fsf@shuttle.math.ntnu.no \
--to=hanche@math.ntnu.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).