From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Lee Subject: [PATCH 2/3] org-habit: Always show time of day designation for habits Date: Sun, 03 Feb 2019 15:45:28 +0000 Message-ID: <1549208728.1789247.1649835416.3A036917@webmail.messagingengine.com> Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:50178) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gqJy5-0006j9-3w for emacs-orgmode@gnu.org; Sun, 03 Feb 2019 10:46:01 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gqJy1-0003KJ-De for emacs-orgmode@gnu.org; Sun, 03 Feb 2019 10:45:59 -0500 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]:48415) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gqJxz-0002mK-Fk for emacs-orgmode@gnu.org; Sun, 03 Feb 2019 10:45:56 -0500 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 628101506 for ; Sun, 3 Feb 2019 10:45:29 -0500 (EST) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org * 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