Hello, Samuel Loury <konubi...@gmail.com> 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