[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: replacing endline
From: |
Harald Hanche-Olsen |
Subject: |
Re: replacing endline |
Date: |
Thu, 20 Apr 2006 21:25:44 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (berkeley-unix) |
+ 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
- replacing endline, sarah . dzion, 2006/04/19
- Re: replacing endline, Ye Wenbin, 2006/04/19
- Re: replacing endline, Katsumi Yamaoka, 2006/04/19
- Re: replacing endline, Fredrik Bulow, 2006/04/19
- Re: replacing endline, Fredrik Bulow, 2006/04/19
- Re: replacing endline, Fredrik Bulow, 2006/04/19
- Re: replacing endline, Thien-Thi Nguyen, 2006/04/20
- Re: replacing endline, Fredrik Bulow, 2006/04/20
- Re: replacing endline, Lennart Borgman, 2006/04/20
- Re: replacing endline, Eli Zaretskii, 2006/04/20
- Message not available
- Re: replacing endline,
Harald Hanche-Olsen <=
- Re: replacing endline, Lennart Borgman, 2006/04/20
- Re: replacing endline, Eli Zaretskii, 2006/04/21
- Message not available
- Re: replacing endline, Harald Hanche-Olsen, 2006/04/21
- Re: replacing endline, B. T. Raven, 2006/04/20
- Message not available
- Re: replacing endline, Thien-Thi Nguyen, 2006/04/20
Re: replacing endline, Peter Dyballa, 2006/04/20
Re: replacing endline, kgold, 2006/04/20