emacs-wiki-discuss
[Top][All Lists]
Advanced

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

Re: [emacs-wiki-discuss] Re: planner-appt or diary question


From: Seth Falcon
Subject: Re: [emacs-wiki-discuss] Re: planner-appt or diary question
Date: Fri, 16 Dec 2005 08:15:15 -0800
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (darwin)

On 16 Dec 2005, address@hidden wrote:
> I would say that it could be merged in the forthcoming week.

Ha!

> I think that it should be merged into planner-appt, but that it
> needs to be tested a bit first: whether it works and whether it does
> it in the way that people would want it to be done.

Did a bit of playing with the code.  Overall, seems to be working
nicely.

I notice that the code requires planner-id (haven't looked to see how
this is being used).  At present, running this code turns on
planner-id.  I haven't ever used planner-id and am not sure I want to
unless I have to.  In testing, I am now seeing little {{Tasks:X}}
markers in my task descriptions...

One request that goes for planner-appt in general: would it be
possible to mark appts with no end time with just whitespace or '-'
instead of "''''"?  There is a separate issue with the alignment as
the following shows:

[[2005.12.17]] |  12:00 | 13:00 | # Eat some food
[[2005.12.20]] |  12:00 | ''''      | # Drink some coffee

Wanted:

[[2005.12.17]] |  12:00 | 13:00 | # Eat some food
[[2005.12.20]] |  12:00 |   -   | # Drink some coffee


In the patch below, I renamed a few of the functions so that function
names follow a consistent planner-appt-forthcoming-* pattern (and also
match the documentation better).

I also changed the formatting for appts on the same day so that you
now get (paste into a planner-mode buffer to see proper alignment) The
point was to use a bit less ink with " - " instead of "------":

* Forthcoming Appointments

[[2005.12.17]] |  10:00 | ''''      | # Wake up
[[2005.12.17][     -    ]] |  12:00 | 13:00 | # Eat some food


Best,

+ seth



Here's a patch:

--- planner-appt-forthcoming.el.orig    2005-12-16 07:28:32.000000000 -0800
+++ planner-appt-forthcoming.el 2005-12-16 08:06:09.000000000 -0800
@@ -2,7 +2,7 @@
 
 ;; Provides two interactive commands:
 ;;
-;;  `planner-appt-forthcoming-display-buffer' :: Displays a list of
+;;  `planner-appt-forthcoming-display' :: Displays a list of
 ;;      appointments in the next few days.  The default number of days
 ;;      is set by the variable `planner-appt-forthcoming-days'.  A
 ;;      prefix argument may be used to over-ride this value, for
@@ -21,7 +21,7 @@
 ;;
 ;; Other interesting variables and functions:
 ;;
-;;  `planner-appt-forthcoming-appt-section' :: This is the title of
+;;  `planner-appt-forthcoming-section' :: This is the title of
 ;;      the section in day pages that contains the forthcoming
 ;;      appointments list. By default it is "Forthcoming
 ;;      Appointments", but you may change it as you please.
@@ -30,7 +30,7 @@
 ;;      which is the default, find appointments in the cyclic diary
 ;;      file as well as in plan pages.
 ;;
-;;  `planner-appt-update-forthcoming-appts-section-maybe' :: A
+;;  `planner-appt-forthcoming-update-section-maybe' :: A
 ;;      function that is a suitable for addition to planner-mode-hook.
 ;;
 ;;; Code:
@@ -207,7 +207,7 @@
                         (planner-make-link
                          (car a)
                          (when (string= (car a) last-date)
-                           "----------"))
+                           "     -    "))
                         " | "
                         ;; Remove @s from times to avoid spurious
                         ;; highlighting.
@@ -222,7 +222,7 @@
   "*Forthcoming Appointments*"
   "Buffer to display forthcoming appointments.")
 
-(defun planner-appt-display-forthcoming (&optional days)
+(defun planner-appt-forthcoming-display (&optional days)
   (interactive
    ;; TODO: I wanted to use (interactive "p"), but that defaults to
    ;; 1.  Is this really the best way of getting nil as the default
@@ -253,7 +253,7 @@
    (get-buffer-window planner-appt-forthcoming-display-buffer)))
 
 
-(defun planner-appt-update-forthcoming-appts-section (&optional days)
+(defun planner-appt-forthcoming-update-section (&optional days)
   (interactive
    (list (cond ((consp current-prefix-arg)
                 (car current-prefix-arg))
@@ -273,7 +273,7 @@
     (error "Current buffer is not today's plan page")))
 
 ;; A function suitable for planner-mode-hook
-(defun planner-appt-update-forthcoming-appts-section-maybe ()
+(defun planner-apt-forthcoming-update-section-maybe ()
   (when (planner-appt-todays-page-p)
     (planner-appt-forthcoming-update-appts-section)))
 




reply via email to

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