emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Handling org-file agenda dependenncies?
@ 2009-03-27  0:31 Eraldo Helal
  2009-03-27 21:46 ` Mike Newman
  0 siblings, 1 reply; 5+ messages in thread
From: Eraldo Helal @ 2009-03-27  0:31 UTC (permalink / raw)
  To: Org-Mode


[-- Attachment #1.1: Type: text/plain, Size: 584 bytes --]

I have projects with non-text files.
Many of them having sub-,subsub-projects etc. (nested)
Therefore I made directories for them using the project name. /<project
name>/<subproject name>/etc
Each having it's own <(sub-)project name>.org file in it.

My question:

How can I add|remove a whole project from the agenda?

e.g. If I remove project1.org file from the agenda...
     /project1/subprojectX.org would still be in there!

Or is there a way to assign and then set a group of org.files to
inactive(=remove from agenda)?

Any other suggestions|methods for solving this problem?

[-- Attachment #1.2: Type: text/html, Size: 698 bytes --]

[-- Attachment #2: Type: text/plain, Size: 204 bytes --]

_______________________________________________
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

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

* Re: Handling org-file agenda dependenncies?
  2009-03-27  0:31 Handling org-file agenda dependenncies? Eraldo Helal
@ 2009-03-27 21:46 ` Mike Newman
  2009-03-28 11:07   ` Eraldo Helal
  2009-03-30  7:54   ` Carsten Dominik
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Newman @ 2009-03-27 21:46 UTC (permalink / raw)
  To: emacs-orgmode

When you use the standard commands to add/removes files from the
agenda, it will write a definition for the variable org-agenda-files to
the custom section of your .emacs file.

If you want to deal with trees of files, you might be better off
removing the variable from the custom section, defining it
yourself and updating it manually.

I would find it useful to be able to switch to an "*Org Agenda Files
Buffer*", edit this and save it to update - but I don't suppose anyone 
would think it worth the effort of coding.

As an interesting aside - if in Dired I rename a file that I am
currently visiting, the buffer's name will be changed automatically.
However, org-agenda-files will not be updated in this case.

On Fri, 27 Mar 2009 01:31:19 +0100
Eraldo Helal <office@eraldo.at> wrote:

> I have projects with non-text files.
> Many of them having sub-,subsub-projects etc. (nested)
> Therefore I made directories for them using the project
> name. /<project
> name>/<subproject name>/etc
> Each having it's own <(sub-)project name>.org file in it.
> 
> My question:
> 
> How can I add|remove a whole project from the agenda?
> 
> e.g. If I remove project1.org file from the agenda...
>      /project1/subprojectX.org would still be in there!
> 
> Or is there a way to assign and then set a group of org.files to
> inactive(=remove from agenda)?
> 
> Any other suggestions|methods for solving this problem?

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

* Re: Handling org-file agenda dependenncies?
  2009-03-27 21:46 ` Mike Newman
@ 2009-03-28 11:07   ` Eraldo Helal
  2009-03-28 11:55     ` Matthew Lundin
  2009-03-30  7:54   ` Carsten Dominik
  1 sibling, 1 reply; 5+ messages in thread
From: Eraldo Helal @ 2009-03-28 11:07 UTC (permalink / raw)
  To: emacs-orgmode

Mike Newman <mike <at> newmanfamily.me.uk> writes:
 
> When you use the standard commands to add/removes files from the
> agenda, it will write a definition for the variable org-agenda-files to
> the custom section of your .emacs file.

That would still mean removing every org-file in the tree manually when wanting
to make a project "inactive".

> If you want to deal with trees of files, you might be better off
> removing the variable from the custom section, defining it
> yourself and updating it manually.

The questions here is... How could one define it?

I thought of a macro that I could use while in an emacs buffer.
The macro should search through the attachment directory (saved as a property)
of the headline and remove from the agenda all the *.org files that it finds.

Comments? Suggestions?

Greetings,
Eraldo

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

* Re: Re: Handling org-file agenda dependenncies?
  2009-03-28 11:07   ` Eraldo Helal
@ 2009-03-28 11:55     ` Matthew Lundin
  0 siblings, 0 replies; 5+ messages in thread
From: Matthew Lundin @ 2009-03-28 11:55 UTC (permalink / raw)
  To: Eraldo Helal; +Cc: emacs-orgmode

Hi Eraldo,

Eraldo Helal <admin@eraldo.at> writes:

> Mike Newman <mike <at> newmanfamily.me.uk> writes:
>  
>> When you use the standard commands to add/removes files from the
>> agenda, it will write a definition for the variable org-agenda-files to
>> the custom section of your .emacs file.
>
> That would still mean removing every org-file in the tree manually
> when wanting to make a project "inactive".
>
>> If you want to deal with trees of files, you might be better off
>> removing the variable from the custom section, defining it
>> yourself and updating it manually.
>
> The questions here is... How could one define it?

I think you could set something like the following in your .emacs file:

--8<---------------cut here---------------start------------->8---
(load-library "find-lisp")
(setq org-agenda-files (append (find-lisp-find-files "~/directory1" "\.org$")
			       (find-lisp-find-files "~/directory2" "\.org$")         
                               (find-lisp-find-files "~/directory3" "\.org$")))
--8<---------------cut here---------------end--------------->8---

This will search the directories above recursively for org files.
Whenever you want to remove a project from your agenda, simply delete
the appropriate line and evaluate the expression. I'd imagine someone
else can think of a way to do this more economically, though.

Best,
Matt

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

* Re: Handling org-file agenda dependenncies?
  2009-03-27 21:46 ` Mike Newman
  2009-03-28 11:07   ` Eraldo Helal
@ 2009-03-30  7:54   ` Carsten Dominik
  1 sibling, 0 replies; 5+ messages in thread
From: Carsten Dominik @ 2009-03-30  7:54 UTC (permalink / raw)
  To: Mike Newman; +Cc: emacs-orgmode


On Mar 27, 2009, at 10:46 PM, Mike Newman wrote:

> When you use the standard commands to add/removes files from the
> agenda, it will write a definition for the variable org-agenda-files  
> to
> the custom section of your .emacs file.
>
> If you want to deal with trees of files, you might be better off
> removing the variable from the custom section, defining it
> yourself and updating it manually.
>
> I would find it useful to be able to switch to an "*Org Agenda Files
> Buffer*", edit this and save it to update - but I don't suppose anyone
> would think it worth the effort of coding.


This is already possible.  If org-agenda-files points to a single file  
instead of a list, that file should contain the list of agenda files,  
one per line.

- Carsten

>
> As an interesting aside - if in Dired I rename a file that I am
> currently visiting, the buffer's name will be changed automatically.
> However, org-agenda-files will not be updated in this case.
>
> On Fri, 27 Mar 2009 01:31:19 +0100
> Eraldo Helal <office@eraldo.at> wrote:
>
>> I have projects with non-text files.
>> Many of them having sub-,subsub-projects etc. (nested)
>> Therefore I made directories for them using the project
>> name. /<project
>> name>/<subproject name>/etc
>> Each having it's own <(sub-)project name>.org file in it.
>>
>> My question:
>>
>> How can I add|remove a whole project from the agenda?
>>
>> e.g. If I remove project1.org file from the agenda...
>>     /project1/subprojectX.org would still be in there!
>>
>> Or is there a way to assign and then set a group of org.files to
>> inactive(=remove from agenda)?
>>
>> Any other suggestions|methods for solving this problem?
>
>
> _______________________________________________
> 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

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

end of thread, other threads:[~2009-03-30  7:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-27  0:31 Handling org-file agenda dependenncies? Eraldo Helal
2009-03-27 21:46 ` Mike Newman
2009-03-28 11:07   ` Eraldo Helal
2009-03-28 11:55     ` Matthew Lundin
2009-03-30  7:54   ` Carsten Dominik

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