all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Emanuel Berg <embe8573@student.uu.se>
To: help-gnu-emacs@gnu.org
Subject: Re: Daily Diary Display in Emacs emacs24	24.4+1-5
Date: Sat, 24 Oct 2015 02:20:59 +0200	[thread overview]
Message-ID: <87r3kl6rro.fsf@debian.uxu> (raw)
In-Reply-To: 20151023161109.6dbb5fae@jhegaala.localdomain

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	other threads:[~2015-10-24  0:20 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-23 16:24 Daily Diary Display in Emacs emacs24 24.4+1-5 Charles Curley
2015-10-23 20:44 ` Emanuel Berg
2015-10-23 22:11   ` Charles Curley
2015-10-24  0:20     ` Emanuel Berg [this message]
2015-10-24  0:28 ` John Mastro
2015-10-24 15:44 ` Stephen Berman
2015-10-24 17:48 ` Charles Curley
2015-10-26 22:44   ` Charles Curley
2015-10-27  0:11     ` Emanuel Berg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3kl6rro.fsf@debian.uxu \
    --to=embe8573@student.uu.se \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.