From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Loury Subject: Repeated tasks repeats even if the time stamp is commented Date: Fri, 18 Jul 2014 11:19:14 +0200 Message-ID: <87silzxbvx.fsf@konixwork.incubateur.ens-lyon.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X84KA-0000Vt-Tn for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 05:19:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1X84K1-0000iZ-TW for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 05:19:30 -0400 Received: from mail-we0-x236.google.com ([2a00:1450:400c:c03::236]:44972) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1X84K1-0000iN-MP for emacs-orgmode@gnu.org; Fri, 18 Jul 2014 05:19:21 -0400 Received: by mail-we0-f182.google.com with SMTP id k48so3061125wev.41 for ; Fri, 18 Jul 2014 02:19:20 -0700 (PDT) Received: from localhost (162.48.7.109.rev.sfr.net. [109.7.48.162]) by mx.google.com with ESMTPSA id n2sm12714782wjf.40.2014.07.18.02.19.17 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 Jul 2014 02:19:17 -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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: OrgMode ML --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, In baa2c5943a4afce71a6336cbd957139e840bd952, If the user toggles the TODO to DONE, the tasks repeats even though the scheduled item is commented. =2D-8<---------------cut here---------------start------------->8--- * TODO Test # SCHEDULED: <2014-07-18 Fri ++1d> =2D-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: =2D-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))) =2D-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 =2D-8<---------------cut here---------------start------------->8--- * DONE Test CLOSED: [2014-07-18 Fri 11:13] # SCHEDULED: <2014-07-21 Mon ++1d> =2D-8<---------------cut here---------------end--------------->8--- 2. afterward, into the org-get-repeat function, in the same file, line 13094, the code is =2D-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))))) =2D-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. =2D-=20 Konubinix GPG Key : 7439106A Fingerprint: 5993 BE7A DA65 E2D9 06CE 5C36 75D2 3CED 7439 106A --=-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJTyOaSAAoJEHXSPO10ORBq1QUH/0BP6obVICFpyzMqLhD1GIjA of/VewuRY9+WhemZxeQxW4cUkt0bwikBGNhaqcF8USqz9tFYZGBY1anWwqUYm0g4 SydqWbif6aXD8cvDbLc902B52VQjTZfj70ImvHjuGPZAla204VLZwqzoZRAMTIyk VTpd2E/2w7ghRrzvfGcVDYJkXf6API1Ib3m/ZR0iVt95lj77m7ex5Tj3bOGurd// oa1FnDYsWDE9zLXwjF1iUsZ7sKXab4kKo2HS8ekWMASLdSbnTU4Bybyz2UZM6j5q 2raoKp6G77SV7uSGBb3L+2D4vRjKqdBb9AUG2Adgek818KlXKN4Rw7Wx66VwV/Q= =ZAxt -----END PGP SIGNATURE----- --=-=-=--