소스 검색

org-habit: Use face 'org-agenda-done for habits scheduled for future

* lisp/org-agenda.el (org-agenda-get-scheduled): Use the face.

This has the effect that if you just did the habit, it is "greyed out"
in the agenda.

TINYCHANGE
John Lee 6 년 전
부모
커밋
18b85aa3fe
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      lisp/org-agenda.el

+ 3 - 0
lisp/org-agenda.el

@@ -6165,6 +6165,7 @@ scheduled items with an hour specification like [h]h:mm."
 	       (diff (- current schedule))
 	       (warntime (get-text-property (point) 'org-appt-warntime))
 	       (pastschedp (< schedule today))
+	       (futureschedp (> schedule today))
 	       (habitp (and (fboundp 'org-is-habit-p) (org-is-habit-p)))
 	       (suppress-delay
 		(let ((deadline (and org-agenda-skip-scheduled-delay-if-deadline
@@ -6281,6 +6282,8 @@ scheduled items with an hour specification like [h]h:mm."
 		     head level category tags time nil habitp))
 		   (face (cond ((and (not habitp) pastschedp)
 				'org-scheduled-previously)
+			       ((and habitp futureschedp)
+				'org-agenda-done)
 			       (todayp 'org-scheduled-today)
 			       (t 'org-scheduled)))
 		   (habitp (and habitp (org-habit-parse-todo))))