* agenda files list
@ 2009-10-20 3:15 Eraldo Helal
2009-10-20 3:24 ` Eraldo Helal
0 siblings, 1 reply; 2+ messages in thread
From: Eraldo Helal @ 2009-10-20 3:15 UTC (permalink / raw)
To: Org-Mode
I would like to have a list of all agenda files
where each item links to its file.
This would be great for doing my weekly review since in my system all
agenda files need to be viewed weekly.
It could also be added to the agenda menu (C-c a) as an option.
Workaround:
Because I don't know how to get a nice looking list of all my agenda files...
shabble came up with some code which I modified and the result is below:
;; list all agenda-files (linking to them) in a new buffer
(defun list-agenda-files()
"Create a list of all org-agenda files as org-mode links"
(interactive)
(let ((list-buf (get-buffer-create "*org-agenda-files*")))
(with-current-buffer list-buf
(erase-buffer)
(insert "Agenda Files:\n")
(dolist (file org-agenda-files)
(let
((desc (first (split-string (file-name-nondirectory file) "\\.org$"))))
(insert (concat "- [[" file "][" desc "]]\n"))
)
)
(org-mode)
)
(switch-to-buffer list-buf))
If anyone else has use for this please give some feedback.
If someone could help us make this code more mature... please do the same.
Greetings,
Eraldo
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: agenda files list
2009-10-20 3:15 agenda files list Eraldo Helal
@ 2009-10-20 3:24 ` Eraldo Helal
0 siblings, 0 replies; 2+ messages in thread
From: Eraldo Helal @ 2009-10-20 3:24 UTC (permalink / raw)
To: Org-Mode
code update:
;; list all agenda categories (linking to their files) in a new buffer
(defun orgx-list-agenda-files()
"Create a list of all org-agenda files as org-mode links"
(interactive)
(let ((list-buf (get-buffer-create "*org-agenda-files*")))
(with-current-buffer list-buf
(erase-buffer)
(insert "* Org Agenda Files\n")
(dolist (file org-agenda-files)
(let ((desc (file-name-sans-extension (file-name-nondirectory file))))
(insert (concat "- [[" file "][" desc "]]\n")))))
(switch-to-buffer list-buf))
(org-mode)
(goto-char (point-min))
(org-cycle '(3)))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-10-20 3:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-20 3:15 agenda files list Eraldo Helal
2009-10-20 3:24 ` Eraldo Helal
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.