emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Merging a list and wildcard expansion in org-agenda-files
@ 2011-04-09 19:46 Adrian C.
  2011-04-10 14:06 ` Puneeth Chaganti
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian C. @ 2011-04-09 19:46 UTC (permalink / raw)
  To: emacs-orgmode

Hello, 
I read the FAQ entry "How can include all org files in a directory in my 
agenda?" and I'd like to merge both examples from the answer for my 
agenda-files.

To include all org files in a directory I would use 
(setq org-agenda-files '("~/org/")).

I have a special projects directory with the format 
~/projects/<projectname>/project.org for that I would use

(setq org-agenda-files (file-expand-wildcards 
~"/projects/*/project.org"))


I tried to define a single org-agenda-files with both, unfortunately I 
don't know a lot of elisp so my tries like using list() all failed. For 
the first directory I guess I could also use file-expand-widlcards with 
*.org, but wasn't succesful in merging two file-expand-wildcards either.


On a simillar note I'd like to pitch in another questions. If someone is 
able to help me, then my agenda view combined would have 30 to 50 files, 
previously I never wondered why all the files end up opened in emacs 
buffers. But now if I combined them all each time I view the agenda I 
will be loading all the files. Any way to avoid opening 30 new buffers? 
Thank you.

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

* Re: Merging a list and wildcard expansion in org-agenda-files
  2011-04-09 19:46 Merging a list and wildcard expansion in org-agenda-files Adrian C.
@ 2011-04-10 14:06 ` Puneeth Chaganti
  2011-04-10 14:12   ` Puneeth Chaganti
  0 siblings, 1 reply; 6+ messages in thread
From: Puneeth Chaganti @ 2011-04-10 14:06 UTC (permalink / raw)
  To: Adrian C.; +Cc: emacs-orgmode

On Sun, Apr 10, 2011 at 1:16 AM, Adrian C. <anrxc@sysphere.org> wrote:
> Hello,
> I read the FAQ entry "How can include all org files in a directory in my
> agenda?" and I'd like to merge both examples from the answer for my
> agenda-files.
>
> To include all org files in a directory I would use
> (setq org-agenda-files '("~/org/")).
>
> I have a special projects directory with the format
> ~/projects/<projectname>/project.org for that I would use
>
> (setq org-agenda-files (file-expand-wildcards
> ~"/projects/*/project.org"))

I'm not sure this is the best way to do it, but this works.

(setq org-agenda-files (append
                        '("~/.life-in-plain-text/")
                        (file-expand-wildcards
                         "/tmp/projects/*/projects.org")))

>
> I tried to define a single org-agenda-files with both, unfortunately I
> don't know a lot of elisp so my tries like using list() all failed. For
> the first directory I guess I could also use file-expand-widlcards with
> *.org, but wasn't succesful in merging two file-expand-wildcards either.
>
>
> On a simillar note I'd like to pitch in another questions. If someone is
> able to help me, then my agenda view combined would have 30 to 50 files,
> previously I never wondered why all the files end up opened in emacs
> buffers. But now if I combined them all each time I view the agenda I
> will be loading all the files. Any way to avoid opening 30 new buffers?
> Thank you.

AFAIK, there's no way out. Agenda needs all those buffers to be open, to work.
Look at this thread.
http://lists.gnu.org/archive/html/emacs-orgmode/2011-03/msg01720.html

-- 
Puneeth

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

* Re: Merging a list and wildcard expansion in org-agenda-files
  2011-04-10 14:06 ` Puneeth Chaganti
@ 2011-04-10 14:12   ` Puneeth Chaganti
  2011-04-10 17:21     ` Adrian C.
  0 siblings, 1 reply; 6+ messages in thread
From: Puneeth Chaganti @ 2011-04-10 14:12 UTC (permalink / raw)
  To: Adrian C.; +Cc: emacs-orgmode

Sorry for replying to my own mail.

On Sun, Apr 10, 2011 at 7:36 PM, Puneeth Chaganti <punchagan@gmail.com> wrote:
> On Sun, Apr 10, 2011 at 1:16 AM, Adrian C. <anrxc@sysphere.org>
> I'm not sure this is the best way to do it, but this works.
>
> (setq org-agenda-files (append
>                        '("~/.life-in-plain-text/")
>                        (file-expand-wildcards
>                         "/tmp/projects/*/projects.org")))

This is more like it, I think.

(setq org-agenda-files
      (cons "~/org/"
            (file-expand-wildcards "~/projects/*/projects.org")))

--
Puneeth

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

* Re: Merging a list and wildcard expansion in org-agenda-files
  2011-04-10 14:12   ` Puneeth Chaganti
@ 2011-04-10 17:21     ` Adrian C.
  2011-04-10 17:31       ` Puneeth Chaganti
  0 siblings, 1 reply; 6+ messages in thread
From: Adrian C. @ 2011-04-10 17:21 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, 10 Apr 2011, Puneeth Chaganti wrote:

> This is more like it, I think.
> 
> (setq org-agenda-files
>       (cons "~/org/"
>             (file-expand-wildcards "~/projects/*/projects.org")))

Great, thanks very much.


> AFAIK, there's no way out. Agenda needs all those buffers to be open

Guess I'll need an alias to kill them all quickly when needed. Thanks.

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

* Re: Merging a list and wildcard expansion in org-agenda-files
  2011-04-10 17:21     ` Adrian C.
@ 2011-04-10 17:31       ` Puneeth Chaganti
  2011-04-10 17:35         ` Adrian C.
  0 siblings, 1 reply; 6+ messages in thread
From: Puneeth Chaganti @ 2011-04-10 17:31 UTC (permalink / raw)
  To: Adrian C.; +Cc: emacs-orgmode

On Sun, Apr 10, 2011 at 10:51 PM, Adrian C. <anrxc@sysphere.org> wrote:
> On Sun, 10 Apr 2011, Puneeth Chaganti wrote:
>
>> This is more like it, I think.
>>
>> (setq org-agenda-files
>>       (cons "~/org/"
>>             (file-expand-wildcards "~/projects/*/projects.org")))
>
> Great, thanks very much.
>
>
>> AFAIK, there's no way out. Agenda needs all those buffers to be open
>
> Guess I'll need an alias to kill them all quickly when needed. Thanks.

Hitting `x' in the agenda does it.

>
>
>



-- 
Puneeth

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

* Re: Merging a list and wildcard expansion in org-agenda-files
  2011-04-10 17:31       ` Puneeth Chaganti
@ 2011-04-10 17:35         ` Adrian C.
  0 siblings, 0 replies; 6+ messages in thread
From: Adrian C. @ 2011-04-10 17:35 UTC (permalink / raw)
  To: emacs-orgmode

On Sun, 10 Apr 2011, Puneeth Chaganti wrote:

> Hitting `x' in the agenda does it.

Just found that in the thread you linked. I've been killing the agenda.

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

end of thread, other threads:[~2011-04-10 17:35 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-09 19:46 Merging a list and wildcard expansion in org-agenda-files Adrian C.
2011-04-10 14:06 ` Puneeth Chaganti
2011-04-10 14:12   ` Puneeth Chaganti
2011-04-10 17:21     ` Adrian C.
2011-04-10 17:31       ` Puneeth Chaganti
2011-04-10 17:35         ` Adrian C.

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