Dear Bug Team!
The function `run-at-time' advertises its "time" argument thusly:
,----
| TIME should be a string recognized by `timer-parse-time', like
\"11:23pm\",
| nil meaning now, a number of seconds from now, a value from `current-time',
`----
If the "time" argument is nil, it gets set to 0, per this comment:
,----[ run-at-time (timer-funcs.el) ]
| ;; Special case: nil means "now" and is useful when repeating.
| (if (null time)
| (setq time 0))
`----
It takes the "time" argument and sends it on to the function
`start-itimer', which advertises the corresponding "value" argument
thusly:
,----
| VALUE is the number of seconds until this itimer expires.
| If your version of Emacs supports floating point numbers then
| VALUE can be a floating point number. Otherwise it
| must be an integer.
`----
`start-itimer' checks that the provided "value" (our original
"time")
argument is nonnegative:
,----[ start-itimer (itimer.el) ]
| (check-nonnegative-number value)
`----
Again, that suggests that 0, being nonnegative, is a valid value
here. `start-itimer' then passes "value" on unchanged to
`activate-itimer'.
Finally, `activate-itimer' checks
,----[ activate-itimer (itimer.el) ]
| (if (<= (itimer-value itimer) 0)
| (error "itimer timeout value not positive: %s" (itimer-value itimer)))
`----
Despite the advertised interface in both `run-at-time' and
`start-itimer', we cannot schedule a timer for "now" using 0 or nil
for the expiration time; `activate-itimer' rejects both with the error
above.
The variable `itimer-short-interval' looks like it would make a
suitable value for an "immediate" expiration, but the documentation
for both `run-at-time' and `start-itimer' suggest that the user should
be able to indicate "now" or "immediate" with either 0 or null.
One possible solution is to change start-itimer as follows:
To exercise this bug, try executing a form like:
(run-at-time nil
nil #'(lambda () (message "Timer expired.")))
================================================================
System Info to help track down your bug:
---------------------------------------
uname -a: CYGWIN_NT-5.0 TSUNAMI 1.3.20(0.73/3/2) 2003-02-08 12:10 i686 unknown unknown
Cygwin
./configure '--with-dragndrop' '--with-postgresql=no'
'--with-x=no' '--bindir=/usr/local/bin/i686-pc-cygwin'
'--with-site-lisp=yes' '--with-ipv6-cname=no' '--with-netinstall'
XEmacs 21.4.13 "Rational FORTRAN" configured for `i686-pc-cygwin'.
Compilation / Installation:
Source code location: /development/xemacs/xemacs-21.4-release
Installation prefix: /usr/local
Operating system description file: `s/cygwin32.h'
Machine description file: `m/intel386.h'
Compiler: gcc
-I/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../include/noX
-I/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../../include/noX -g -O3 -Wall -Wno-switch
-Winline -Wmissing-prototypes -Wsign-compare -Wshadow -Wpointer-arith
Relocating allocator for buffers: no
GNU version of malloc: yes
Window System:
Compiling in support for the Microsoft window system.
Using MS-Windows menubars.
Using MS-Windows scrollbars.
Using MS-Windows dialog boxes.
Using MS-Windows native widgets.
Compiling in support for Drag'n'Drop (EXPERIMENTAL).
- Drag'n'Drop prototype: msw.
TTY:
Compiling in support for ncurses.
Images:
Compiling in support for GIF images (builtin).
Compiling in support for XPM images.
Compiling in support for PNG images.
Compiling in support for JPEG images.
Compiling in support for TIFF images.
Compiling in support for X-Face message headers.
Sound:
Compiling in support for sound (native).
Databases:
Compiling in support for GNU DBM.
Internationalization:
Compiling in support for file coding.
Mail:
Compiling in support for POP mail retrieval.
Other Features:
Inhibiting IPv6 canonicalization at startup.
Compiling in support for dynamic shared object modules.
Load-Path Lisp Shadows:
----------------------
(/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/sha1
/usr/local/lib/xemacs/xemacs-packages/lisp/ecrypto/sha1
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/password
/usr/local/lib/xemacs/xemacs-packages/lisp/ecrypto/password
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/md4
/usr/local/lib/xemacs/xemacs-packages/lisp/ecrypto/md4
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/hex-util
/usr/local/lib/xemacs/xemacs-packages/lisp/ecrypto/hex-util
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/encrypt
/usr/local/lib/xemacs/xemacs-packages/lisp/ecrypto/encrypt
/usr/local/lib/common-lisp/slime/tree-widget
/usr/local/lib/xemacs/xemacs-packages/lisp/jde/tree-widget
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/tls
/usr/local/lib/xemacs/xemacs-packages/lisp/mail-lib/tls
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/starttls
/usr/local/lib/xemacs/xemacs-packages/lisp/mail-lib/starttls
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/rfc2104
/usr/local/lib/xemacs/xemacs-packages/lisp/mail-lib/rfc2104
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/pop3
/usr/local/lib/xemacs/xemacs-packages/lisp/mail-lib/pop3
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/netrc
/usr/local/lib/xemacs/xemacs-packages/lisp/mail-lib/netrc
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/dns
/usr/local/lib/xemacs/xemacs-packages/lisp/net-utils/dns
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/dig
/usr/local/lib/xemacs/xemacs-packages/lisp/net-utils/dig
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/pgg
/usr/local/lib/xemacs/xemacs-packages/lisp/pgg/pgg
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/pgg-pgp5
/usr/local/lib/xemacs/xemacs-packages/lisp/pgg/pgg-pgp5
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/pgg-pgp
/usr/local/lib/xemacs/xemacs-packages/lisp/pgg/pgg-pgp
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/pgg-parse
/usr/local/lib/xemacs/xemacs-packages/lisp/pgg/pgg-parse
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/pgg-gpg
/usr/local/lib/xemacs/xemacs-packages/lisp/pgg/pgg-gpg
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/pgg-def
/usr/local/lib/xemacs/xemacs-packages/lisp/pgg/pgg-def
/usr/local/lib/common-lisp/slime/cl-indent
/usr/local/lib/xemacs/xemacs-packages/lisp/prog-modes/cl-indent
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/sasl
/usr/local/lib/xemacs/xemacs-packages/lisp/sasl/sasl
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/sasl-ntlm
/usr/local/lib/xemacs/xemacs-packages/lisp/sasl/sasl-ntlm
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/sasl-digest
/usr/local/lib/xemacs/xemacs-packages/lisp/sasl/sasl-digest
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/sasl-cram
/usr/local/lib/xemacs/xemacs-packages/lisp/sasl/sasl-cram
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/ntlm
/usr/local/lib/xemacs/xemacs-packages/lisp/sasl/ntlm
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/hmac-md5
/usr/local/lib/xemacs/xemacs-packages/lisp/sasl/hmac-md5
/home/sharris/usr/local/lib/xemacs/site-packages/lisp/gnus/hmac-def
/usr/local/lib/xemacs/xemacs-packages/lisp/sasl/hmac-def
/usr/local/lib/xemacs/xemacs-packages/lisp/build/build-report
/usr/local/lib/xemacs-21.4.13/lisp/build-report)
Installed XEmacs Packages:
-------------------------
(zenirc ver: 1.15 upstream: 2.112)
(xslt-process ver: 1.11 upstream: regular)
(xslide ver: 1.09 upstream: 0.2.2)
(xemacs-devel ver: 1.7 upstream: No-Upstream-Ver)
(xemacs-base ver: 1.96 upstream: No-Upstream-Ver)
(x-symbol ver: 1.1 upstream: 4.5.1)
(w3 ver: 1.3 upstream: 4.0pre47)
(viper ver: 1.38 upstream: 3.09)
(view-process ver: 1.13 upstream: 2.4)
(vc ver: 1.4 upstream: No-Upstream-Ver)
(tramp ver: 1.22 upstream: 2.0.47)
(time ver: 1.14 upstream: 1.17)
(textools ver: 1.15 upstream: No-Upstream-Ver)
(text-modes ver: 1.84 upstream: No-Upstream-Ver)
(texinfo ver: 1.28 upstream: No-Upstream-Ver)
(speedbar ver: 1.27 upstream: 0.14beta4)
(sounds-wav ver: 1.12 upstream: No-Upstream-Ver)
(sh-script ver: 1.18 upstream: 2.0e)
(sgml ver: 1.11 upstream: No-Upstream-Ver)
(semantic ver: 1.19 upstream: 1.4.2)
(scheme ver: 1.14 upstream: No-Upstream-Ver)
(sasl ver: 1.15 upstream: 1.14.4)
(ruby-modes ver: 1.02 upstream: 1.6.8)
(rmail ver: 1.14 upstream: No-Upstream-Ver)
(reftex ver: 1.34 upstream: 4.21)
(python-modes ver: 1.06 upstream: No-Upstream-Ver)
(psgml-dtds ver: 1.03 upstream: No-Upstream-Ver)
(psgml ver: 1.43 upstream: 1.3.1)
(ps-print ver: 1.11 upstream: 6.5.6)
(prog-modes ver: 2.02 upstream: No-Upstream-Ver)
(pgg ver: 1.05 upstream: 0.1)
(perl-modes ver: 1.07 upstream: No-Upstream-Ver)
(pcomplete ver: 1.04 upstream: 1.1.6)
(pcl-cvs ver: 1.66 upstream: R-2_9_9)
(pc ver: 1.27 upstream: No-Upstream-Ver)
(os-utils ver: 1.36 upstream: No-Upstream-Ver)
(net-utils ver: 1.44 upstream: N/A)
(mmm-mode ver: 1.02 upstream: 0.4.7)
(mh-e ver: 1.28 upstream: 7.4.2)
(mailcrypt ver: 2.14 upstream: 3.5.8)
(mail-lib ver: 1.71 upstream: No-Upstream-Ver)
(jde ver: 1.46 upstream: regular)
(ispell ver: 1.31 upstream: 3.6)
(ilisp ver: 1.33 upstream: 5.12.0)
(igrep ver: 1.13 upstream: 2.111)
(ibuffer ver: 1.09 upstream: No-Upstream-Ver)
(hm--html-menus ver: 1.23 upstream: 5.9)
(haskell-mode ver: 1.07 upstream: 1.45)
(general-docs ver: 1.03 upstream: No-Upstream-Ver)
(fsf-compat ver: 1.15 upstream: No-Upstream-Ver)
(frame-icon ver: 1.11 upstream: No-Upstream-Ver)
(footnote ver: 1.16 upstream: 0.18x)
(eudc ver: 1.39 upstream: 1.32)
(eterm ver: 1.15 upstream: No-Upstream-Ver)
(ess ver: 1.12 upstream: 5.2.3)
(emerge ver: 1.11 upstream: No-Upstream-Ver)
(elib ver: 1.11 upstream: 1.0)
(eieio ver: 1.05 upstream: 0.17)
(efs ver: 1.33 upstream: 1.23)
(edt ver: 1.13 upstream: No-Upstream-Ver)
(edit-utils ver: 2.22 upstream: No-Upstream-Ver)
(ediff ver: 1.51 upstream: 2.75)
(edebug ver: 1.21 upstream: No-Upstream-Ver)
(ecrypto ver: 0.19 upstream: 2.0)
(ecb ver: 1.22 upstream: 2.31)
(dired ver: 1.16 upstream: 7.12)
(dictionary ver: 1.15 upstream: 1.8)
(debug ver: 1.17 upstream: No-Upstream-Ver)
(cc-mode ver: 1.43 upstream: 5.30.9)
(calendar ver: 1.23 upstream: No-Upstream-Ver)
(calc ver: 1.26 upstream: 2.02fX3)
(c-support ver: 1.2 upstream: No-Upstream-Ver)
(build ver: 1.14 upstream: 2.02)
(bbdb ver: 1.25 upstream: 2.34)
(auctex ver: 1.46 upstream: 11.55)
(apel ver: 1.27 upstream: 10.2)
Installed Modules:
-----------------
Features:
--------
(xemacsbug shadow gnus-draft jka-compr ediff-merg ediff-diff
ediff-tbar ediff-wind ediff-help ediff-util ediff-mult ediff-init
ediff bbdb-hooks uudecode ispell bbdb-gui gnus-fun flow-fill
annotations sort gnus-cite smiley ansi-color gnus-async gnus-bcklg
gnus-ml gnus-topic nnfolder utf7 starttls nnimap imap nndraft nnmh
bbdb-gnus bbdb-snarf mail-extr bbdb-com passwd encrypt gnus-agent
gnus-srvr gnus-score score-mode nnvirtual nntp gnus-cache dabbrev
cl-specs edebug debug find-func igrep ps-print calc efs-dired
efs-x19.15 efs-fnh efs-ovwrt efs-netrc efs-defun efs efs-dump pcl-cvs
diff-mode pcl-cvs-parse pcl-cvs-info pcl-cvs-defs pcl-cvs-util
cvs-compat cookie dll elib-node build-report build cus-edit cus-load
package-get package-admin config hyper-apropos xml psgml-parse
psgml-xemacs psgml-sysdep psgml-edit tempo psgml-html cc-mode cc-fonts
cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs tex-buf
reftex-vcr reftex-dcr reftex reftex-vars outline font-latex font
disp-table latex tex advice advice-preload regexp-opt view-less view
sh-script skeleton eldoc imenu python-mode info-look info compile
efs-cu gnus-dired gnus-msg gnus-art mm-uu mml2015 pgg password
pgg-parse pgg-def mm-view gnus-sum nnoo gnus-group gnus-undo nnmail
mail-source format-spec gnus-start gnus-spec gnus-int gnus-range
gnus-win message mml mml-sec mml-smime smime dig mm-decode mm-bodies
mm-encode mailcap lpr mail-parse rfc2045 rfc2231 rfc2047 qp ietf-drums
mail-abbrevs sendmail rfc822 mailheader canlock sha1 executable
hex-util dired-faces dired-xemacs dired gnus gnus-ems gnus-xmas
messagexmas nnheader nnheaderxm run-at-time gnus-util netrc time-date
parse-time mail-utils mm-util mail-prsvr func-menu desktop boxquote
rect footnote filladapt tex-site sgml-mode psgml slime byte-optimize
bytecomp byte-compile apropos edmacro timer-funcs easy-mmode
tree-widget wid-edit overlay font-lock cus-face hyperspec thingatpt
browse-url hideshow pp timer comint ring alist bbdb timezone paren
blink-paren pending-del zenirc-autoloads xslt-process-autoloads
xslide-autoloads xemacs-devel-autoloads xemacs-base-autoloads
x-symbol-autoloads w3-autoloads viper-autoloads view-process-autoloads
vc-autoloads tramp-autoloads time-autoloads textools-autoloads
text-modes-autoloads texinfo-autoloads speedbar-autoloads
sounds-wav-autoloads sh-script-autoloads sgml-autoloads
semantic-autoloads scheme-autoloads sasl-autoloads
ruby-modes-autoloads rmail-autoloads reftex-autoloads
python-modes-autoloads psgml-dtds-autoloads psgml-autoloads
ps-print-autoloads prog-modes-autoloads pgg-autoloads
perl-modes-autoloads pcomplete-autoloads pcl-cvs-autoloads
pc-autoloads os-utils-autoloads net-utils-autoloads mmm-mode-autoloads
mh-e-autoloads mailcrypt-autoloads mail-lib-autoloads jde-autoloads
ispell-autoloads ilisp-autoloads igrep-autoloads ibuffer-autoloads
hm--html-menus-autoloads haskell-mode-autoloads general-docs-autoloads
fsf-compat-autoloads frame-icon-autoloads footnote-autoloads
eudc-autoloads eterm-autoloads ess-autoloads emerge-autoloads
elib-autoloads eieio-autoloads efs-autoloads edt-autoloads
edit-utils-autoloads ediff-autoloads edebug-autoloads
ecrypto-autoloads ecb-autoloads dired-autoloads dictionary-autoloads
debug-autoloads cc-mode-autoloads calendar-autoloads calc-autoloads
c-support-autoloads build-autoloads bbdb-autoloads auctex-autoloads
apel-autoloads lisp-autoloads loadhist auto-show fontl-hooks code-cmds
gutter-items menubar-items x-menubar dragdrop mode-motion mouse itimer
auto-save lisp-mode easymenu iso8859-1 page buff-menu lib-complete
help-nomule cus-file derived frame text-props obsolete cus-start
custom widget cl-extra mini-cl cl cl-19 packages backquote
very-early-lisp file-coding mswindows-scrollbars mswindows tty-frames
tty toolbar native-sound scrollbar unix-processes multicast
network-streams subprocesses modules menu-accelerator-support menubar
dbm md5 xemacs gutter tiff png gif jpeg xface xpm xbm lisp-float-type
cygwin32 dragdrop-api dialog devices window-system base64)
Recent keystrokes:
-----------------
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p misc-user h E C-p
C-p RET q 1 g RET RET L R Sh-RET C-u Z N q 1 g C-p
C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p C-p
C-p C-p C-p C-p C-p C-p RET RET q C-p M-x r e p TAB
o TAB r TAB x e TAB RET C-g misc-user misc-user C-n
C-n C-n C-n M-x r e p TAB o r TAB x e TAB b BS RET
Recent messages (most recent first):
-----------------------------------
Making completion list...
Quit
Loading xemacsbug...done
Loading xemacsbug...
Making completion list...
Making completion list...
--
Steven E. Harris
Show replies by date