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

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

[emacs-wiki-discuss] Re: Weekly/Monthly Appointment View


From: Edgar Gonçalves
Subject: [emacs-wiki-discuss] Re: Weekly/Monthly Appointment View
Date: Fri, 23 Jun 2006 15:55:14 +0100
User-agent: Gnus/5.110006 (No Gnus v0.6)

This morning, René j. wrote:
> I personaly use the weekly-view code configuration but I get the following
> error message:
>
>         "Symbol's value as variable is void: fancy-diary-display-mode-map"
>
> Do you know where this variable is supposed to be defined?

Well, I have it defined in diary-lib.el, and that file comes in my Emacs lisp
dir. I'm using GNU Emacs 22.0.50.1 (i386-mingw-nt5.2.3790) of 2006-06-08 on
W2ONE.

Now it is odd, since weekly-view requires cal-desk-calendar, and this one
requires diary-lib... You may want to double check that in your files, and if
they are being required in time.

>  
> I also have the following message:
>
>      "Symbol's function definition is void"
>
> for the following functions: 
>
>  `diary-view-entries' called by `week-graph-view-diary-entries'
>  (ie, "W" in calendar-mode-map)
>
>  `diary-include-planner-appts' called by `day-view-planner-appt-entries'
>  ("d" in calendar-mode-map),
>
> I do not manage to find their definition.  Can anyone provide me with these
> functions' definition.
While diary-view-entries is in diary-lib.el, the other function was made by me.
I believe I sent it along with the rest of the configuration, but I'll post it
again:

|´--------
|(require 'cal-desk-calendar)
|(setq diary-default-schedule-start-time 730)
|(setq diary-default-schedule-stop-time 2400)
|
|(defun convert-planner-times-to-diary-times (entry)
|  "\"@22:30 | 23:30 | <text>\" becomes \"22:30-23:30 <text>\"."
|  (when (string-match "@?\\([0-2]?[0-9]:[0-5]?[0-9]\\)[        ]*[|-]?[        
]*\\([0-2]?[0-9]:[0-5]?[0-9]\\)[        ]*[|-]*[        ]*\\(.*\\)$"
|                     entry)
|    (format "%s-%s %s"
|           (match-string 1 entry)
|           (match-string 2 entry)
|           (match-string 3 entry))))
|
|
|(defun diary-include-planner-appts ()
|  "Add planner appointments to `diary-entries-list'."
|  (declare (special diary-entries-list))
|  (dolist (entry diary-entries-list)
|    (setf (second entry) (convert-planner-times-to-diary-times (second 
entry)))))
|
|(defadvice fancy-schedule-display-desk-calendar (before include-planner-appts 
activate)
|  "Use `diary-include-planner-appts' function instead of the regular code."
|  (diary-include-planner-appts))
|
|
|(add-hook 'diary-display-hook 'sort-diary-entries)
|(add-hook 'diary-display-hook 'fancy-diary-display)
|(add-hook 'diary-display-hook 'fancy-schedule-display-desk-calendar t)
|`-----------


>
> BTW where is the `diary-check-diary-file' function supposed to be defined? 
> With
> XEmacs 21.4.18 it is not in diary-lib.el and therefore
> 'day-view-planner-appt-entries` cannot be executed.

Ah, now this is interesting. I have never used XEmacs, and I thought the diary
libraries would be pretty much the same in both XEmacs and GNU Emacs... Try
grepping for that function's name in your XEmacs lisp dir, and see if something
comes up... (hint, the `diary' command is calling that on top of everything
else, and I gess you must have that command in XEmacs, so see that function and
try to find if XEmacs uses some other name for that code.)

>
> Same question with `fancy-diary-display-mode-map'.  Where is this variable
> supposed to be defined.  When I evaluate the following piece of code
>
> (define-key fancy-diary-display-mode-map "d" 'day-view-planner-appt-entries)
>
> I get an error.

Same goes for here. It would seem like XEmacs has it's own diary-lib.el
equivalent! 

>
> Thanks for your help.
> --
> View this message in context: 
> http://www.nabble.com/Weekly-Monthly-Appointment-View-t1795866.html#a5007160
> Sent from the emacs-wiki-discuss forum at Nabble.com.

-- 
Edgar Gonçalves
Software Engineering Group @ INESC-ID
IST/Technical University of Lisbon
Rua Alves Redol, 9, Room 635              
1000-029 Lisboa, Portugal                 
mailto:edgar[DOT]goncalves[AT]inesc[DASH]id[DOT]pt
http://www.esw.inesc-id.pt/~eemg





reply via email to

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