-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doesn't strip TODO progress cookies #24
Comments
Just to be clear, you're talking about |
Yes. Eg your toc-org-states-regexp catches only TODO and DONE. But in org, I can define my own TODO keywords in a |
See |
quick patch, regexp from ;; strip statistics cookies
(goto-char (point-min))
(while (re-search-forward "\\[[0-9]*\\(%\\|/[0-9]*\\)\\]" nil t)
(replace-match "" nil nil)) |
I would love to, and I try to do this whenever I can. But the thing is, a lot of the time it's not feasible due to one reason or another. Like, for this particular case, the
So, there's nothing I can use out of the box. Then, your function Another example - just yesterday, I tried to use So, I'll do just that with your snippet - simply copy-paste it. Thx! =) |
My point is that org syntax is more involved than it appears. If a regexp is different between 8.3.2 and 8.2.10, I think you should use the official one, not a fixed regex in your code. Else your regex may not work in my version of org. |
Totally understood.
But will GitHub treat it correctly? 😉
This particular package tries to balance between HTML renders (i.e. GitHub) and the richness of org facilities. So, there's a lot of unusual issues that needs to be taken into account, e.g. github does something one way, org does something the other way; different versions of org behave differently; different languages work differently, etc. After all the time I've been maintaining the package it's now abundantly clear, that trying to use org functions as much as possible brings more trouble than good. Again, this is mostly because the package tries to be a smooth bridge between the 2 worlds - GitHub render and Org-mode. |
Ideally, links should work in Github, Org and HTML export. |
My main focus is to make them work in both Github and Org. I see the problems you've pointed out in #28 and will work on them. Most likely, I'll fix these next week. As for HTML export - I don't really have an intention to work on that. My understanding is that you'd be better off using native org-export utilities for that. That said, maybe there's a simple way to make all 3 work at the same time, but it's unlikely that I'll be implementing this myself. |
They don't work in Github and Org since the former makes eg Please amend the regex to gobble surrounding space: (defconst toc-org-statistics-cookie-regexp " *\\[[0-9]*\\(%\\|/[0-9]*\\)\\] *"
"Regexp to find statistics cookies on the headline, eg [1/3] or [33%]") |
Yes, I understand that it doesn't work now =) But I'll fix this. It's just the issue is a bit more complicated than simply leaving the TODO state in place. You also need to look whether And for the cookies - you can't just strip them prior to calling the I'll make it work as soon as I get to it. |
Related to #3: it still doesn't strip TODO progress cookies. See
(info "(org)Breaking Down Tasks")
. These look likeEg in my case, 3 of the headlines below have such cookies, and the generated links are invalid:
The text was updated successfully, but these errors were encountered: