From: Samuel Loury <konubinix@gmail.com>
To: OrgMode ML <emacs-orgmode@gnu.org>
Subject: Repeated tasks repeats even if the time stamp is commented
Date: Fri, 18 Jul 2014 11:19:14 +0200 [thread overview]
Message-ID: <87silzxbvx.fsf@konixwork.incubateur.ens-lyon.fr> (raw)
[-- Attachment #1: Type: text/plain, Size: 2241 bytes --]
Hi,
In baa2c5943a4afce71a6336cbd957139e840bd952,
If the user toggles the TODO to DONE, the tasks repeats even though the
scheduled item is commented.
--8<---------------cut here---------------start------------->8---
* TODO Test
# SCHEDULED: <2014-07-18 Fri ++1d>
--8<---------------cut here---------------end--------------->8---
My first though is that this behavior is unexpected, but I guess this
needs discussion.
I dug a bit and found two issues with this:
1. In org-add-planning-info, file lisp/org.el line 13446, the following
code may be seen:
--8<---------------cut here---------------start------------->8---
(if (and (not (looking-at org-outline-regexp))
(looking-at (concat "[^\r\n]*?" org-keyword-time-regexp
"[^\r\n]*"))
(not (equal (match-string 1) org-clock-string)))
(narrow-to-region (match-beginning 0) (match-end 0))
(insert-before-markers "\n")
(backward-char 1)
(narrow-to-region (point) (point))
(and org-adapt-indentation (org-indent-to-column col)))
--8<---------------cut here---------------end--------------->8---
It assumes that (concat "[^\r\n]*?" org-keyword-time-regexp
"[^\r\n]*") is a suitable regexp for time entry. It then make the
buffer look like
--8<---------------cut here---------------start------------->8---
* DONE Test
CLOSED: [2014-07-18 Fri 11:13] # SCHEDULED: <2014-07-21 Mon ++1d>
--8<---------------cut here---------------end--------------->8---
2. afterward, into the org-get-repeat function, in the same file, line
13094, the code is
--8<---------------cut here---------------start------------->8---
(and (re-search-forward (if tagline
(concat tagline "\\s-*" org-repeat-re)
org-repeat-re)
(org-entry-end-position) t)
(match-string-no-properties 1)))))
--8<---------------cut here---------------end--------------->8---
This assumes also ignores a line starting with a #.
This case is a bit tricky to fix since if string matching org-repeat-re
is commented, then one has to search till the remaining of the entry to
find another one.
--
Konubinix
GPG Key : 7439106A
Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A
[-- Attachment #2: Type: application/pgp-signature, Size: 472 bytes --]
next reply other threads:[~2014-07-18 9:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-18 9:19 Samuel Loury [this message]
2014-07-18 10:32 ` Repeated tasks repeats even if the time stamp is commented Nicolas Goaziou
2014-07-18 11:37 ` Samuel Loury
2014-07-24 8:17 ` Nicolas Goaziou
2014-07-28 14:13 ` Bastien
2014-07-29 15:45 ` Samuel Loury
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=87silzxbvx.fsf@konixwork.incubateur.ens-lyon.fr \
--to=konubinix@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.