emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Warning (initialization): An error occurred while loading /Users/<user>/.emacs
@ 2012-10-10  6:45 Chris Henderson
  2012-10-10  6:58 ` Sebastien Vauban
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Henderson @ 2012-10-10  6:45 UTC (permalink / raw)
  To: emacs-orgmode

I am getting this error when I add the following line to .emacs file:

Warning (initialization): An error occurred while loading
`/Users/<user>/.emacs':

Symbol's value as variable is void: org-directory
To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the `--debug-init' option to view a complete error backtrace.

This is the line:

(setq org-default-notes-file (concat org-directory "~/org/note.org"))
     (define-key global-map "\C-cc" 'org-capture)

The directory ~/org and the file note.org exist.

M-x org-version: Org-mode version 7.8.11
M-x emacs-version: GNU Emacs 24.2.1 (x86_64-apple-darwin12.1.0) of 2012-09-06

Here is the orgmode related snippet of my .emacs file:

;; orgmode
;; The following lines are always needed.  Choose your own keys.
     (add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
     (add-hook 'org-mode-hook 'turn-on-font-lock) ; not needed when
global-font-lock-mode is on
     (global-set-key "\C-cl" 'org-store-link)
     (global-set-key "\C-ca" 'org-agenda)
     (global-set-key "\C-cb" 'org-iswitchb)

;; GTD org-mode Todo time
(setq org-log-done 'time)
(setq org-log-done 'note)

;;
(setq org-tag-alist '(("@computer" . ?c) ("@Errands" . ?e) ("@work" .
?w) ("@calls" . ?a)("@Int\
ernet" . ?i) ("@waitingfor" . ?w)))

(setq org-default-notes-file (concat org-directory "~/org/note.org"))
     (define-key global-map "\C-cc" 'org-capture)

(setq org-todo-keywords
            '((sequence "TODO(t)" "|" "DONE(d)")
              (sequence "|" "CANCELED(c)")))

Thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Warning (initialization): An error occurred while loading /Users/<user>/.emacs
  2012-10-10  6:45 Warning (initialization): An error occurred while loading /Users/<user>/.emacs Chris Henderson
@ 2012-10-10  6:58 ` Sebastien Vauban
  2012-10-10  7:06   ` Chris Henderson
  0 siblings, 1 reply; 3+ messages in thread
From: Sebastien Vauban @ 2012-10-10  6:58 UTC (permalink / raw)
  To: emacs-orgmode-mXXj517/zsQ

Hi Chris,

Chris Henderson wrote:
> I am getting this error when I add the following line to .emacs file:
>
> Warning (initialization): An error occurred while loading
> `/Users/<user>/.emacs':
>
> Symbol's value as variable is void: org-directory

It says it all: you're using an undefined variable (org-directory).

> (setq org-default-notes-file (concat org-directory "~/org/note.org"))

Adapt your code as this:

--8<---------------cut here---------------start------------->8---
  (setq org-directory "~/org/")
  (setq org-default-notes-file (concat org-directory "note.org"))
--8<---------------cut here---------------end--------------->8---

Best regards,
  Seb

-- 
Sebastien Vauban

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Warning (initialization): An error occurred while loading /Users/<user>/.emacs
  2012-10-10  6:58 ` Sebastien Vauban
@ 2012-10-10  7:06   ` Chris Henderson
  0 siblings, 0 replies; 3+ messages in thread
From: Chris Henderson @ 2012-10-10  7:06 UTC (permalink / raw)
  To: Sebastien Vauban; +Cc: emacs-orgmode

On Wed, Oct 10, 2012 at 5:58 PM, Sebastien Vauban
<wxhgmqzgwmuf@spammotel.com> wrote:
> Hi Chris,
>
> Chris Henderson wrote:
>> I am getting this error when I add the following line to .emacs file:
>>
>> Warning (initialization): An error occurred while loading
>> `/Users/<user>/.emacs':
>>
>> Symbol's value as variable is void: org-directory
>
> It says it all: you're using an undefined variable (org-directory).
>
>> (setq org-default-notes-file (concat org-directory "~/org/note.org"))
>
> Adapt your code as this:
>
> --8<---------------cut here---------------start------------->8---
>   (setq org-directory "~/org/")
>   (setq org-default-notes-file (concat org-directory "note.org"))
> --8<---------------cut here---------------end--------------->8---

Thanks. It works.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-10-10  7:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-10  6:45 Warning (initialization): An error occurred while loading /Users/<user>/.emacs Chris Henderson
2012-10-10  6:58 ` Sebastien Vauban
2012-10-10  7:06   ` Chris Henderson

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).