all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* org-agenda-files skips two files
@ 2013-02-17  5:32 Eric Abrahamsen
  2013-02-17 15:42 ` Memnon Anon
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Abrahamsen @ 2013-02-17  5:32 UTC (permalink / raw)
  To: emacs-orgmode

I've noticed for a while that two org files in my ~/org directory never
get added to org-agenda-files, and I can't figure out why. My
org-agenda-files is set to '("~/org/"), and yet:

(dolist (f (directory-files "~/org" t "org$"))
  (unless (member f org-agenda-files)
    (insert (format "%s: %s\n" f (file-attributes f)))))

/home/eric/org/epubnotes.org: (nil 1 1000 100 (20752 42274) (20740 56906) (20740 56906) 10673 -rw-r--r-- nil 8655230 2052)
/home/eric/org/running.org: (nil 1 1000 100 (20768 26205) (20768 21290) (20768 24128) 423435 -rw-r--r-- nil 5375520 2052)

Those two files are never in there. I've tried to find at what point in
the code org-agenda-files is first populated: obviously it happens after
org-agenda is called for the first time, but I still can't find it!

All variables related to filtering org agenda files are set to defaults.
I can't see anything about the files themselves that would be
"objectionable". If I open them both manually, the second is added to
the files list, but the first isn't!

Very confused...

Eric

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

* Re: org-agenda-files skips two files
  2013-02-17  5:32 org-agenda-files skips two files Eric Abrahamsen
@ 2013-02-17 15:42 ` Memnon Anon
  2013-02-18  5:34   ` Eric Abrahamsen
  0 siblings, 1 reply; 3+ messages in thread
From: Memnon Anon @ 2013-02-17 15:42 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> I've noticed for a while that two org files in my ~/org directory never
> get added to org-agenda-files, and I can't figure out why. My
> org-agenda-files is set to '("~/org/"), and yet:
>
> (dolist (f (directory-files "~/org" t "org$"))
>   (unless (member f org-agenda-files)
>     (insert (format "%s: %s\n" f (file-attributes f)))))
>
> /home/eric/org/epubnotes.org: (nil 1 1000 100 (20752 42274) (20740 56906) (20740 56906) 10673 -rw-r--r-- nil 8655230 2052)
> /home/eric/org/running.org: (nil 1 1000 100 (20768 26205) (20768 21290) (20768 24128) 423435 -rw-r--r-- nil 5375520 2052)

Did you try edebuging defun org-agenda-files in org.el?

Seems like the relevant bit that extracts all org files from the
directory is:

(apply 'append (mapcar (lambda (f)
			 (if (file-directory-p f)
			     (directory-files
			      f t org-agenda-file-regexp)
			   (list f)))
		       org-agenda-files))

Are epubnotes.org and running.org getting returned with the other files?
Do you have org-agenda-skip-unavailable-files set to t?

Memnon

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

* Re: org-agenda-files skips two files
  2013-02-17 15:42 ` Memnon Anon
@ 2013-02-18  5:34   ` Eric Abrahamsen
  0 siblings, 0 replies; 3+ messages in thread
From: Eric Abrahamsen @ 2013-02-18  5:34 UTC (permalink / raw)
  To: emacs-orgmode

Memnon Anon <gegendosenfleisch@googlemail.com> writes:

> Hi,
>
> Eric Abrahamsen <eric@ericabrahamsen.net> writes:
>
>> I've noticed for a while that two org files in my ~/org directory never
>> get added to org-agenda-files, and I can't figure out why. My
>> org-agenda-files is set to '("~/org/"), and yet:
>>
>> (dolist (f (directory-files "~/org" t "org$"))
>>   (unless (member f org-agenda-files)
>>     (insert (format "%s: %s\n" f (file-attributes f)))))
>>
>> /home/eric/org/epubnotes.org: (nil 1 1000 100 (20752 42274) (20740 56906) (20740 56906) 10673 -rw-r--r-- nil 8655230 2052)
>> /home/eric/org/running.org: (nil 1 1000 100 (20768 26205) (20768 21290) (20768 24128) 423435 -rw-r--r-- nil 5375520 2052)
>
> Did you try edebuging defun org-agenda-files in org.el?
>
> Seems like the relevant bit that extracts all org files from the
> directory is:
>
> (apply 'append (mapcar (lambda (f)
> 			 (if (file-directory-p f)
> 			     (directory-files
> 			      f t org-agenda-file-regexp)
> 			   (list f)))
> 		       org-agenda-files))

Oh, I had read this wrong -- for some reason I thought it was just
looping over the already-populated variable.

But the real problem was that org-agenda-files somehow got written as a
customize variable, I have no idea when or how, and so was locked in
state. Total user error. Sorry about that...

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

end of thread, other threads:[~2013-02-18  5:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-02-17  5:32 org-agenda-files skips two files Eric Abrahamsen
2013-02-17 15:42 ` Memnon Anon
2013-02-18  5:34   ` Eric Abrahamsen

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.