From: Markus <markus1189@gmail.com>
To: emacs-orgmode@gnu.org
Subject: [PATCH] Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline
Date: Tue, 11 Mar 2014 16:23:20 +0100 [thread overview]
Message-ID: <CAHxOHZa8CqVdojhsVMrmQhFt4LFLuqk6cnFRbyagmC5gNRQpEw@mail.gmail.com> (raw)
[-- 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
next reply other threads:[~2014-03-11 15:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-11 15:23 Markus [this message]
2014-03-14 11:16 ` [PATCH] Fix: `org-agenda-skip-scheduled-if-deadline-is-shown': show TODOs without deadline Bastien
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHxOHZa8CqVdojhsVMrmQhFt4LFLuqk6cnFRbyagmC5gNRQpEw@mail.gmail.com \
--to=markus1189@gmail.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 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.