help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Daily Diary Display in Emacs emacs24 24.4+1-5


From: Emanuel Berg
Subject: Re: Daily Diary Display in Emacs emacs24 24.4+1-5
Date: Sat, 24 Oct 2015 02:20:59 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.4 (gnu/linux)

Charles Curley <charlescurley@charlescurley.com>
writes:

> Yeah, I know it's disorganized. I've been using
> emacs since version 19.x, and across that many
> version, it just metastasizes.

At least your code did ;)

> I don't think it's a matter of the current code not
> working (as far as I know). It's a matter what used
> to work no longer does so. Since I have not changed
> my code going from 23 to 24, that suggests the
> problem is somewhere in emacs.

As you know, it has been known to happen, that code
that worked in one version doesn't work in the next.
And, if it "works" in the sense it doesn't produce an
error message but seizes to produce the desired
behavior, then it sort of doesn't work, does it?
Always, the cleaner the code, the more easy to
troubleshoot whatever the scenario...

> Exactly. I leave my desktops on 24/7 whenever I can.
>
> I can get it to do what I want manually. M-x diary
> does it. I suspect there's a hook in there somewhere
> to which I should be adding some code which
> ultimately calls diary.
>
> What I don't know is, what used to tell emacs to run
> diary every night? That is what is no
> longer working.

Examine the calendar and/or diary variables,
documentation, and so on.

You can schedule it manually ~like this:

(require 'cl-lib)

(defvar my-timer)
(setq my-timer (timer-create))

(defvar *its* 0)
(setq *its* 0)

;; replace this with a diary updating function
(defun every-five ()
  (message "Five! %s"(make-string (cl-incf *its*) ?\.)))

(timer-set-function my-timer 'every-five)
(timer-set-time my-timer (current-time) 5) ; once a day = every 86400 second!
(timer-activate my-timer)
;; (cancel-timer my-timer)

-- 
underground experts united
http://user.it.uu.se/~embe8573




reply via email to

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