emacs-orgmode
[Top][All Lists]
Advanced

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

[Orgmode] Re: Restructure my org-life


From: andrea
Subject: [Orgmode] Re: Restructure my org-life
Date: Wed, 02 Dec 2009 15:45:13 +0100
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/23.1.50 (darwin)

Xavier Maillard <address@hidden> 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).





reply via email to

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