emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* org-agenda-files
@ 2015-10-06 20:34 Paul Jewell
  2015-10-08 19:42 ` org-agenda-files Eric S Fraga
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Jewell @ 2015-10-06 20:34 UTC (permalink / raw)
  To: emacs-orgmode

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!

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

* Re: org-agenda-files
  2015-10-06 20:34 org-agenda-files Paul Jewell
@ 2015-10-08 19:42 ` Eric S Fraga
  2015-10-08 21:36   ` org-agenda-files Paul Jewell
  0 siblings, 1 reply; 4+ messages in thread
From: Eric S Fraga @ 2015-10-08 19:42 UTC (permalink / raw)
  To: Paul Jewell; +Cc: emacs-orgmode

On Tuesday,  6 Oct 2015 at 21:34, Paul Jewell wrote:

[...]

> 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").

When do you load org itself?

Other than variables set by customize, I load org and then setq
variables.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25

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

* Re: org-agenda-files
  2015-10-08 19:42 ` org-agenda-files Eric S Fraga
@ 2015-10-08 21:36   ` Paul Jewell
  2015-10-09  7:15     ` org-agenda-files Eric S Fraga
  0 siblings, 1 reply; 4+ messages in thread
From: Paul Jewell @ 2015-10-08 21:36 UTC (permalink / raw)
  To: emacs-orgmode



On 08/10/15 20:42, Eric S Fraga wrote:
> On Tuesday,  6 Oct 2015 at 21:34, Paul Jewell wrote:
> 
> [...]
> 
>> 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").
> 
> When do you load org itself?
> 
> Other than variables set by customize, I load org and then setq
> variables.
> 

The problem was customize. I set the org-user-agenda-files in .emacs,
then load the org-mode.el. This loads org mode at te top of the file,
then sets org-agenda-files to org-user-agenda-files.

The bit I missed was that org-agenda-files were set in customize to nil,
and this change was happening after the assignment. Once I cleared this,
everything works as planned.

Thanks for coming back to me!

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

* Re: org-agenda-files
  2015-10-08 21:36   ` org-agenda-files Paul Jewell
@ 2015-10-09  7:15     ` Eric S Fraga
  0 siblings, 0 replies; 4+ messages in thread
From: Eric S Fraga @ 2015-10-09  7:15 UTC (permalink / raw)
  To: Paul Jewell; +Cc: emacs-orgmode

On Thursday,  8 Oct 2015 at 22:36, Paul Jewell wrote:

[...]

> The bit I missed was that org-agenda-files were set in customize to nil,
> and this change was happening after the assignment. Once I cleared this,
> everything works as planned.
>
> Thanks for coming back to me!

Glad you figured it out.

-- 
: Eric S Fraga (0xFFFCF67D), Emacs 25.0.50.2, Org release_8.3.2-161-gd2ac25

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

end of thread, other threads:[~2015-10-09  7:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-06 20:34 org-agenda-files Paul Jewell
2015-10-08 19:42 ` org-agenda-files Eric S Fraga
2015-10-08 21:36   ` org-agenda-files Paul Jewell
2015-10-09  7:15     ` org-agenda-files Eric S Fraga

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).