From mboxrd@z Thu Jan 1 00:00:00 1970 From: Don March Subject: [PATCH] Make today's deadlines "close" without lead time Date: Wed, 1 Jun 2016 01:57:55 -0400 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001a1140b8ece398200534312c88 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:47449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7zAc-0003ox-Ai for emacs-orgmode@gnu.org; Wed, 01 Jun 2016 01:58:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b7zAW-0007Fz-CY for emacs-orgmode@gnu.org; Wed, 01 Jun 2016 01:58:21 -0400 Received: from mail-io0-f178.google.com ([209.85.223.178]:32934) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b7zAW-0007Ft-8K for emacs-orgmode@gnu.org; Wed, 01 Jun 2016 01:58:16 -0400 Received: by mail-io0-f178.google.com with SMTP id t40so12043059ioi.0 for ; Tue, 31 May 2016 22:58:15 -0700 (PDT) Received: from mail-io0-f173.google.com (mail-io0-f173.google.com. [209.85.223.173]) by smtp.gmail.com with ESMTPSA id d200sm1244894ioe.19.2016.05.31.22.58.14 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 31 May 2016 22:58:15 -0700 (PDT) Received: by mail-io0-f173.google.com with SMTP id t40so12042865ioi.0 for ; Tue, 31 May 2016 22:58:14 -0700 (PDT) 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 --001a1140b8ece398200534312c88 Content-Type: text/plain; charset=UTF-8 This patch makes a very small change to the function that determines if a timestamp is close to the current day, which is used for showing/hiding items in agenda views. Under current behavior, a deadline of today is close only if it has some amount of lead time. If your date is 2016-06-01, the following statements evaluate to nil: #+BEGIN_SRC emacs-lisp (org-deadline-close "2016-06-01 Wed -0d") ;; but this is today! (org-deadline-close "2016-06-02 Wed -1d") #+END_SRC One effect of this is that if you set =org-agenda-todo-ignore-deadlines= to =far= and generate the TODO list agenda view (C-c a t), then items only appear if you are one day past the point at which they should appear. For example, the following item does not show up in my current TODO list: #+BEGIN_EXAMPLE * TODO due today, no lead time DEADLINE: <2016-06-01 -0d> #+END_EXAMPLE --001a1140b8ece398200534312c88 Content-Type: text/x-patch; charset=US-ASCII; name="0001-Make-today-s-deadlines-close-without-lead-time.patch" Content-Disposition: attachment; filename="0001-Make-today-s-deadlines-close-without-lead-time.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_iowfryde0 RnJvbSA1NDAxZGEyMDc2YjlkZTg5MGZiZjA4NmU0NzJjMDljM2YwYTY2ZmRmIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBEb24gTWFyY2ggPGRvbkBvaHNwaXRlLm5ldD4KRGF0ZTogV2Vk LCAxIEp1biAyMDE2IDAwOjA1OjEyIC0wNDAwClN1YmplY3Q6IFtQQVRDSF0gTWFrZSB0b2RheSdz IGRlYWRsaW5lcyAiY2xvc2UiIHdpdGhvdXQgbGVhZCB0aW1lCgoqIG9yZy5lbCAob3JnLWRlYWRs aW5lLWNsb3NlKTogQSB0aW1lc3RhbXAgaXMgY2xvc2UgaWYgdGhlIGRheXMgYmV0d2VlbgogIG5v dyBhbmQgdGhlIHRpbWVzdGFtcCBhcmUgbGVzcyB0aGVuIG9yIGVxdWFsIHRvIHRoZSBkYXlzIG9m IGxlYWQgdGltZS4KLS0tCiBsaXNwL29yZy5lbCB8IDIgKy0KIDEgZmlsZSBjaGFuZ2VkLCAxIGlu c2VydGlvbigrKSwgMSBkZWxldGlvbigtKQoKZGlmZiAtLWdpdCBhL2xpc3Avb3JnLmVsIGIvbGlz cC9vcmcuZWwKaW5kZXggNjgwMDg2ZC4uZmI5ZTEwMSAxMDA2NDQKLS0tIG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