* FAQ incorrect
@ 2009-10-27 13:10 W.Bentley MacLeod
2009-10-27 14:50 ` Benjamin Andresen
` (2 more replies)
0 siblings, 3 replies; 9+ messages in thread
From: W.Bentley MacLeod @ 2009-10-27 13:10 UTC (permalink / raw)
To: emacs-orgmode
FAQ on how to include all org files in a directory is incorrect (view 85).
Correct code is:
(setq org-agenda-files (file-expand-wildcards "~/org-files/*.org"))
best bm
____________________________
Professor W. Bentley MacLeod
Columbia University in the City of New York, NY 10027
http://www.columbia.edu/~wbm2103/
____________________________
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FAQ incorrect
2009-10-27 13:10 FAQ incorrect W.Bentley MacLeod
@ 2009-10-27 14:50 ` Benjamin Andresen
2009-10-27 15:03 ` W.Bentley MacLeod
2009-10-27 15:05 ` W.Bentley MacLeod
2009-10-27 14:56 ` Nick Dokos
2009-10-27 15:00 ` Matt Lundin
2 siblings, 2 replies; 9+ messages in thread
From: Benjamin Andresen @ 2009-10-27 14:50 UTC (permalink / raw)
To: W.Bentley MacLeod; +Cc: emacs-orgmode
Hey W.,
"W.Bentley MacLeod" <bentley.macleod@columbia.edu> writes:
> FAQ on how to include all org files in a directory is incorrect (view 85).
> Correct code is:
> (setq org-agenda-files (file-expand-wildcards "~/org-files/*.org"))
You are right.
This isn't valid: (setq org-agenda-files "~/my/special/path/org/")
M-x org-agenda RET will reply with: `org-agenda-files' cannot be a single directory
I propose the following for the FAQ:
(setq org-agenda-directory "~/Org/")
(setq org-agenda-files (directory-files (expand-file-name org-agenda-directory) t "^[^\.][^#][[:alnum:]]+\.org$"))
That will add every org file. I've had the problem of normal glob
expansion to include emacs lock files that are in this format:
.#todo.org
I was under the impression that org-agenda-directory set to
~/my/special/path/org/ would Just Work(tm) because if you do C-c a a v A
it pulls in the right files for me.
> best bm
br,
benny
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FAQ incorrect
2009-10-27 13:10 FAQ incorrect W.Bentley MacLeod
2009-10-27 14:50 ` Benjamin Andresen
@ 2009-10-27 14:56 ` Nick Dokos
2009-10-27 15:21 ` Carsten Dominik
2009-10-27 15:00 ` Matt Lundin
2 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2009-10-27 14:56 UTC (permalink / raw)
To: W.Bentley MacLeod; +Cc: emacs-orgmode
W.Bentley MacLeod <bentley.macleod@columbia.edu> wrote:
> FAQ on how to include all org files in a directory is incorrect (view 85).
> Correct code is:
> (setq org-agenda-files (file-expand-wildcards "~/org-files/*.org"))
>
If you are talking about this entry:
How can include all org files in a directory in my agenda?
You can simply set the value of org-agenda-files to a directory rather than a list of files:
(setq org-agenda-files "~/my/special/path/org/")
it is correct as it stands: unless you are using a really ancient
version, org figures out that it's a directory and sets org-agenda-files
to the contents of the directory (filtered by org-agenda-file-regexp,
which by default matches filenames ending in ".org").
HTH,
Nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FAQ incorrect
2009-10-27 13:10 FAQ incorrect W.Bentley MacLeod
2009-10-27 14:50 ` Benjamin Andresen
2009-10-27 14:56 ` Nick Dokos
@ 2009-10-27 15:00 ` Matt Lundin
2 siblings, 0 replies; 9+ messages in thread
From: Matt Lundin @ 2009-10-27 15:00 UTC (permalink / raw)
To: W.Bentley MacLeod; +Cc: emacs-orgmode
"W.Bentley MacLeod" <bentley.macleod@columbia.edu> writes:
> FAQ on how to include all org files in a directory is incorrect (view 85).
> Correct code is:
> (setq org-agenda-files (file-expand-wildcards "~/org-files/*.org"))
Thanks. Yes, that is one way to add all files in directory. But the
method suggested by the FAQ is also correct. According to the docstring
for the variable org-agenda-files:
,----
| If an entry is a directory, all files in that directory that are matched by
| `org-agenda-file-regexp' will be part of the file list.
`----
I'll update the FAQ to indicate that there are multiple ways of
accomplishing the same thing.
I also saw a typo in the fake path in the example, which I'll be sure to
change.
Best,
Matt
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FAQ incorrect
2009-10-27 14:50 ` Benjamin Andresen
@ 2009-10-27 15:03 ` W.Bentley MacLeod
2009-10-27 15:05 ` W.Bentley MacLeod
1 sibling, 0 replies; 9+ messages in thread
From: W.Bentley MacLeod @ 2009-10-27 15:03 UTC (permalink / raw)
To: Benjamin Andresen; +Cc: emacs-orgmode
perfect. b.
____________________________
Professor W. Bentley MacLeod
Columbia University in the City of New York, NY 10027
http://www.columbia.edu/~wbm2103/
____________________________
On Tue, 27 Oct 2009, Benjamin Andresen wrote:
> Hey W.,
>
> "W.Bentley MacLeod" <bentley.macleod@columbia.edu> writes:
>
>> FAQ on how to include all org files in a directory is incorrect (view 85).
>> Correct code is:
>> (setq org-agenda-files (file-expand-wildcards "~/org-files/*.org"))
>
> You are right.
>
> This isn't valid: (setq org-agenda-files "~/my/special/path/org/")
>
> M-x org-agenda RET will reply with: `org-agenda-files' cannot be a single directory
>
> I propose the following for the FAQ:
>
> (setq org-agenda-directory "~/Org/")
> (setq org-agenda-files (directory-files (expand-file-name org-agenda-directory) t "^[^\.][^#][[:alnum:]]+\.org$"))
>
> That will add every org file. I've had the problem of normal glob
> expansion to include emacs lock files that are in this format:
> .#todo.org
>
> I was under the impression that org-agenda-directory set to
> ~/my/special/path/org/ would Just Work(tm) because if you do C-c a a v A
> it pulls in the right files for me.
>
>> best bm
>
> br,
> benny
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FAQ incorrect
2009-10-27 14:50 ` Benjamin Andresen
2009-10-27 15:03 ` W.Bentley MacLeod
@ 2009-10-27 15:05 ` W.Bentley MacLeod
1 sibling, 0 replies; 9+ messages in thread
From: W.Bentley MacLeod @ 2009-10-27 15:05 UTC (permalink / raw)
To: Benjamin Andresen; +Cc: emacs-orgmode
Yes, that is the error I got.
I like your solution.
____________________________
Professor W. Bentley MacLeod
Columbia University in the City of New York, NY 10027
http://www.columbia.edu/~wbm2103/
____________________________
On Tue, 27 Oct 2009, Benjamin Andresen wrote:
> Hey W.,
>
> "W.Bentley MacLeod" <bentley.macleod@columbia.edu> writes:
>
>> FAQ on how to include all org files in a directory is incorrect (view 85).
>> Correct code is:
>> (setq org-agenda-files (file-expand-wildcards "~/org-files/*.org"))
>
> You are right.
>
> This isn't valid: (setq org-agenda-files "~/my/special/path/org/")
>
> M-x org-agenda RET will reply with: `org-agenda-files' cannot be a single directory
>
> I propose the following for the FAQ:
>
> (setq org-agenda-directory "~/Org/")
> (setq org-agenda-files (directory-files (expand-file-name org-agenda-directory) t "^[^\.][^#][[:alnum:]]+\.org$"))
>
> That will add every org file. I've had the problem of normal glob
> expansion to include emacs lock files that are in this format:
> .#todo.org
>
> I was under the impression that org-agenda-directory set to
> ~/my/special/path/org/ would Just Work(tm) because if you do C-c a a v A
> it pulls in the right files for me.
>
>> best bm
>
> br,
> benny
>
>
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FAQ incorrect
2009-10-27 14:56 ` Nick Dokos
@ 2009-10-27 15:21 ` Carsten Dominik
2009-10-27 15:29 ` Nick Dokos
0 siblings, 1 reply; 9+ messages in thread
From: Carsten Dominik @ 2009-10-27 15:21 UTC (permalink / raw)
To: nicholas.dokos; +Cc: emacs-orgmode, W.Bentley MacLeod
On Oct 27, 2009, at 3:56 PM, Nick Dokos wrote:
> W.Bentley MacLeod <bentley.macleod@columbia.edu> wrote:
>
>> FAQ on how to include all org files in a directory is incorrect
>> (view 85).
>> Correct code is:
>> (setq org-agenda-files (file-expand-wildcards "~/org-files/*.org"))
>>
>
> If you are talking about this entry:
>
> How can include all org files in a directory in my agenda?
>
> You can simply set the value of org-agenda-files to a directory
> rather than a list of files:
>
> (setq org-agenda-files "~/my/special/path/org/")
Does that really work? I believe it should be
(setq org-agenda-files '("~/my/special/path/org/"))
i.e. each member of this list can be a file or a
directory. If it is a directory, the org files in
it will be used.
- Carsten
>
> it is correct as it stands: unless you are using a really ancient
> version, org figures out that it's a directory and sets org-agenda-
> files
> to the contents of the directory (filtered by org-agenda-file-regexp,
> which by default matches filenames ending in ".org").
>
> HTH,
> Nick
>
>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Remember: use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
- Carsten
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FAQ incorrect
2009-10-27 15:21 ` Carsten Dominik
@ 2009-10-27 15:29 ` Nick Dokos
2009-10-27 17:02 ` Matt Lundin
0 siblings, 1 reply; 9+ messages in thread
From: Nick Dokos @ 2009-10-27 15:29 UTC (permalink / raw)
To: Carsten Dominik; +Cc: emacs-orgmode, W.Bentley MacLeod
Carsten Dominik <carsten.dominik@gmail.com> wrote:
> >
> > (setq org-agenda-files "~/my/special/path/org/")
>
> Does that really work? I believe it should be
>
> (setq org-agenda-files '("~/my/special/path/org/"))
>
> i.e. each member of this list can be a file or a
> directory. If it is a directory, the org files in
> it will be used.
>
Yes, I was mistaken: it's got to be a list.
Thanks,
Nick
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: FAQ incorrect
2009-10-27 15:29 ` Nick Dokos
@ 2009-10-27 17:02 ` Matt Lundin
0 siblings, 0 replies; 9+ messages in thread
From: Matt Lundin @ 2009-10-27 17:02 UTC (permalink / raw)
To: nicholas.dokos; +Cc: W.Bentley MacLeod, emacs-orgmode, Carsten Dominik
Nick Dokos <nicholas.dokos@hp.com> writes:
> Carsten Dominik <carsten.dominik@gmail.com> wrote:
>
>> >
>> > (setq org-agenda-files "~/my/special/path/org/")
>>
>> Does that really work? I believe it should be
>>
>> (setq org-agenda-files '("~/my/special/path/org/"))
>>
>> i.e. each member of this list can be a file or a
>> directory. If it is a directory, the org files in
>> it will be used.
>>
>
> Yes, I was mistaken: it's got to be a list.
My mistake as well. I updated the FAQ accordingly.
- Matt
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2009-10-27 17:04 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-27 13:10 FAQ incorrect W.Bentley MacLeod
2009-10-27 14:50 ` Benjamin Andresen
2009-10-27 15:03 ` W.Bentley MacLeod
2009-10-27 15:05 ` W.Bentley MacLeod
2009-10-27 14:56 ` Nick Dokos
2009-10-27 15:21 ` Carsten Dominik
2009-10-27 15:29 ` Nick Dokos
2009-10-27 17:02 ` Matt Lundin
2009-10-27 15:00 ` Matt Lundin
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.