Subject: bug#8337: 23.3; Appointment shadow another one with different warning time

From: Ivan Kanis <[email-masked]>
Date: Thu, 24 Mar 2011 16:55:25 +0100

Imagine having an appointment at 10:22 with 1 minute warning and another
one at 10:23 with 3 minutes warning. At 10:21 only the first one will be
shown. However the second should be displayed as well. The following
code will show the problem (you might need to evaluate if a few time):

(defun add-appt (seconds-from-now msg warntime)
  (appt-add
   (format-time-string
    "%H:%M"
    (let ((time (current-time)))
      (cons (nth 0 time)
            (+ seconds-from-now (nth 1 time))))) msg warntime))

(progn
  (add-appt 60 "first" 60)
  (add-appt 120 "second" 180)
  (appt-check)
  (setq appt-time-msg-list nil))

I expect "first" and "second" to be displayed in the appointment buffer.

In GNU Emacs 23.3.2 (i686-pc-linux-gnu, GTK+ Version 2.22.0)
 of 2011-03-16 on tao
Windowing system distributor `The X.Org Foundation', version 11.0.10900000
configured using `configure  '--prefix=/home/ubuntu/emacs''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: fr_FR.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t

Major mode: Emacs-Lisp

Minor modes in effect:
  diff-auto-refine-mode: t
  icomplete-mode: t
  erc-track-mode: t
  erc-track-minor-mode: t
  erc-ring-mode: t
  erc-netsplit-mode: t
  erc-match-mode: t
  erc-pcomplete-mode: t
  erc-button-mode: t
  erc-fill-mode: t
  erc-stamp-mode: t
  erc-autojoin-mode: t
  erc-irccontrols-mode: t
  erc-noncommands-mode: t
  erc-scrolltobottom-mode: t
  shell-dirtrack-mode: t
  show-paren-mode: t
  outline-minor-mode: t
  tracking-mode: t
  mouse-wheel-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t

Recent input:
<up> <up> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> C-e <escape> M-f <escape> M-b <escape> C-b <up> 
<up> <up> <up> <up> <up> <left> <left> <left> <left> 
<escape> C-f <escape> <escape> <escape> <escape> C-b 
<escape> C-f <escape> C-b <next> <prior> <insert> <insert> 
<insert> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<up> C-e <up> <up> <down> <left> <backspace> 0 C-n 
C-e M-j M-j g b u g M-j M-j g M-j M-j u M-1 g <insert> 
<insert> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <prior> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <up> <up> <up> 
<up> <up> <up> <up> <up> <up> <up> <up> <escape> C-f 
M-j M-j <insert> M-j M-j M-0 <insert> M-j M-j M-j M-j 
M-1 M-j M-j M-j M-j M-j M-j <up> <left> <backspace> 
1 <down> C-e M-j M-j M-1 M-j M-j M-j M-j M-1 M-j M-j 
M-j M-j M-j M-j M-1 M-j M-j p <backspace> C-p C-p C-a 
C-k C-n C-p C-y C-n C-y C-e M-j M-j M-1 M-j M-j M-j 
M-j M-0 M-k M-k C-p C-p C-a C-p C-n C-n C-k C-e M-j 
M-j M-j M-j C-p C-a ; ; C-n C-e M-1 M-j M-j M-j M-j 
M-j M-j M-x b u g <backspace> <backspace> <backspace> 
r e p o r <tab> b u g <return>

Recent messages:
nil
/media/Iomega_HDD/fresh/Matt & Kim/Sidewalks/03 Cameras.mp3 [2 times]
No breakpoint here
Go...
nil
appt-check
nil [13 times]
Mark set [2 times]
nil [8 times]
/media/Iomega_HDD/fresh/Matt & Kim/Sidewalks/04 Red Paint.mp3 [2 times]

Load-path shadows:
~/hg/lisp/dictionary/lpath hides ~/hg/lisp/auctex/lpath
~/hg/lisp/misc/whitespace hides /home/ubuntu/emacs/share/emacs/23.3/lisp/whitespace
~/hg/lisp/misc/term hides /home/ubuntu/emacs/share/emacs/23.3/lisp/term
~/hg/lisp/misc/time hides /home/ubuntu/emacs/share/emacs/23.3/lisp/time
~/hg/lisp/org/org-publish hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-publish
~/hg/lisp/org/org-latex hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-latex
~/hg/lisp/org/org-gnus hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-gnus
~/hg/lisp/org/org-compat hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-compat
~/hg/lisp/org/org-jsinfo hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-jsinfo
~/hg/lisp/org/org-irc hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-irc
~/hg/lisp/org/org-install hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-install
~/hg/lisp/org/org-inlinetask hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-inlinetask
~/hg/lisp/org/org-info hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-info
~/hg/lisp/org/org-indent hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-indent
~/hg/lisp/org/org-id hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-id
~/hg/lisp/org/org-icalendar hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-icalendar
~/hg/lisp/org/org-html hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-html
~/hg/lisp/org/org-habit hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-habit
~/hg/lisp/org/org hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org
~/hg/lisp/org/org-xoxo hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-xoxo
~/hg/lisp/org/org-wl hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-wl
~/hg/lisp/org/org-w3m hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-w3m
~/hg/lisp/org/org-vm hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-vm
~/hg/lisp/org/org-timer hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-timer
~/hg/lisp/org/org-table hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-table
~/hg/lisp/org/org-src hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-src
~/hg/lisp/org/org-rmail hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-rmail
~/hg/lisp/org/org-remember hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-remember
~/hg/lisp/org/org-protocol hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-protocol
~/hg/lisp/org/org-plot hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-plot
~/hg/lisp/org/org-mouse hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-mouse
~/hg/lisp/org/org-mobile hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-mobile
~/hg/lisp/org/org-mhe hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-mhe
~/hg/lisp/org/org-mew hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-mew
~/hg/lisp/org/org-macs hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-macs
~/hg/lisp/org/org-mac-message hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-mac-message
~/hg/lisp/org/org-list hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-list
~/hg/lisp/org/org-freemind hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-freemind
~/hg/lisp/org/org-footnote hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-footnote
~/hg/lisp/org/org-feed hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-feed
~/hg/lisp/org/org-faces hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-faces
~/hg/lisp/org/org-exp hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-exp
~/hg/lisp/org/org-exp-blocks hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-exp-blocks
~/hg/lisp/org/org-docbook hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-docbook
~/hg/lisp/org/org-datetree hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-datetree
~/hg/lisp/org/org-crypt hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-crypt
~/hg/lisp/org/org-colview hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-colview
~/hg/lisp/org/org-clock hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-clock
~/hg/lisp/org/org-bibtex hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-bibtex
~/hg/lisp/org/org-bbdb hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-bbdb
~/hg/lisp/org/org-attach hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-attach
~/hg/lisp/org/org-ascii hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-ascii
~/hg/lisp/org/org-archive hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-archive
~/hg/lisp/org/org-agenda hides /home/ubuntu/emacs/share/emacs/23.3/lisp/org/org-agenda
~/hg/lisp/newsticker/newsticker hides /home/ubuntu/emacs/share/emacs/23.3/lisp/net/newsticker
~/hg/lisp/newsticker/newst-treeview hides /home/ubuntu/emacs/share/emacs/23.3/lisp/net/newst-treeview
~/hg/lisp/newsticker/newst-ticker hides /home/ubuntu/emacs/share/emacs/23.3/lisp/net/newst-ticker
~/hg/lisp/newsticker/newst-reader hides /home/ubuntu/emacs/share/emacs/23.3/lisp/net/newst-reader
~/hg/lisp/newsticker/newst-plainview hides /home/ubuntu/emacs/share/emacs/23.3/lisp/net/newst-plainview
~/hg/lisp/newsticker/newst-backend hides /home/ubuntu/emacs/share/emacs/23.3/lisp/net/newst-backend
~/hg/lisp/misc/pop3 hides /home/ubuntu/emacs/share/emacs/23.3/lisp/gnus/pop3
~/hg/lisp/misc/nnir hides /home/ubuntu/emacs/share/emacs/23.3/lisp/gnus/nnir
~/hg/lisp/misc/message hides /home/ubuntu/emacs/share/emacs/23.3/lisp/gnus/message
~/hg/lisp/misc/erc-goodies hides /home/ubuntu/emacs/share/emacs/23.3/lisp/erc/erc-goodies
~/hg/lisp/emms/tq hides /home/ubuntu/emacs/share/emacs/23.3/lisp/emacs-lisp/tq
~/hg/lisp/misc/appt hides /home/ubuntu/emacs/share/emacs/23.3/lisp/calendar/appt
~/hg/lisp/misc/sym-comp hides /home/ubuntu/emacs/share/emacs/23.3/lisp/obsolete/sym-comp

Features:
(shadow emacsbug cl-specs edebug log-edit pcvs-util add-log diff-mode
vc-git vc-bzr vc-sccs vc-svn vc-cvs vc-rcs vc vc-dispatcher vc-hg
dabbrev cc-mode cc-fonts cc-menus cc-cmds cc-styles cc-align cc-engine
cc-vars cc-defs emms-player-mplayer emms-player-simple url-util
url-parse url-vars emms-mark emms-info-mp3info emms-tag-editor
emms-setup emms-browser emms-playlist-sort emms-score emms-cache
emms-info later-do emms-playlist-mode emms-source-playlist
emms-source-file emms emms-compat find-func icomplete muse-journal
muse-book muse-latex muse-html muse-xml-common muse-colors muse-publish
muse-project muse-protocols info muse-regexps muse muse-nested-tags
muse-mode lookup-entry lookup-content lookup-vse ndkks ndeb ndeb-binary
lookup lookup-types lookup-utils lookup-vars evi evi-mule japan-util kkc
ja-dic-utl erc-track erc-ring erc-netsplit erc-match erc-pcomplete
pcomplete erc-button erc-fill erc-stamp erc-join erc-goodies erc
erc-backend erc-compat org-archive bbdb-gnus bbdb-snarf gnus-dired ido
uniquify bookmark pp cal-move org-capture org-mks flow-fill starttls
mailalias smtpmail sendmail newcomment cookie1 guess-lang bbdb-picture
bbdb-com bbdb gnus-fun dirtrack shell tabify woman man thingatpt
w3m-search swbuff debug w3m-form w3m-symbol mule-util w3m-bookmark
w3m-tabmenu w3m-session w3m doc-view jka-compr image-mode w3m-hist
w3m-fb w3m-ems w3m-ccl ccl w3m-favicon w3m-image w3m-proc w3m-util
nnagent multi-isearch epa-file epa derived epg sort gnus-cite smiley
ansi-color mail-extr gnus-async gnus-bcklg gnus-dup gnus-ml disp-table
gnus-topic parse-time timezone ssl pop3 nnml nndraft nnmh auth-source
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg nntp
gnus-cache gnus-art mm-uu mml2015 epg-config mm-view smime dig nnir
gnus-sum gnus-group gnus-undo nnmail mail-source format-spec gnus-start
gnus-spec gnus-int gnus-range message ecomplete rfc822 mml mml-sec
password-cache mm-decode mm-bodies mm-encode mailcap mail-parse rfc2231
rfc2047 rfc2045 qp ietf-drums mailabbrev gmm-utils mailheader canlock
sha1 hex-util hashcash gnus-win gnus gnus-ems nnoo nnheader gnus-util
netrc mm-util mail-prsvr mail-utils paren init appt diary-lib
diary-loaddefs autoinsert org-wl org-w3m org-vm org-rmail org-mhe
org-mew org-irc org-jsinfo org-infojs org-html org-exp ob-exp
org-exp-blocks org-info org-gnus org-docview org-bibtex org-bbdb
org-agenda org byte-opt bytecomp byte-compile advice help-fns
advice-preload ob-emacs-lisp ob-keys ob-comint ob-tangle ob-ref ob-lob
ob-table ob org-footnote org-src org-list org-faces org-compat
org-entities org-macs noutline outline xcscope ivan-w3m ivan-term
ivan-slime slime-autoloads ivan-re-builder quail help-mode view ivan-org
ivan-newsticker ivan-muse ivan-message ivan-japanese ivan-gnus grep
compile comint ivan-french ivan-english ivan-emms dired-x dired-aux
dired ivan-comint cal-iso regexp-opt cal-menu calendar cal-loaddefs bs
ivan-bbdb ivan-anki tex-site caps-mode ivan-common-code sregex cus-edit
easymenu cus-start cus-load ivan-var ivan-fun ivan-keymap ivan-face
ivan-load garak edmacro kmacro notify dbus-util assoc dbus xml
tree-widget elim warnings wid-edit browse-url cl cl-19 lui tracking
easy-mmode flyspell ispell ring incomplete time-date tooltip ediff-hook
vc-hooks lisp-float-type mwheel x-win x-dnd font-setting tool-bar dnd
fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer
select scroll-bar mldrag mouse jit-lock font-lock syntax facemenu
font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan
thai tai-viet lao korean japanese hebrew greek romanian slovak czech
european ethiopic indian cyrillic chinese case-table epa-hook
jka-cmpr-hook help simple abbrev loaddefs button minibuffer faces
cus-face files text-properties overlay md5 base64 format env code-pages
mule custom widget hashtable-print-readable backquote
make-network-process dbusbind font-render-setting gtk x-toolkit x
multi-tty emacs)