Re: [Mac-emacs-users] Possible FAQ: '\n' vs. '\r' in 21.1 for OS X
Brought to you by:
akochoi
|
From: Andrew C. <ak...@sh...> - 2002-03-28 15:11:13
|
> Hi, > I'm new to this list, and pardon me if this has already been > discussed. I couldn't find any information about this in the > archives... > > I must be missing something obvious, but I'm having problems with > the files written by emacs 21.1 for OS X. > > Since OS X is a Unix-like system, I would really like to have the > files I create with emacs do newlines like Unix does it: with a > '\n'. > > I've been looking through the documentation, and I can't seem to > find anything that documents how I can make emacs write the '\n' > instead of the '\r'. > > Help! I'm so close to being able to use my favorite editor, but to > constantly convert '\r' to '\n' is getting frustrating. > > Running the emacs that comes with OS X (the one that only runs in a > terminal) generates files with '\n', but the 21.1 version generates > '\r's... > > Any help is greatly appreciated. > > Thanks, > Per Hi Per, End-of-line styles are documented in the `Coding System' section of the manual. Basically if you haven't changed its settings, files created by Emacs *will* use Unix style end-of-lines. Also Emacs will automatically preserve the end-of-line styles of existing files when it is used to edit them. To change from one end-of-line style to another, after visiting the file, type `C-x RET f', then `undecided-unix', `undecided-mac', or `undecided-dos', then save the file. Andrew. |