* How to replace a character by an unprintable character ? @ 2005-01-24 21:00 J?r?me RADIX 2005-01-24 21:07 ` Jesper Harder 2005-01-24 21:11 ` Drew Adams 0 siblings, 2 replies; 5+ messages in thread From: J?r?me RADIX @ 2005-01-24 21:00 UTC (permalink / raw) Hello, Using M-% or C-M-% how do you replace each `;' in a;b;c;d by a carriage return (<RET>) to obtain : a b c d The FAQ is not very explicit on this : http://www.gnu.org/software/emacs/emacs-faq.text Question 5.9 It only tells how to *search* for unprintable characters but not how to replace a character by an unprintable character. Emacs info file is not clear on this either ( C-h C-k C-M-% ) I've tried several things out in the replacement string without success : \n C-q <RET> [\n] $ ?\n none of them work. If you have an idea... Thanks, Jérôme. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to replace a character by an unprintable character ? 2005-01-24 21:00 How to replace a character by an unprintable character ? J?r?me RADIX @ 2005-01-24 21:07 ` Jesper Harder 2005-01-24 22:47 ` Jérôme Radix 2005-01-24 21:11 ` Drew Adams 1 sibling, 1 reply; 5+ messages in thread From: Jesper Harder @ 2005-01-24 21:07 UTC (permalink / raw) jradix@bigfoot.com (J?r?me RADIX) writes: > Using M-% or C-M-% how do you replace each `;' in > > a;b;c;d > > by a carriage return (<RET>) to obtain : Type `C-q C-j' as the replacement string. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to replace a character by an unprintable character ? 2005-01-24 21:07 ` Jesper Harder @ 2005-01-24 22:47 ` Jérôme Radix 0 siblings, 0 replies; 5+ messages in thread From: Jérôme Radix @ 2005-01-24 22:47 UTC (permalink / raw) Cc: help-gnu-emacs Jesper Harder a écrit : > Type `C-q C-j' as the replacement string. It works !!! Thanks a lot Jesper ! ^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: How to replace a character by an unprintable character ? 2005-01-24 21:00 How to replace a character by an unprintable character ? J?r?me RADIX 2005-01-24 21:07 ` Jesper Harder @ 2005-01-24 21:11 ` Drew Adams 2005-01-24 22:43 ` Jérôme Radix 1 sibling, 1 reply; 5+ messages in thread From: Drew Adams @ 2005-01-24 21:11 UTC (permalink / raw) Using M-% or C-M-% how do you replace each `;' in a;b;c;d by a carriage return (<RET>) I've tried several things out in the replacement string without success : C-q <RET> `C-q C-m' (C-m is RETURN.) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to replace a character by an unprintable character ? 2005-01-24 21:11 ` Drew Adams @ 2005-01-24 22:43 ` Jérôme Radix 0 siblings, 0 replies; 5+ messages in thread From: Jérôme Radix @ 2005-01-24 22:43 UTC (permalink / raw) Cc: help-gnu-emacs Thanks Drew for your answer. I've tried that too : C-q C-m writes ^M in the replacement string, and when doing the replacement, I have the following a^Mb^Mc^Md It seems it comes from the different line separation conventions (unix dos, mac...) I can't figure out how to get a b c d without closing/reopening the file to force emacs to guess in which line separation convention to run (I don't know of a way to change it with a single command...) I keep searching... Drew Adams a écrit : > > Using M-% or C-M-% how do you replace each `;' in > a;b;c;d by a carriage return (<RET>) > I've tried several things out in the replacement string without > success : > > C-q <RET> > > > `C-q C-m' (C-m is RETURN.) > > ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-01-24 22:47 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2005-01-24 21:00 How to replace a character by an unprintable character ? J?r?me RADIX 2005-01-24 21:07 ` Jesper Harder 2005-01-24 22:47 ` Jérôme Radix 2005-01-24 21:11 ` Drew Adams 2005-01-24 22:43 ` Jérôme Radix
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).