[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [emacs-wiki-discuss] Re: planner-appt: fix XEmacs initialization
From: |
Jim Ottaway |
Subject: |
Re: [emacs-wiki-discuss] Re: planner-appt: fix XEmacs initialization |
Date: |
Mon, 30 Jan 2006 12:01:23 +0000 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux) |
>>>>> René <address@hidden> writes:
> Jim Ottaway <j.ottaway <at> lse.ac.uk> writes:
>> I think this patch should fix the initialization of planner-appt for
>> XEmacs. I looked at the documentation for XEmacs's appt.el; it says
>> that display-time is required before appt-initialize.
> I still don't manage to have my planner-cyclic-diary-file be taken as source
> to
> update plan pages.
> Here is the backtrace:
> Debugger entered--Lisp error: (error "You don't have a diary file!")
> signal(error ("You don't have a diary file!"))
> cerror("You don't have a diary file!")
> apply(cerror "You don't have a diary file!" nil)
> error("You don't have a diary file!")
> diary(1)
> appt-diary-entries()
> appt-initialize()
> (cond ((fboundp ...) (appt-activate 1)) ((fboundp ...) (display-time)
> (appt-initialize)) (t (display-time) (add-hook ... ...)))
> planner-appt-insinuate()
I see. It looks like more is needed to make this just work with
XEmacs. Here is a further patch. Does this work?
Location: http://www.users.zetnet.co.uk/jeho/archives/2005
Archive name: address@hidden
Branch: planner--jeho--1.1
Patch: 45
Regards,
--
Jim Ottaway
--- orig/planner-appt.el
+++ mod/planner-appt.el
@@ -1483,6 +1483,12 @@
(cond ((fboundp 'appt-activate) ; Gnu Emacs >= 22
(appt-activate 1))
((fboundp 'appt-initialize) ; Xemacs
+ ;; appt-initialize needs a diary file, so create one if it
+ ;; doesn't already exist
+ (unless (file-exists-p diary-file)
+ (with-temp-buffer
+ (insert ?\n)
+ (write-region (point-min) (point-max) diary-file)))
(display-time)
(appt-initialize))
(t (display-time) ; Gnu Emacs < 22