unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* unwrapping lines
@ 2007-04-18  5:34 Girish Kulkarni
  2007-04-18  5:45 ` fang.lungang
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Girish Kulkarni @ 2007-04-18  5:34 UTC (permalink / raw)
  To: help-gnu-emacs

Hello,

I'm stuck with a curious problem and wonder if I can solve it in
Emacs. I have a data file produced by Mathematica that lists four
quantities. High precision means these numbers tend to be long so
Mathematica often has to truncate lines. It does so by putting in a
backslash and continuing on the next line. For example:

0.17000000000000004 0.10500954682364379 0.20481153067700028 0.309821\
0775006441
0.18000000000000005 0.12459404398470066 0.22952096247531506 0.354115\
0064600157
0.19000000000000006 0.14646262095984275 0.25562017297341694 0.402082\
7939332597

I need to use these data in a Fortran 77 program. But Fortran has
problems reading numbers in that format. In Emacs I can remove that
backslash easily but that doesn't solve my problem. (Fortran then
treats the continued digits as a fifth quantity. This "fifth quantity"
is sometimes present and sometimes absent.)

Is there any way in which I can "unwrap" the lines so that all four
quantities appear in the same line? For example, I want the above to
look like:

0.17000000000000004 0.10500954682364379 0.20481153067700028
0.3098210775006441
0.18000000000000005 0.12459404398470066 0.22952096247531506
0.3541150064600157
0.19000000000000006 0.14646262095984275 0.25562017297341694
0.4020827939332597

I've tried using M-x replace-string with C-q C-d C-q C-d and C-d C-d
to replace "\" with two DELETE characters. Didn't work. Could somebody
help?

Regards,
Girish

--
Girish Kulkarni
Allahabad, India

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-18  6:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-18  5:34 unwrapping lines Girish Kulkarni
2007-04-18  5:45 ` fang.lungang
2007-04-18  5:46 ` Livin Stephen Sharma
     [not found] ` <mailman.2193.1176875480.7795.help-gnu-emacs@gnu.org>
2007-04-18  6:27   ` Girish Kulkarni

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).