org-agenda: Rename `org-agenda-todayp' as `org-agenda-today-p'
* lisp/org-agenda.el (org-agenda-today-p): New function. (org-agenda-todayp): Deprecate function. (org-agenda-get-day-face): (org-agenda-get-deadlines): (org-agenda-todo): Apply renaming.
This commit is contained in:
parent
f774552a00
commit
c29eee4836
|
@ -50,7 +50,10 @@ for upcoming anniversaries (default: 7 days).
|
||||||
~org-show-children~ is a faster implementation of
|
~org-show-children~ is a faster implementation of
|
||||||
~outline-show-children~.
|
~outline-show-children~.
|
||||||
** Removed functions
|
** Removed functions
|
||||||
*** ~org-element-remove-indentation~ in an obsolete alias for ~org-remove-indentation~
|
*** ~org-agenda-todayp~ is deprecated.
|
||||||
|
Use ~org-agenda-today-p~ instead.
|
||||||
|
*** ~org-element-remove-indentation~ is deprecated.
|
||||||
|
Use ~org-remove-indentation~ instead.
|
||||||
** Removed options
|
** Removed options
|
||||||
*** Remove ~org-list-empty-line-terminates-plain-lists~
|
*** Remove ~org-list-empty-line-terminates-plain-lists~
|
||||||
Two consecutive blank lines always terminate all levels of current
|
Two consecutive blank lines always terminate all levels of current
|
||||||
|
|
|
@ -4011,13 +4011,12 @@ This check for agenda markers in all agenda buffers currently active."
|
||||||
|
|
||||||
(defun org-agenda-get-day-face (date)
|
(defun org-agenda-get-day-face (date)
|
||||||
"Return the face DATE should be displayed with."
|
"Return the face DATE should be displayed with."
|
||||||
(or (and (functionp org-agenda-day-face-function)
|
(cond ((and (functionp org-agenda-day-face-function)
|
||||||
(funcall org-agenda-day-face-function date))
|
(funcall org-agenda-day-face-function date)))
|
||||||
(cond ((org-agenda-todayp date)
|
((org-agenda-today-p date) 'org-agenda-date-today)
|
||||||
'org-agenda-date-today)
|
((memq (calendar-day-of-week date) org-agenda-weekend-days)
|
||||||
((member (calendar-day-of-week date) org-agenda-weekend-days)
|
'org-agenda-date-weekend)
|
||||||
'org-agenda-date-weekend)
|
(t 'org-agenda-date)))
|
||||||
(t 'org-agenda-date))))
|
|
||||||
|
|
||||||
;;; Agenda timeline
|
;;; Agenda timeline
|
||||||
|
|
||||||
|
@ -6044,7 +6043,7 @@ specification like [h]h:mm."
|
||||||
(regexp (if with-hour
|
(regexp (if with-hour
|
||||||
org-deadline-time-hour-regexp
|
org-deadline-time-hour-regexp
|
||||||
org-deadline-time-regexp))
|
org-deadline-time-regexp))
|
||||||
(todayp (org-agenda-todayp date)) ; DATE bound by calendar
|
(todayp (org-agenda-today-p date)) ; DATE bound by calendar
|
||||||
(d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar
|
(d1 (calendar-absolute-from-gregorian date)) ; DATE bound by calendar
|
||||||
(dl0 (car org-agenda-deadline-leaders))
|
(dl0 (car org-agenda-deadline-leaders))
|
||||||
(dl1 (nth 1 org-agenda-deadline-leaders))
|
(dl1 (nth 1 org-agenda-deadline-leaders))
|
||||||
|
@ -8855,7 +8854,7 @@ the same tree node, and the headline of the tree node in the Org-mode file."
|
||||||
(buffer (marker-buffer marker))
|
(buffer (marker-buffer marker))
|
||||||
(pos (marker-position marker))
|
(pos (marker-position marker))
|
||||||
(hdmarker (org-get-at-bol 'org-hd-marker))
|
(hdmarker (org-get-at-bol 'org-hd-marker))
|
||||||
(todayp (org-agenda-todayp (org-get-at-bol 'day)))
|
(todayp (org-agenda-today-p (org-get-at-bol 'day)))
|
||||||
(inhibit-read-only t)
|
(inhibit-read-only t)
|
||||||
org-agenda-headline-snapshot-before-repeat newhead just-one)
|
org-agenda-headline-snapshot-before-repeat newhead just-one)
|
||||||
(org-with-remote-undo buffer
|
(org-with-remote-undo buffer
|
||||||
|
@ -10213,12 +10212,15 @@ to override `appt-message-warning-time'."
|
||||||
(message "No event to add")
|
(message "No event to add")
|
||||||
(message "Added %d event%s for today" cnt (if (> cnt 1) "s" "")))))
|
(message "Added %d event%s for today" cnt (if (> cnt 1) "s" "")))))
|
||||||
|
|
||||||
(defun org-agenda-todayp (date)
|
(defun org-agenda-today-p (date)
|
||||||
"Does DATE mean today, when considering `org-extend-today-until'?"
|
"Non nil when DATE means today.
|
||||||
(let ((today (org-today))
|
DATE is either a list of the form (month day year) or a number of
|
||||||
(date (if (and date (listp date)) (calendar-absolute-from-gregorian date)
|
days as returned by `calendar-absolute-from-gregorian' or
|
||||||
date)))
|
`org-today'. This function considers `org-extend-today-until'
|
||||||
(eq date today)))
|
when defining today."
|
||||||
|
(eq (org-today)
|
||||||
|
(if (consp date) (calendar-absolute-from-gregorian date) date)))
|
||||||
|
(define-obsolete-function-alias 'org-agenda-todayp 'org-agenda-today-p "25.1")
|
||||||
|
|
||||||
(defun org-agenda-todo-yesterday (&optional arg)
|
(defun org-agenda-todo-yesterday (&optional arg)
|
||||||
"Like `org-agenda-todo' but the time of change will be 23:59 of yesterday."
|
"Like `org-agenda-todo' but the time of change will be 23:59 of yesterday."
|
||||||
|
|
Loading…
Reference in New Issue