emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Lundin <mdl@imapmail.org>
To: Detlef Steuer <detlef.steuer@gmx.de>
Cc: emacs-orgmode@gnu.org
Subject: Re: how to create a one page weekly schedule
Date: Thu, 27 Jan 2011 09:54:35 -0500	[thread overview]
Message-ID: <87vd1aqtw4.fsf@fastmail.fm> (raw)
In-Reply-To: <20110121111721.55ec7fb9@gaia.hsu-hh.de> (Detlef Steuer's message of "Fri, 21 Jan 2011 11:17:21 +0100")

Detlef Steuer <detlef.steuer@gmx.de> 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

  reply	other threads:[~2011-01-27 14:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21 10:17 how to create a one page weekly schedule Detlef Steuer
2011-01-27 14:54 ` Matt Lundin [this message]
2011-02-11 15:07 ` Bastien

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87vd1aqtw4.fsf@fastmail.fm \
    --to=mdl@imapmail.org \
    --cc=detlef.steuer@gmx.de \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).