From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Repeated tasks repeats even if the time stamp is commented Date: Thu, 24 Jul 2014 10:17:11 +0200 Message-ID: <87vbqulug0.fsf@nicolasgoaziou.fr> References: <87silzxbvx.fsf@konixwork.incubateur.ens-lyon.fr> <87r41jlzxr.fsf@nicolasgoaziou.fr> <87iomuyk2h.fsf@konixwork.incubateur.ens-lyon.fr> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59725) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAECf-00053O-7L for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 04:16:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XAECV-0006qV-2L for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 04:16:41 -0400 Received: from relay4-d.mail.gandi.net ([2001:4b98:c:538::196]:59303) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XAECU-0006qD-TE for emacs-orgmode@gnu.org; Thu, 24 Jul 2014 04:16:31 -0400 In-Reply-To: <87iomuyk2h.fsf@konixwork.incubateur.ens-lyon.fr> (Samuel Loury's message of "Fri, 18 Jul 2014 13:37:10 +0200") 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: Samuel Loury Cc: OrgMode ML Hello, Samuel Loury writes: > Thank you for the answer, do you know where I should look at to start > investigating to fix the issue? I think `org-add-planning-info' may be a good candidate, though I didn't look closely into it. One possible way to use `org-element-at-point' is something like the following (let ((element (org-element-at-point))) (when (eq (org-element-type element) 'planning) ...)) Then it is sure to be on a planning line. Storing ELEMENT also gives you a lot of information without further parsing. Also, when you need to find the next object of a given type, the usual construct is (catch 'exit (while (re-search-forward some-regexp nil t) (let ((context (org-element-context))) (when (eq (org-element-type context) expected-type) ... (throw 'exit some-value))))) It is useful to find, e.g., a timestamp within a section. Regards, -- Nicolas Goaziou