> Ihor Radchenko <[email protected]> writes:
>
> > Earl Chase <[email protected]> writes:
> >
> >> Cancelled.
> >>
> >> As I am now employed, I no longer can assign my copyright.
> >
> > Not closed.
> > Let's work with that we have then, so that the work you poured into the
> > patch does not go into waste.
>
> I have looked into fixing org-get-repat, and it caused a chain reaction
> with various parts of tests failing to account for inlinetasks.

I think that `org-get-repeat' should be deprecated.
`org-auto-repeat-maybe' only uses it once, just to validate that a
headline/inlinetask has a valid repeater. `org-habit-parse-todo' was
the only other function that used it. As you know, org-habit has also
started transitioning to the org-element api and already no longer
uses `org-get-repeat'. My plan was to write a seperate function that
uses the org-element api to parse a headline/inlinetasks and all of
its contents, ignoring any subheaders. That function would be used by
another function that would get all of the repeaters of a
headline/inlinetask. But as is, the `org-get-repeat' call in
`org-auto-repeat-maybe' isn't necessary since we can already validate
repeaters with the org-element API. But one of the other things I
would like to ask is why does `org-auto-repeat-maybe' have a while
loop in the first place? Is it common for people to have multiple
repeaters for a single header? Even so, we know exactly where
timestamps with repeaters will appear: in the title of a headline,
planning items, or in the section underneath a headline. So, it would
not be difficult to rewrite the function so that it checks those
specific places and updates the repeaters that it finds. That's one of
the other things I was working on. I was clearly a little too
ambitious with this patch, which is why I ran out of time without a
real solution for inlinetasks.

> I gave up when I saw that org-entry-put explicitly ignores inlinetasks.
>

Isn't this something that could be replaced by the org-element api as well?

> Looks like we have to accept that inlinetasks are partially broken in
> Org and instead look into deprecating the current syntax and creating
> something alternative, as discussed a long time ago with Bastien.
> Related-to: https://list.orgmode.org/orgmode/87fs47h2x4.fsf@localhost/
>


> Meanwhile, since I had no problems with your patch other than
> inlinetasks, I applied it.
> Applied, onto main.
> https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=08c347f81
>

Great, thank you. I really just did this patch to get more experience
with org-element and to learn how repeaters work, so merge or not I
wouldn't have felt that my time had been wasted.

Reply via email to