From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Lundin Subject: Re: Managing appts with org-mode, diary Date: Sat, 29 Jan 2011 12:42:57 -0500 Message-ID: <87zkqj8v32.fsf@fastmail.fm> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from [140.186.70.92] (port=33847 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PjEpB-0006Nm-5v for emacs-orgmode@gnu.org; Sat, 29 Jan 2011 12:43:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PjEp9-0005Zx-JG for emacs-orgmode@gnu.org; Sat, 29 Jan 2011 12:43:00 -0500 Received: from out1.smtp.messagingengine.com ([66.111.4.25]:55074) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PjEp9-0005YV-Bt for emacs-orgmode@gnu.org; Sat, 29 Jan 2011 12:42:59 -0500 In-Reply-To: (Michael Welle's message of "Wed, 26 Jan 2011 13:17:01 +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: Michael Welle Cc: emacs-orgmode@gnu.org Michael Welle 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