* [PATCH 3/3] org-habit: Use face 'org-agenda-done for habits scheduled for future
@ 2019-02-03 15:46 John Lee
0 siblings, 0 replies; only message in thread
From: John Lee @ 2019-02-03 15:46 UTC (permalink / raw)
To: emacs-orgmode
* 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
---
lisp/org-agenda.el | 3 +++
1 file changed, 3 insertions(+)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 39ae85f30..17fa3e519 100644
--- a/lisp/org-agenda.el
+++ b/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
@@ -6285,6 +6286,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))))
--
2.17.1
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2019-02-03 15:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-02-03 15:46 [PATCH 3/3] org-habit: Use face 'org-agenda-done for habits scheduled for future John Lee
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).