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.app "incompatable" with Emacs
4 messages · Richard M. Heiberger, knussear, Fredrik Lundgren
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: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf Of Fredrik Lundgren Sent: Friday, March 21, 2008 04:49 AM To: r-help at 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 at 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.
You can use TextWrangler to quickly change the eol characters used. Ken
Fredrik Lundgren-2 wrote:
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 at 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.
View this message in context: http://www.nabble.com/R.app-%22incompatable%22-with-Emacs-tp16195484p16197709.html Sent from the R help mailing list archive at Nabble.com.
Thanks a lot , Both suggestions by Heiberger and knussear fixed the problem with ^M! However I would also need a method to tweak the default size of the editor window in R.app . After all, there "must" be a way... 21 mar 2008 kl. 13.50 skrev Richard M. Heiberger:
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: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org ] On Behalf Of Fredrik Lundgren Sent: Friday, March 21, 2008 04:49 AM To: r-help at 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 at 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.
######################## Fredrik Lundgren fredrik.bg.lundgren at gmail.com Obs! Ny adress och mail Engelbrektsgatan 31 582 21 Link?ping 013 - 47 30 117 0706 - 86 39 29 Sommarhus: Ljungn?s 158 380 30 Rockneby 0480 - 650 98