emacs-pretest-bug
[Top][All Lists]
Advanced

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

Make calendar-mark-today update at midnight


From: Stephen Berman
Subject: Make calendar-mark-today update at midnight
Date: Fri, 30 Mar 2007 00:33:50 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.96 (gnu/linux)

Set today-visible-calendar-hook to 'calendar-mark-today in your
init-file or via Custom.  Then, if you have the calendar buffer open
before midnight and keep it open past the stroke of midnight, the
marked date remains unchanged, i.e., now yesterday is marked.  The
following patch makes the marked date change at midnight, i.e., keeps
today as the marked date, but I'm not sure it's the best way to deal
with this issue.

*** calendar.el~1.197~  2007-03-27 13:06:07.000000000 +0200
--- calendar.el         2007-03-30 00:06:05.000000000 +0200
***************
*** 2083,2089 ****
      (unwind-protect
          (if mark-diary-entries-in-calendar (mark-diary-entries))
        (if today-visible
!           (run-hooks 'today-visible-calendar-hook)
          (run-hooks 'today-invisible-calendar-hook)))))
  
  (defun generate-calendar (month year)
--- 2083,2092 ----
      (unwind-protect
          (if mark-diary-entries-in-calendar (mark-diary-entries))
        (if today-visible
!         (progn
!           (run-hooks 'today-visible-calendar-hook)
!           (and (memq 'calendar-mark-today today-visible-calendar-hook)
!                (run-at-time "24:00:00" nil 'redraw-calendar)))
          (run-hooks 'today-invisible-calendar-hook)))))
  
  (defun generate-calendar (month year)


In GNU Emacs 22.0.96.5 (i686-pc-linux-gnu, GTK+ Version 2.10.6)
 of 2007-03-27 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.70199902
configured using `configure  '--with-x-toolkit=gtk''

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: en_US.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: Diff

Minor modes in effect:
  which-function-mode: t
  tabbar-mwheel-mode: t
  tabbar-mode: t
  recentf-mode: t
  display-time-mode: t
  show-paren-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  column-number-mode: t
  line-number-mode: t
  transient-mark-mode: identity

Recent input:
SPC J u d i t h SPC u n d SPC i c h SPC j o M-/ M-/ 
M-/ <backspace> <backspace> <backspace> <backspace> 
l a u M-/ M-/ SPC i m SPC H ΓΌ M-/ <help-echo> , SPC 
i c h SPC d u s c h e , SPC J u d i t h SPC d u s c 
h t <help-echo> <help-echo> <return> <tab> 9 . 0 3 
SPC w a x <backspace> <backspace> <backspace> e s c 
h M-/ , SPC E m a c M-/ <return> <tab> ~ 9 . 2 0 SPC 
J u d i t h SPC a u f SPC d i e SPC A r b e i t , SPC 
i c h SPC <up> <up> <right> <right> <right> <right> 
<right> <right> <right> , SPC i c h SPC F U t o n <left> 
<left> <left> <backspace> u <down> <down> S c h e r 
M-/ C-x 1 C-c j e <tab> <return> <S-right> C-c C-d 
<home> <next> <next> <next> <next> <down-mouse-5> <mouse-5> 
<double-down-mouse-5> <double-mouse-5> <down-mouse-5> 
<mouse-5> <down-mouse-1> <mouse-movement> <mouse-movement> 
<drag-mouse-1> <down-mouse-3> <mouse-3> <down-mouse-1> 
<mouse-1> <C-S-backspace> C-x C-s C-x C-f / u s <tab> 
e <tab> s <tab> c <tab> e <tab> / l i <tab> s <tab> 
/ c a l e <tab> c a l e <tab> <return> M-x e d i f 
f <return> <return> <up> <up> <up> <up> <return> n 
a n ! D <switch-frame> C-x 1 <switch-frame> <f1> <switch-frame> 
<switch-frame> <switch-frame> <switch-frame> <switch-frame> 
q y C-x o C-c C-d C-x o C-c C-d C-c C-d C-x o M-x <up> 
<return> C-g C-x o C-x C-s C-x o M-x <up> <return> 
<return> <up> <up> <up> <return> D <switch-frame> C-x 
o <switch-frame> <f1> M-x r e p o r <tab> b <tab> 
<return>

Recent messages:
Saving file /home/steve/.emacs.d/site-lisp/calendar.el...
Wrote /home/steve/.emacs.d/site-lisp/calendar.el
Reading file /users/steve/cvsroot/emacs/lisp/calendar/calendar.el ... 
Reading file /home/steve/.emacs.d/site-lisp/calendar.el ... 
Computing differences between calendar.el and calendar.el ...
Buffer A: Processing difference region 0 of 1
Buffer B: Processing difference region 0 of 1
Processing difference regions ... done
Auto-saving...done
Loading emacsbug...done




reply via email to

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