From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: how to create a one page weekly schedule Date: Thu, 27 Jan 2011 09:54:35 -0500 Message-ID: <87vd1aqtw4.fsf@fastmail.fm> References: <20110121111721.55ec7fb9@gaia.hsu-hh.de> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=44753 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PiTFA-0000lX-Ma for emacs-orgmode@gnu.org; Thu, 27 Jan 2011 09:54:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PiTF9-0003OC-4k for emacs-orgmode@gnu.org; Thu, 27 Jan 2011 09:54:40 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:36953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PiTF8-0003Nk-Sj for emacs-orgmode@gnu.org; Thu, 27 Jan 2011 09:54:39 -0500 In-Reply-To: <20110121111721.55ec7fb9@gaia.hsu-hh.de> (Detlef Steuer's message of "Fri, 21 Jan 2011 11:17:21 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Detlef Steuer Cc: emacs-orgmode@gnu.org Detlef Steuer 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