I was trying to use the capture as is explained in org-manual p 74. This is the .emacs file for org mode.
(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)
(setq org-default-notes-file (concat org-directory "~/notes.org")) <-- error
(define-key global-map "\C-cc" 'org-capture)
But I get this error. What might be wrong?
Symbol's value as variable is void: org-directory
After Dave's answer, I modified the code, and it seems to work fine. But the other problem that I found was C-c c gives me this error.
Symbol's function definition is void : org-capture
First of all, make sure you're using org-mode 6.36 or later. (Earlier versions use remember.el which has a different setup.)
You're using a symbol that's not defined, org-directory
.
Try using:
(setq org-default-notes-file (expand-file-name "~/notes.org"))
Followup: To load a recent org-mode package:
(add-to-list 'load-path "/my/home/emacs.d/org-7.01h/lisp")
(require 'org-install)
(require 'org) ;; maybe this line is redundant
Note that as packaged, the org-mode lisp files are in the lisp sub-directory.
I know this question has been answered, but I would like to leave a more thorough answer for those people who haven't been successful. I just went through the motions and I am going to make a list of each step below.
# Name of your emacs binary EMACS = emacs
# Where local software is found prefix = /Users/Username/Scripts
# Where local lisp files go. lispdir= $(prefix)/emacs/lisp/org
# Where local data files go. datadir = $(prefix)/emacs/etc/org
# Where info files go. infodir = $(prefix)/emacs/info
Edit your .emacs file and paste in there two new paths (if not already there). The first one is for the lisp folder for any .el files you may have and the second one is there because I contained the org files in an org folder, which is a subfolder of lisp. Unfortunately, the "load-path" is not smart enough to detect subfolders, therefore you must set each folder explicitly.
HINT:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With