From ca21b7b86dc6acd6feec0d28a3a53be62d9e1fa5 Mon Sep 17 00:00:00 2001 From: Marco Wahl Date: Mon, 12 Jan 2015 12:35:10 +0100 Subject: [PATCH] org*.el: Fix call to calendar API * lisp/org-clock.el: Replace occurances of 'calendar-absolute-from-iso' with 'calendar-iso-to-absolute'. * lisp/org-agenda.el: Same as above. * lisp/org.el: Same as above. Some (long marked obsolete) calendar entities have been dropped from Emacs recently. One of those is 'calendar-absolute-from-iso'. --- lisp/org-agenda.el | 4 ++-- lisp/org-clock.el | 10 +++++----- lisp/org.el | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el index b4b0a24de..403f62123 100644 --- a/lisp/org-agenda.el +++ b/lisp/org-agenda.el @@ -52,7 +52,7 @@ (declare-function diary-add-to-list "diary-lib" (date string specifier &optional marker globcolor literal)) -(declare-function calendar-absolute-from-iso "cal-iso" (date)) +(declare-function calendar-iso-to-absolute "cal-iso" (date)) (declare-function calendar-astro-date-string "cal-julian" (&optional date)) (declare-function calendar-bahai-date-string "cal-bahai" (&optional date)) (declare-function calendar-chinese-date-string "cal-china" (&optional date)) @@ -7985,7 +7985,7 @@ so that the date SD will be in that range." (setq y1 (org-small-year-to-year (/ n 100)) n (mod n 100))) (setq sd - (calendar-absolute-from-iso + (calendar-iso-to-absolute (list n 1 (or y1 (nth 2 (calendar-iso-from-absolute sd))))))))) ((eq span 'month) diff --git a/lisp/org-clock.el b/lisp/org-clock.el index 892ae1810..319c1c479 100644 --- a/lisp/org-clock.el +++ b/lisp/org-clock.el @@ -32,7 +32,7 @@ (require 'cl)) (require 'org) -(declare-function calendar-absolute-from-iso "cal-iso" (&optional date)) +(declare-function calendar-iso-to-absolute "cal-iso" (&optional date)) (declare-function notifications-notify "notifications" (&rest params)) (declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (declare-function org-refresh-properties "org" (dprop tprop)) @@ -2055,7 +2055,7 @@ If you can combine both, the month starting day will have priority." (setq y (string-to-number (match-string 1 skey)) w (string-to-number (match-string 2 skey))) (setq date (calendar-gregorian-from-absolute - (calendar-absolute-from-iso (list w 1 y)))) + (calendar-iso-to-absolute (list w 1 y)))) (setq d (nth 1 date) month (car date) y (nth 2 date) dow 1 key 'week)) @@ -2064,7 +2064,7 @@ If you can combine both, the month starting day will have priority." (setq y (string-to-number (match-string 1 skey))) (setq q (string-to-number (match-string 2 skey))) (setq date (calendar-gregorian-from-absolute - (calendar-absolute-from-iso (org-quarter-to-date q y)))) + (calendar-iso-to-absolute (org-quarter-to-date q y)))) (setq d (nth 1 date) month (car date) y (nth 2 date) dow 1 key 'quarter)) @@ -2192,7 +2192,7 @@ the currently selected interval size." ((and wp (string-match "w\\|W" wp) mw (> (length wp) 0)) (require 'cal-iso) (setq date (calendar-gregorian-from-absolute - (calendar-absolute-from-iso (list (+ mw n) 1 y)))) + (calendar-iso-to-absolute (list (+ mw n) 1 y)))) (setq ins (format-time-string "%G-W%V" (encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date))))) @@ -2209,7 +2209,7 @@ the currently selected interval size." y (- y 1)) ()) (setq date (calendar-gregorian-from-absolute - (calendar-absolute-from-iso (org-quarter-to-date (+ mw n) y)))) + (calendar-iso-to-absolute (org-quarter-to-date (+ mw n) y)))) (setq ins (format-time-string (concat (number-to-string y) "-Q" (number-to-string (+ mw n))) (encode-time 0 0 0 (nth 1 date) (car date) (nth 2 date))))) diff --git a/lisp/org.el b/lisp/org.el index 88744dfb9..4636830d1 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -4213,7 +4213,7 @@ Normal means, no org-mode-specific context." (defvar mark-active) ;; Various packages -(declare-function calendar-absolute-from-iso "cal-iso" (date)) +(declare-function calendar-iso-to-absolute "cal-iso" (date)) (declare-function calendar-forward-day "cal-move" (arg)) (declare-function calendar-goto-date "cal-move" (date)) (declare-function calendar-goto-today "cal-move" ()) @@ -16635,7 +16635,7 @@ user." day (or iso-weekday wday 1) wday nil ; to make sure that the trigger below does not match iso-date (calendar-gregorian-from-absolute - (calendar-absolute-from-iso + (calendar-iso-to-absolute (list iso-week day year)))) ; FIXME: Should we also push ISO weeks into the future? ; (when (and org-read-date-prefer-future @@ -16644,7 +16644,7 @@ user." ; (time-to-days (current-time)))) ; (setq year (1+ year) ; iso-date (calendar-gregorian-from-absolute - ; (calendar-absolute-from-iso + ; (calendar-iso-to-absolute ; (list iso-week day year))))) (setq month (car iso-date) year (nth 2 iso-date)