emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] org-agenda-files


From: Paul Jewell
Subject: [O] org-agenda-files
Date: Tue, 6 Oct 2015 21:34:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0

Good evening!

I am starting to use a more complex setup for org-mode, having left it
alone for more than a year. The setup I am using is documented here:
http://doc.norang.ca/org-mode.html

I am having a problem with setting up the org-agenda-files variable in
the startup code:

In my .emacs:

------------------------8<------------------------------------------------
(setq org-user-agenda-files ( quote ("~/git/org"
                                     "~/git/org/test")))

(add-to-list 'load-path (expand-file-name "~/.emacs.d/lisp"))
(load "org-mode")

------------------------8<------------------------------------------------

In the org-mode.el file from the above site:

------------------------8<------------------------------------------------
;; The following setting is different from the document so that you
;; can override the document org-agenda-files by setting your
;; org-agenda-files in the variable org-user-agenda-files
;;
(if (boundp 'org-user-agenda-files)
    (setq org-agenda-files org-user-agenda-files)
  (setq org-agenda-files (quote ("~/git/org"
                               "~/git/org/client1"
                               "~/git/client2"))))

------------------------8<------------------------------------------------

So by setting org-user-agenda-files in my .emacs before loading
org-mode.el (which I have in my ~/.emacs.d/lisp directory), I should be
setting org-agenda-files to ("~/git/org" "~/git/org/test").

Results of executing the following code (in this order) in the scratch
buffer:
(boundp 'org-user-agenda-files)   =>  t
org-user-agenda-files             =>  ("~/git/org" "~/git/org/test")
(boundp 'org-agenda-files)        =>  t
org-agenda-files                  =>  nil
(setq org-agenda-files org-user-agenda-files) => ("~/git/org"
"~/git/org/test")
org-agenda-files                              => ("~/git/org"
"~/git/org/test")

So I don't understand why the commands in .emacs and org-mode.el aren't
giving me the expected results. Have I missed something with my limited
knowledge of lisp?

Many thanks in advance for your help!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]