Emacs normally recognizes line endings and opens the file correctly. Therefore the first place to look is in the file itself. When some of the lines have ^M and others do not, then emacs assumes you have LF-only line endings and displays the ^M character.
The preventive action is to correct the original writing of the file. The corrective action is to remove all the ^M characters with, for example M-x replace-string RET C-q C-m RET RET and save the repaired file. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Fredrik Lundgren Sent: Friday, March 21, 2008 04:49 AM To: r-help@r-project.org Subject: [R] R.app "incompatable" with Emacs Dear R-users on the Mac, With Leopard 10.5.2, R.app GUI 1.23, and Emacs 22.1.1 (i386-apple- darwin9, Carbon Version 1.6.0) I've got the following problem. When editing foo.R in R.app I get myriads of ^M (end-of-line or CR?) in the file when opened with Emacs. This isn't trivial to me as I shift between R.app and Emacs/ESS. Any simple tweak? Fredrik ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.