[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[emacs-wiki-discuss] changing planner-directory on the fly
From: |
Raymond Zeitler |
Subject: |
[emacs-wiki-discuss] changing planner-directory on the fly |
Date: |
Wed, 30 Jun 2004 12:06:44 -0400 |
Hello again!
I wrote a function to allow for multiple planner-directories. In my
case, I'm trying to keep Work and Personal separate. The code follows.
When I first tried using Planner, I intended to use it to maintain a
personal journal. But seeing what all of you do with Planner inspired
me to use it for work as well. And it's very helpful!
Anyway, here is the code. I wrote it hastily. I'd prefer to close
all Planner buffers before changing planner-directory rather than just
save them. I'll make that change when I get some more time. As well,
the publishing directory will need to be split eventually, but since I
don't publish yet, that's a very low priority task.
Your comments and criticisms will be appreciated.
(defun select-planner-directory (&optional arg)
"Change `planner-directory' to either a Work or a Personal directory.
Use \\[universal-argument] to set `planner-directory' to
`spd-planner-personal-directory'.
Otherwise set it to `spd-planner-work-directory'."
(interactive "*P")
(let ((spd spd-planner-work-directory))
(if arg
(setq spd spd-planner-personal-directory))
(if (eq spd planner-directory)
(message "Planner is already using %s." spd)
(planner-save-buffers)
(setq planner-directory spd)
(message "Planner is switching to %s." spd)
(plan))))
--
Raymond Zeitler <address@hidden>
- [emacs-wiki-discuss] changing planner-directory on the fly,
Raymond Zeitler <=