[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Can this function be written better?
From: |
Nathan Neff |
Subject: |
[Orgmode] Can this function be written better? |
Date: |
Mon, 6 Dec 2010 12:29:37 -0600 |
I'd like to be able to easily toggle the showing/hiding of CLOSED clock
items in the agenda.
I have a function that does exactly that. My Lisp is terrible (I bet that's
never been said before :-) and I want to try to improve it.
Any suggestions how to improve/refactor the following function?
(defun njn/agenda-toggle-show-closed()
"Toggle whether closed clock thingies are shown in the agenda"
(interactive)
(if (eq njn/org-agenda-show-closed 't)
(progn (setq org-agenda-log-mode-items (quote (clock)))
(setq njn/org-agenda-show-closed nil)
(message "NOT Showing closed clock entries in agenda"))
(progn (setq org-agenda-log-mode-items (quote (closed clock)))
(setq njn/org-agenda-show-closed 't)
(message "Showing closed clock entries in agenda"))
))
Thanks,
--Nate
- [Orgmode] Can this function be written better?,
Nathan Neff <=