1

I'm new to *nix, and have installed Ubuntu as it seems to be a pretty friendly distro. Lately, meaning the past two days, I have been trying to learn and play with emacs. However, I have gotten to the point that I want to try customizing it and learning new things. I have tried to configure it to set the mode to org-mode whenever I make/load a .org file using this code:

(require 'org-install)
(add-to-list 'auto-mode-alist '("\\.org$" . org-mode))
(define-key global-map "\C-cl" 'org-store-link)
(define-key global-map "\C-ca" 'org-agenda)
(setq org-log-done t)

I was told that this goes into my .emacs file, under my home directory. I have attempted to find this file, using ls -a of course, and to create it, and every other variation of getting this .emacs file since it wasn't there when I looked for it. However .emacs.d was there, with some random files that were not in any lisp language, so I assumed they were not what I wanted. Any help would be greatly appreciated.

5

There isn't a default .emacs file. You will have to create it. Files with names that start with a dot (.) are hidden by default.

To create/edit the file in emacs open ~/.emacs either as emacs ~/.emacs or from within emacs. The directory .emacs.d is usually contains the autosave list and other working files.

3

Your .emacs wont' exist until you create it. Within Emacs, open ~/.emacs. Emacs will also try ~/.emacs.d/init.el if it can't find ~/.emacs.

Note that you don't need the first two lines (org-install and auto-mode-alist): they're only required if you install org-mode independently from Emacs, but org-mode ships with Emacs these days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.