From: Jason Bastek <jason@panix.com>
Subject: time.el and display-time-mail-function
Date: Wed, 7 Sep 2005 12:24:27 -0400 (EDT) [thread overview]
Message-ID: <200509071624.j87GOR812040@panix5.panix.com> (raw)
Hello,
Recently I tried to write a custom display-time-mail-function, as
provided for in time.el (my mail system was being converted from mbox
to maildir++ format, so I had to check for the existence of files in a
directory, rather than for the existence of a single file).
However I think there's a problem in the logic in time.el. In
function display-time-update, it has the following:
(mail (or (and display-time-mail-function
(funcall display-time-mail-function))
(and (stringp mail-spool-file)
where display-time-mail-function is a user-definable function, which
seems like the perfect thing for my situation. The problem is the
"or" -- if my display-time-mail-function returns nil (to indicate that
there is no new mail), instead of stopping there, it will continue
with the standard mail-spool-file check.
I believe this logic is wrong, and it could be fixed by changing the
"or" to a "cond"/"if", e.g.:
(mail (if display-time-mail-function
(funcall display-time-mail-function)
(and (stringp mail-spool-file)
Does this seem like a reasonable change to make? It seems that,
without this change, display-time-mail-function is useless. But maybe
I'm missing some aspect.
Thanks,
-Jason
next reply other threads:[~2005-09-07 16:24 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-07 16:24 Jason Bastek [this message]
2005-09-08 17:00 ` time.el and display-time-mail-function Richard M. Stallman
2005-09-08 20:53 ` Jason Bastek
2005-09-09 12:50 ` Richard M. Stallman
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=200509071624.j87GOR812040@panix5.panix.com \
--to=jason@panix.com \
/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.