emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] collect info from org files in agenda when open?


From: Eric Abrahamsen
Subject: Re: [O] collect info from org files in agenda when open?
Date: Sat, 13 Jul 2013 23:09:49 +0800
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3 (gnu/linux)

Gregor Zattler <address@hidden> writes:

> Hi Noorul, org-mod users and developers,
> * Noorul Islam K M <address@hidden> [13. Jul. 2013]:
>> Gregor Zattler <address@hidden> writes:
>>> I customized my org-agenda-files variable to contain 4 files.
>>> But I wished I could automatically add org files to the agenda
>>> simply by opening them.  Is it possible to automagically add
>>> some files to the agenda iff they are visited or add the contents
>>> of org-mode buffers?
>> 
>> I am not sure whether you already went through contents of this link.
>> 
>> http://orgmode.org/manual/Agenda-files.html
>
> Yes I read this part of the manual before posting my question.  
>
> As I understand the manual, I have the possibility to customize a
> static list of agenda files in org-agenda-files or to manually
> add and remove org files from the agenda or restrict the agenda
> manually.
> I do not see how to *automatically* add open org-files to the
> agenda?  Perhaps I could do this with some hooks?
>
> Actually I think a static list of files which contribute to the
> agenda is fine.  
> But I wished there was also the ability to define a list of files
> which do only contribute to the agenda if already open
> (preferably with some pattern matching, so one could customize
> org to add any open org file to the agenda).
>
> Ciao, Gregor

You could certainly do this with a function attached to
`find-file-hook'. In the function, check if (buffer-file-name) ends in
".org": if it does, then `org-agenda-file-to-front' and you're good to
go.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]