]> git.eshelyaron.com Git - emacs.git/commitdiff
(org-agenda-format-date-aligned, org-agenda-execute-calendar-command):
authorGlenn Morris <rgm@gnu.org>
Mon, 7 Apr 2008 02:02:15 +0000 (02:02 +0000)
committerGlenn Morris <rgm@gnu.org>
Mon, 7 Apr 2008 02:02:15 +0000 (02:02 +0000)
Access date elements directly rather than using calendar functions.
(org-read-date, org-goto-calendar, org-agenda-goto-calendar):
Also set calendar-view-diary-initially-flag,
calendar-view-holidays-initially-flag
(org-get-entries-from-diary): Also set diary-fancy-buffer.
(org-agenda-execute-calendar-command): No need to set displayed-day.

etc/NEWS
lisp/ChangeLog
lisp/org/org.el

index 0e88ea6cffbee9c50c5391524e4e8f3a15c6c6de..ebba8d811f0d79b38161e7f3a89a83f662bae4c8 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -570,6 +570,13 @@ The variable `european-calendar-style' is obsolete - use `calendar-date-style'.
 Similarly, the commands `american-calendar' and `european-calendar'
 should be replaced by `calendar-set-date-style'.
 
+*** The calendar namespace has been rationalized.
+All functions and variables now begin with a `calendar-', `diary-', or
+`holiday-' prefix.  The various calendar systems have secondary
+prefixes, eg `calendar-french-'.  The old names you are likely to use
+directly still exist, for the time being, as aliases, but please start
+using the new names.
+
 ** Miscellaneous programming mode changes
 
 *** The file etc/emacs.py now supports both Python 2 and 3, meaning
index 3a4ba1ff8e38c561abd276c27e4f7119526a12d2..a08e807793ae47eb4dc3a0a770182defdbf1015d 100644 (file)
@@ -1,3 +1,97 @@
+2008-04-07  Glenn Morris  <rgm@gnu.org>
+
+       * calendar.el (diary-view-entries-initially-flag): Rename
+       view-diary-entries-initially.  Keep old name as alias, update users.
+       (calendar-mark-diary-entries-flag): Rename
+       mark-diary-entries-in-calendar.  Keep old name as alias, update users.
+       (calendar-view-holidays-initially-flag): Rename
+       view-calendar-holidays-initially.  Keep old name as alias, update users.
+       (calendar-mark-holidays-flag): Rename mark-holidays-in-calendar.
+       Keep old name as alias, update users.
+       (calendar-initial-window-hook): Rename initial-calendar-window-hook.
+       Keep old name as alias, update users.
+       (calendar-today-visible-hook): Rename today-visible-calendar-hook.
+       Keep old name as alias, update users.
+       (calendar-today-invisible-hook): Rename today-invisible-calendar-hook.
+       Keep old name as alias, update users.
+       (diary-iso-date-forms): Rename iso-date-diary-pattern.  Update users.
+       (diary-american-date-forms): Rename american-date-diary-pattern.
+       Keep old name as alias, update users.
+       (diary-european-date-forms): Rename european-date-diary-pattern.
+       Keep old name as alias, update users.
+       (calendar-iso-date-display-form): Rename iso-calendar-display-form.
+       Keep old name as alias, update users.
+       (calendar-european-date-display-form): Rename
+       european-calendar-display-form.  Keep old name as alias, update users.
+       (calendar-american-date-display-form): Rename
+       european-calendar-display-form.  Keep old name as alias, update users.
+       (diary-show-holidays-flag): Rename holidays-in-diary-buffer.
+       Keep old name as alias, update users.
+       (holiday-general-holidays): Rename general-holidays.
+       Keep old name as alias, update users.
+       (holiday-oriental-holidays): Rename oriental-holidays.
+       Keep old name as alias, update users.
+       (holiday-local-holidays): Rename local-holidays.
+       Keep old name as alias, update users.
+       (holiday-other-holidays): Rename other-holidays.
+       Keep old name as alias, update users.
+       (holiday-hebrew-holidays): Rename hebrew-holidays.
+       Keep old name as alias, update users.
+       (holiday-christian-holidays): Rename christian-holidays.
+       Keep old name as alias, update users.
+       (holiday-islamic-holidays): Rename islamic-holidays.
+       Keep old name as alias, update users.
+       (holiday-bahai-holidays): Rename bahai-holidays.
+       Keep old name as alias, update users.
+       (holiday-solar-holidays): Rename solar-holidays.
+       Keep old name as alias, update users.
+       (diary-fancy-buffer): Rename fancy-diary-buffer.
+       Keep old name as alias, update users.
+       (calendar-other-calendars-buffer): Rename other-calendars-buffer.
+       Update users.
+       (calendar-hebrew-yahrzeit-buffer): Rename cal-hebrew-yahrzeit-buffer.
+       Update users.
+       (calendar-increment-month): Rename increment-calendar-month.
+       Keep old name as alias, update callers.
+       (calendar-increment-month-cons): Rename old calendar-increment-month.
+       Update callers.
+       (calendar-extract-month): Rename extract-calendar-month.
+       Keep old name as alias, update callers
+       (calendar-extract-day): Rename extract-calendar-day.
+       Keep old name as alias, update callers.
+       (calendar-extract-year): Rename extract-calendar-year.
+       Keep old name as alias, update callers.
+       (calendar-generate-window): Rename generate-calendar-window.
+       Update callers.
+       (calendar-generate): Rename generate-calendar.  Update callers.
+       (calendar-generate-month): Rename generate-calendar-month.
+       Update callers.
+       (calendar-redraw): Rename redraw-calendar.  Update callers.
+       (calendar-describe-mode): Rename describe-calendar-mode.  Update uses.
+       (calendar-mouse-other-month): Rename mouse-calendar-other-month.
+       Update callers.
+       (calendar-update-mode-line): Rename update-calendar-mode-line.
+       Update callers.
+       (calendar-exit): Rename exit-calendar.  Keep old name as alias,
+       update callers.
+       (calendar-mark-visible-date): Rename mark-visible-calendar-date.
+       Keep old name as alias, update callers.
+       * calendar/cal-bahai.el, calendar/cal-china.el, calendar/cal-coptic.el:
+       * calendar/cal-dst.el, calendar/cal-french.el, calendar/cal-hebrew.el:
+       * calendar/cal-html.el, calendar/cal-islam.el, calendar/cal-iso.el:
+       * calendar/cal-julian.el, calendar/cal-menu.el, calendar/cal-move.el:
+       * calendar/cal-persia.el, calendar/cal-tex.el, calendar/cal-x.el:
+       * calendar/diary-lib.el, calendar/holidays.el, calendar/lunar.el:
+       * calendar/solar.el: Update for calendar.el name changes.
+       * org/org.el (org-agenda-format-date-aligned)
+       (org-agenda-execute-calendar-command): Access date elements directly
+       rather than using calendar functions.
+       (org-read-date, org-goto-calendar, org-agenda-goto-calendar):
+       Also set calendar-view-diary-initially-flag,
+       calendar-view-holidays-initially-flag
+       (org-get-entries-from-diary): Also set diary-fancy-buffer.
+       (org-agenda-execute-calendar-command): No need to set displayed-day.
+
 2008-04-06  Alan Mackenzie  <acm@muc.de>
 
        * progmodes/cc-langs.el (c-before-font-lock-function): Correct a
@@ -9,7 +103,7 @@
        font-lock-extend-after-change-region-function, thus superseding
        advice on the Font Lock after change functions.
        (c-advise-fl-for-region): Remove this macro.
-       
+
 2008-04-06  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * textmodes/flyspell.el (flyspell-duplicate-distance): Improve
index 1da611aa790285b72ef6abde27b6b2dda684d094..9deb8f49ab453df4de82f2692ee5137769c4d68d 100644 (file)
@@ -2851,9 +2851,9 @@ a calendar-style date list like (month day year)."
 This function makes sure that dates are aligned for easy reading."
   (format "%-9s %2d %s %4d"
          (calendar-day-name date)
-         (extract-calendar-day date)
-         (calendar-month-name (extract-calendar-month date))
-         (extract-calendar-year date)))
+         (cadr date)                      ; day
+         (calendar-month-name (car date)) ; month
+         (nth 2 date)))                   ; year
 
 (defcustom org-agenda-include-diary nil
   "If non-nil, include in the agenda entries from the Emacs Calendar's diary."
@@ -17912,7 +17912,9 @@ user."
                    (setq def (apply 'encode-time defdecode)
                          defdecode (decode-time def)))))
         (calendar-move-hook nil)
+        (calendar-view-diary-initially-flag nil)
         (view-diary-entries-initially nil)
+        (calendar-view-holidays-initially-flag nil)
         (view-calendar-holidays-initially nil)
         (timestr (format-time-string
                   (if with-time "%Y-%m-%d %H:%M" "%Y-%m-%d") def))
@@ -18831,7 +18833,9 @@ A prefix ARG can be used to force the current date."
   (interactive "P")
   (let ((tsr org-ts-regexp) diff
        (calendar-move-hook nil)
+       (calendar-view-holidays-initially-flag nil)
        (view-calendar-holidays-initially nil)
+       (calendar-view-diary-initially-flag nil)
        (view-diary-entries-initially nil))
     (if (or (org-at-timestamp-p)
            (save-excursion
@@ -21593,7 +21597,8 @@ MATCH is being ignored."
 (defun org-get-entries-from-diary (date)
   "Get the (Emacs Calendar) diary entries for DATE."
   (require 'diary-lib)
-  (let* ((fancy-diary-buffer "*temporary-fancy-diary-buffer*")
+  (let* ((diary-fancy-buffer "*temporary-fancy-diary-buffer*")
+         (fancy-diary-buffer diary-fancy-buffer)
         (diary-display-hook '(fancy-diary-display))
         (pop-up-frames nil)
         (list-diary-entries-hook
@@ -21607,9 +21612,9 @@ MATCH is being ignored."
        (funcall (if (fboundp 'diary-list-entries)
                     'diary-list-entries 'list-diary-entries)
                 date 1)))
-    (if (not (get-buffer fancy-diary-buffer))
+    (if (not (get-buffer diary-fancy-buffer))
        (setq entries nil)
-      (with-current-buffer fancy-diary-buffer
+      (with-current-buffer diary-fancy-buffer
        (setq buffer-read-only nil)
        (if (zerop (buffer-size))
            ;; No entries
@@ -21621,7 +21626,7 @@ MATCH is being ignored."
              (setq entries nil)
            (setq entries (buffer-substring (point-min) (- (point-max) 1)))))
        (set-buffer-modified-p nil)
-       (kill-buffer fancy-diary-buffer)))
+       (kill-buffer diary-fancy-buffer)))
     (when entries
       (setq entries (org-split-string entries "\n"))
       (setq entries
@@ -23684,10 +23689,9 @@ the cursor position."
         (point (point))
         (date (calendar-gregorian-from-absolute
                (get-text-property point 'day)))
-         ;; the following 3 vars are needed in the calendar
-        (displayed-day (extract-calendar-day date))
-        (displayed-month (extract-calendar-month date))
-        (displayed-year (extract-calendar-year date)))
+         ;; the following 2 vars are needed in the calendar
+        (displayed-month (car date))
+        (displayed-year (nth 2 date)))
       (unwind-protect
          (progn
            (fset 'calendar-cursor-to-date
@@ -23732,7 +23736,9 @@ argument, latitude and longitude will be prompted for."
                  (error "Don't know which date to open in calendar")))
         (date (calendar-gregorian-from-absolute day))
         (calendar-move-hook nil)
+        (calendar-view-holidays-initially-flag nil)
         (view-calendar-holidays-initially nil)
+        (calendar-view-diary-initially-flag nil)
         (view-diary-entries-initially nil))
     (calendar)
     (calendar-goto-date date)))