From: andrea <andrea.crotti.0@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Re: Restructure my org-life
Date: Wed, 02 Dec 2009 15:45:13 +0100 [thread overview]
Message-ID: <m1skbtv3ie.fsf@47-118.eduroam.rwth-aachen.de> (raw)
In-Reply-To: hf5kkg$kqf$1@ger.gmane.org
Xavier Maillard <xma@gnu.org> writes:
> Care to share it with us ?
>
Of course with pleasure, it's quite simple but very nice
--8<---------------cut here---------------start------------->8---
(defun org-add-eventually()
"Adding a file to org-agenda when saved"
(interactive)
(if (string= major-mode "org-mode")
(org-agenda-file-to-front)))
;;TODO: Check if a file is contained in some subdirectories
(add-hook 'before-save-hook 'org-add-eventually)
--8<---------------cut here---------------end--------------->8---
org-agenda-file-to-front as someone said use the customization thing, so
your agenda-files variable will be written at the end of .emacs/init.el
or wherever you have it.
It works quite well, then if you remove some files the next time you see
the agenda it will just ask you if you want to remove them from the
agenda as well, fairly simple then.
See
http://github.com/AndreaCrotti/Emacs-conf/blob/master/.emacs.d/conf/org.el
for my full emacs configuration (that file linked is only for org-mode).
prev parent reply other threads:[~2009-12-02 14:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 14:06 Restructure my org-life andrea
2009-10-19 14:47 ` Matt Lundin
2009-12-01 11:41 ` andrea
2009-12-02 11:56 ` Xavier Maillard
2009-12-02 14:45 ` andrea [this message]
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=m1skbtv3ie.fsf@47-118.eduroam.rwth-aachen.de \
--to=andrea.crotti.0@gmail.com \
--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).