emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Orgmode] Re: Managing appts with org-mode, diary


From: Matt Lundin
Subject: [Orgmode] Re: Managing appts with org-mode, diary
Date: Sat, 29 Jan 2011 12:42:57 -0500
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/24.0.50 (gnu/linux)

Michael Welle <address@hidden> writes:

> currently I create diary entries for my appointments, the appointments
> are marked in the calendar. This is handy because if I want to create a
> new appointment I can overview a three month period and I can see at a
> glance which days are already blocked.
>
> Now I want to manage my appointments in a more project centric
> way. For instance I work at ten projects that have ten corresponding org
> files. Now I note appointments for a certain project in the
> corresponding org file. The appointments are still marked in my
> calendar, but that is unusable slow. 

Yes, unfortunately marking org-mode entries makes the calendar is
extremely slow. IMO, the only way to use org-mode as a substitute for
the diary is to turn off calendar marking, either with the variable
calendar-mark-diary-entries-flag or by putting an ampersand in front of
the org-diary line in your diary file, e.g.,

&%%(org-diary :timestamp :sexp)

> If I use the per month org agenda view the display is way to confusing
> to get an overview and decide on which day I can make a new
> appointment.
>
> How do you deal with this problem? I can imagine to generate a
> ~/.diary file every time I add or change an appointment in org mode.
> This would speed up the process of displaying the calendar. An agenda
> view that shows a three month period or so and that has all the sub
> nodes of the days hidden might help, too. Then days, that have already
> appointments, are marked and you have to show the sub nodes if you
> need detailed information about appointments of that day.

I'm afraid a three month view wouldn't be any faster than marking three
months in the calendar. The bottleneck is the time it takes org-mode to
generate three months worth of agenda entries.

> Is somethind like that already implemented and I haven't
> found it yet ;)? Any hints are welcome.

Three suggestions:

1. Use a custom agenda command to display a weekly calendar with
   appointments only.

   --8<---------------cut here---------------start------------->8---
   ...
           ("cc" "Calendar" agenda ""
            ((org-agenda-ndays 7)
             (org-agenda-start-on-weekday 0)  ; start on Sunday
             (org-agenda-time-grid nil)
             (org-agenda-entry-types '(:timestamp :sexp))
             (org-agenda-prefix-format " %-12:t ")
             (org-deadline-warning-days 0)
             (org-agenda-include-all-todo nil)
             (org-agenda-repeating-timestamp-show-all t)
             (org-agenda-filter-preset '("-nocal1"))
             (org-agenda-hide-tags-regexp ".*")
             ))
   ...
   --8<---------------cut here---------------end--------------->8---

   Using org-agenda-entry-types makes this fairly fast, since scheduled
   and deadline entries are not even considered. Moving back and forward
   quickly with f and b is quick and efficient.

   Switching to a monthly view takes a little time, but is still a lot
   faster than marking three months of dates in the calendar.

2. Use the fancy diary display to view upcoming appointments.

   (add-hook 'diary-display-hook 'fancy-diary-display)

   The diary will only show days for which there is an appointment. I
   control the number of weeks shown with a wrapping function:

   --8<---------------cut here---------------start------------->8---
   (defun my-diary-display (weeks)
     (interactive "p")
     (let ((diary-number-of-entries (* 7 weeks)))
       (diary)))
   --8<---------------cut here---------------end--------------->8---

3. For a very nice monthly calendar, use the calendar's cal-tex export
   function (t m).

   The following defadvice will make the output a lot more readable:

   --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---

Best,
Matt






reply via email to

[Prev in Thread] Current Thread [Next in Thread]