-
Notifications
You must be signed in to change notification settings - Fork 113
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
org-ql-block formatting messes up with org-agenda formatting #83
Comments
I think there's nothing that can be done about this without implementing a compatible formatter. Of course, you can rebuild the agenda view after updating an entry, but I think that's the best we can do for now. |
Just a thought, but may be one can patch org-mode itself, so it will have some kind of lever\button enabling and disabling this behaviour? I mean re-applying formatting after done. |
Possibly. If you find a way, let me know. However, I would be reluctant to add such a workaround to this package, because it would likely be fragile. |
Hi. I have an idea how to make the built-in agenda formatting (partially) work with org-ql.
|
@yantar92 Thanks, but the purpose of this package is to not use the existing org-agenda code. |
I understand that your final goal is re-implementing org-agenda, but you are already relying on org-agenda-mode implementation to make org-ql-block work. I do not see why org-agenda's version of formatting cannot be used temporary until there is equivalent org-ql's version. The current version is simply inferior in comparison with org-agenda. Actually, it is one of the major things stopping me from using org-ql. |
FYI, I have recently found a re-implementation of agenda formatter [1]. It seems to be more complete than in org-ql. Though I do not think that it can be directly used, it might be a good resource to study. [1] https://github.com/weirdNox/dotfiles/blob/master/config/.emacs.d/config.org#renderer |
That description puts the cart before the horse.
This package was originally called As well, I am learning that my code should rely less on Org code, not more. The more code in Org that this project depends on, the more breakage will happen, and the more compatibility workarounds will be required as Org changes. This is because Org does not make any promises to third-party packages about APIs. So I'm not seeking to make this project more reliant on code in org-agenda.el.
org-agenda is a mature, complex system that has evolved over years from many contributors' work. org-ql is not intended to replace it in every way (perhaps eventually it might, but that goal is a distant one). The plans to enhance the formatter are already discussed in other issues here, like #44.
I won't be merging code that doesn't align with the project's goals. If the code you posted works for you, that's great. You're welcome to continue using it. One of the goals of org-ql is to be more modular than org-agenda so you can more easily customize it. |
Got it.
What do you think about the idea to implement something like |
That idea and some PoC code is in the notes file: https://github.com/alphapapa/org-ql/blob/master/notes.org#c-org-agenda-skip-function |
Thanks! I did not know about it. Do you know about performance of the |
Did you not see the part that says:
|
Sorry. My fault. I did not read the part after the code. P.S. Thanks for your patient replies. |
I just tried to benchmark the org-ql-block agenda, org-ql-skip agenda, and my own org-agenda-skip-function. The results are very strange (I measured the execution time two times for each) org-ql-block: 26.778508461 sec and 19.764141983 sec |
Why are they very strange? Anyway, I recommend using this macro for benchmarking: https://github.com/alphapapa/emacs-package-dev-handbook#bench-multi-lexical Also, note the FIXME in the comment that explains that the proof-of-concept code probably doesn't work quite correctly as a skip function is expected to. |
org-ql-block introduces it's own formatting of the agenda items.
It may be fine assuming that more customization will arrive in future (I miss buil-in
org-agenda-prefix-format
), but org-agenda re-applies the formatting once you change the item todo state from agenda view.The result does not look nice:
The first line is the default org-ql's formatting, but it is changed to what is in the following two lines once I change the todo state.
The text was updated successfully, but these errors were encountered: