From: John Lee <jjl@pobox.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH 2/3] org-habit: Always show time of day designation for habits
Date: Sun, 03 Feb 2019 15:45:28 +0000 [thread overview]
Message-ID: <1549208728.1789247.1649835416.3A036917@webmail.messagingengine.com> (raw)
* org-agenda.el (org-agenda-get-scheduled): Always show the time of
day designation for habits
TINYCHANGE
---
lisp/org-agenda.el | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index 9145cafa8..39ae85f30 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6261,9 +6261,17 @@ scheduled items with an hour specification like [h]h:mm."
(head (buffer-substring (point) (line-end-position)))
(time
(cond
- ;; No time of day designation if it is only
- ;; a reminder.
- ((and (/= current schedule) (/= current repeat)) nil)
+ ;; No time of day designation if it is only a
+ ;; reminder, except for habits, which always show
+ ;; the time of day. Habits are an exception
+ ;; because if there is a time of day, that is
+ ;; interpreted to mean they should usually happen
+ ;; then, even if doing the habit was missed.
+ ((and
+ (not habitp)
+ (/= current schedule)
+ (/= current repeat))
+ nil)
((string-match " \\([012]?[0-9]:[0-9][0-9]\\)" s)
(concat (substring s (match-beginning 1)) " "))
(t 'time)))
--
2.17.1
reply other threads:[~2019-02-03 15:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1549208728.1789247.1649835416.3A036917@webmail.messagingengine.com \
--to=jjl@pobox.com \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).