[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: how to create a one page weekly schedule
From: |
Matt Lundin |
Subject: |
[Orgmode] Re: how to create a one page weekly schedule |
Date: |
Thu, 27 Jan 2011 09:54:35 -0500 |
User-agent: |
Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux) |
Detlef Steuer <address@hidden> writes:
> Dear org-ers,
>
> I would like to get a "normal" weekly landscape schedule out of my
> agenda.
> Now I _really_ would like to see or export to something like:
>
> * Schedule for 17.1. - 21.1.2011
> | | Mo | Tu | We | Th | Fr |
> | 8-9 | | | | | |
> | 9-10 | 9:00 lecture b | | | | |
> | 10-11 | -- 10:30 | | | | |
> | ... | ..and so on | ... | .... | .. | .. |
> | 16-17 | | | | | lecture a |
> | 17-18 | | | | | |
> | 19-20 | | | sport | | |
> | 20-21 | | | sport | | |
>
>
> Is that already possible? Has anyone implemented such a scheme?
> Any ideas how to achieve such a look, may be using external tools?
>
Not that I know of. The closest I've come is the calendar's monthly
LaTeX export. (t m in the calendar buffer)
To see only appointments, I put the following line in my diary file:
--8<---------------cut here---------------start------------->8---
&%%(org-diary :timestamp :sexp)
--8<---------------cut here---------------end--------------->8---
I also advise the function org-diary so as to bind a custom
org-agenda-prefix-format (suitable for the calendar export):
--8<---------------cut here---------------start------------->8---
(defadvice org-diary (around my-org-diary activate)
(let ((org-agenda-prefix-format "%t %s "))
ad-do-it))
--8<---------------cut here---------------end--------------->8---
I imagine one could create a babel function that finds the relevant
entries and then inserts them at the appropriate places in a table. For
instance, this snippet will return a list of strings (with helpful text
properties) of all appointments within the next seven days:
--8<---------------cut here---------------start------------->8---
(let ((day 0)
(items nil)
dates date)
(while (< day 7)
(add-to-list 'dates (calendar-current-date day) t)
(setq day (1+ day)))
(org-prepare-agenda-buffers org-agenda-files)
(while (setq date (pop dates))
(mapc (lambda (file)
(setq items
(append items
(org-agenda-get-day-entries file date :timestamp
:sexp))))
org-agenda-files))
items)
--8<---------------cut here---------------end--------------->8---
One could expand this expression to sort the items and place them in a
table within an org buffer.
Best,
Matt