[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace with CR
From: |
Pascal J. Bourguignon |
Subject: |
Re: Replace with CR |
Date: |
Sun, 05 Jul 2015 17:24:30 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
Andrea Venturoli <ml.diespammer@netfence.it> writes:
> Hello.
>
> I'm using emacs on several FreeBSD boxes (text or X version).
> For several years I've been able to replace any character with a
> newline, by doing (e.g. with ';'):
> M-x replace-string(enter);(enter)^Q(enter)(enter)
Only, there's no such "enter" thing. So you are a cold liar.
> The line
> a;b;c
> would become
> a
> b
> c
>
> Now the same procedure does not work anymore as the (enter)
> immediately after ^Q does not move to a newline, but enters ^M.
>
> I.e. what I get is "a^Mb^Mc".
There's a key labelled "Return" that enters a CARRIAGE RETURN ASCII
control code whose value is 13. This value can also be obtained with
Control and the 13th letter, M, hence the representation as ^M. If you
don't like CR, then don't use the RET key.
> How can I restore the previous behavior, or, failing that, replace
> something with a newline?
On unix, newline is represented by the ASCII code LINE FEED, value 10,
which can be entered using Control and the 10th letter, J.
Then type: C-q C-j
> I don't know when and why this stopped working.
It stopped working when you lost those neurons when you banged your head
on the floor. Leave backflips to professionnal acrobats, not for your
youtube channel.
--
__Pascal Bourguignon__ http://www.informatimago.com/
“The factory of the future will have only two employees, a man and a
dog. The man will be there to feed the dog. The dog will be there to
keep the man from touching the equipment.” -- Carl Bass CEO Autodesk
- Replace with CR, Andrea Venturoli, 2015/07/05
- Re: Replace with CR, tomas, 2015/07/05
- Re: Replace with CR,
Pascal J. Bourguignon <=
- Re: Replace with CR, tomas, 2015/07/05
- Re: Replace with CR, Ian Zimmerman, 2015/07/05
- Message not available
- Re: Replace with CR, Pascal J. Bourguignon, 2015/07/05
- Re: Replace with CR, Barry Margolin, 2015/07/05
- Re: Replace with CR, Óscar Fuentes, 2015/07/05
- Re: Replace with CR, Pascal J. Bourguignon, 2015/07/05
- Re: Replace with CR, Richard Wordingham, 2015/07/05