emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Eric Abrahamsen <eric@ericabrahamsen.net>
To: emacs-orgmode@gnu.org
Subject: Re: collect info from org files in agenda when open?
Date: Sat, 13 Jul 2013 23:09:49 +0800	[thread overview]
Message-ID: <878v1aa43m.fsf@ericabrahamsen.net> (raw)
In-Reply-To: 20130713083315.GA20339@boo.workgroup

Gregor Zattler <telegraph@gmx.net> writes:

> Hi Noorul, org-mod users and developers,
> * Noorul Islam K M <noorul@noorul.com> [13. Jul. 2013]:
>> Gregor Zattler <telegraph@gmx.net> 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	other threads:[~2013-07-13 15:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-12 22:16 collect info from org files in agenda when open? Gregor Zattler
2013-07-13  8:10 ` Noorul Islam K M
2013-07-13  8:33   ` Gregor Zattler
2013-07-13 15:09     ` Eric Abrahamsen [this message]
2013-07-14 14:11       ` automagically add/remove org mode buffers to agenda files list (was: Re: collect info from org files in agenda when open?) Gregor Zattler
2013-07-14 14:22         ` Drew Adams
2013-07-23 11:06           ` Gregor Zattler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878v1aa43m.fsf@ericabrahamsen.net \
    --to=eric@ericabrahamsen.net \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).