* [PATCH] Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline
@ 2014-03-11 15:23 Markus
2014-03-14 11:16 ` Bastien
0 siblings, 1 reply; 2+ messages in thread
From: Markus @ 2014-03-11 15:23 UTC (permalink / raw)
To: emacs-orgmode
[-- Attachment #1.1: Type: text/plain, Size: 673 bytes --]
I noticed that if `org-agenda-skip-scheduled-if-deadline-is-shown' is set
to 'repeated-after-deadline, tasks without a DEADLINE are not shown at
all. You can reproduce it like this:
1. Setting the variable
(setq org-agenda-skip-scheduled-if-deadline-is-shown
'repeated-after-deadline)
2. Having at least the following tasks
```
** TODO Task 1
DEADLINE: <2014-03-14 Fri> SCHEDULED: <2014-03-11 Tue +1d>
** TODO Task 2
SCHEDULED: <2014-03-15 Sat>
```
Without the fix, only 'Task 1' entries are shown in the agenda, after the
fix 'Task 1' and 'Task 2' entries are shown. I guess this was the intended
semantics, or am I wrong?
I attached the patch.
Best,
Markus
[-- Attachment #1.2: Type: text/html, Size: 907 bytes --]
[-- Attachment #2: 0001-Fix-org-agenda-skip-scheduled-if-deadline-is-shown-s.patch --]
[-- Type: text/x-patch, Size: 1337 bytes --]
From f83ebc58a7a2d2797a74b9fc1108013319f44ccc Mon Sep 17 00:00:00 2001
From: Markus Hauck <markus1189@gmail.com>
Date: Tue, 11 Mar 2014 16:06:17 +0100
Subject: [PATCH] Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show
TODOs without deadline
* lisp/org-agenda.el (org-agenda-get-scheduled): If
`org-agenda-skip-scheduled-if-deadline-is-shown' is set to
'repeated-after-deadline, still show tasks without any deadline
The problem was that the check for the deadline seems to return a
default time even if no deadline is set for the task. This adds a
check if there is a deadline at all, if there is none, the task is
shown in the agenda, otherwise the old semantics apply.
TINYCHANGE
---
lisp/org-agenda.el | 1 +
1 file changed, 1 insertion(+)
diff --git a/lisp/org-agenda.el b/lisp/org-agenda.el
index f9318e1..3ad82aa 100644
--- a/lisp/org-agenda.el
+++ b/lisp/org-agenda.el
@@ -6250,6 +6250,7 @@ an hour specification like [h]h:mm."
category-pos (get-text-property (point) 'org-category-position))
(if (and (eq org-agenda-skip-scheduled-if-deadline-is-shown
'repeated-after-deadline)
+ (org-get-deadline-time (point))
(<= 0 (- d2 (time-to-days (org-get-deadline-time (point))))))
(throw :skip nil))
(if (not (re-search-backward "^\\*+[ \t]+" nil t))
--
1.8.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-03-14 11:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-11 15:23 [PATCH] Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline Markus
2014-03-14 11:16 ` Bastien
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.