The easiest way to learn emacs is to start it up and go through the on-line tutorial. Now maybe my git commit's will stop whining about CRs. To use emacs on a file, type emacs filename If the file named filename exists, then the first screen's worth of the file is displayed if it doesn't exist, a help message is displayed. Ctrl + X, then Ctrl + D: Open a Dired Buffer. (If a file is created in 2001, and you modified it today, the. This effectively destroys the creation date of your file. Ctrl + X, then S: Save all files in buffer. Put this in your Emacs Init File: (setq backup-by-copying t) Explanation: when emacs does a backup, by default it renames the original file into the backup file name, then create a new file and insert new file content into it. ![]() Ctrl + X, then Ctrl + S: Save the current file in the buffer. First, I checked documentation on each variable and function in user181548s answer, by (first cutting and pasting into Emacs, then) putting cursor over each, and typing C-h v RET and C-h f RET respectively. File Manipulation: Ctrl + X, then Ctrl + F: Open a File Buffer. This suggested that I might only need (prefer-coding-system 'utf-8-unix)Įxperimenting with the other lines didn't seem to change pre-existing buffer encodings (typing C-h C RET RET to check ( describe-coding-system) and g each time to refresh), so I omitted the other lines and made a key-binding to quickly change any old files that were still DOS, that is, (defun set-bfr-to-8-unx ()įor the curious, to discover the 3rd and 4th line of above function, (set-buffer-file-coding-system 'utf-8-unix), I used C-x RET f RET to manually change the current buffer's encoding, then M-x command-history RET to see how those keys translate to code. Alt + X, then customize Open the built-in customization menu. You might wish to check out chapter G.5 HOME and Startup Directories on MS-Windows of the Emacs Manual, which goes over all of these and related details. ![]() I up-voted question and answer, but spent a couple minutes possibly improving on the info, so I'll add it.įirst, I checked documentation on each variable and function in user181548's answer, by (first cutting and pasting into Emacs, then) putting cursor over each, and typing C-h v RET and C-h f RET respectively. As others have mentioned, setting the HOME environment variable to your Documents folder will save you that step because Emacs will start you out in that folder.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |