remyhonig / org-query Goto Github PK
View Code? Open in Web Editor NEWCreate complex but readable skip-functions for org-agenda
Create complex but readable skip-functions for org-agenda
Can we improve the performance?
I have written leoc/org-helpers. I find your implementation and flexibility much better, but it seems to be much slower than my simple attempt of generalizing the ideas of Bernt Hansen. Have you run into problems concerning performance? I am not that deep into hacking org-mode, so maybe we could discuss some ways of improving performance? ๐
I'd be happy to do some implementation then ๐
Some things I can think of:
Cheers!
Hi
I'm currently testing your code and example setup, and the very first issue I came across was "false positives" on the last headline in a file. Example:
* TODO
** NEXT
Here, NEXT will show up under "Next tasks in active projects" section in the agenda, which is obviously wrong. Similar problem with backlog section.
The reason seems to be org-query-next-when, which returns nil when there are no more headlines/trees in the buffer. Which makes the agenda code assume, by skipping logic, that this line should be included in the corresponding section.
I'm not elisp expert at all, but I tried
(cl-defsubst org-query-next-when (pred &key (next-fn #'outline-next-heading))
"Return position of next item if PRED is non-nil for current entry.
NEXT-FN is called to find the next item,
e.g. `outline-next-heading' or `org-end-of-subtree'."
(save-excursion
(save-restriction
;; NOTE: Possibly unnecessary to widen. Tests pass without it,
;; and it should be faster without it:
;; (widen)
(when (funcall pred)
(or (funcall next-fn) (point-max))))))
to make the skipping functions return end-of-file instead of nil. Which appears to work, as far as I can tell.
Kind of surprised I'm the first one running into this. It's the very first thing I came across after a minute of testing with an old org file of mine.
Emacs is 25.1.1 and Org 9.1.13.
Cheers!
@remyhonig Thank you for developing this wonderful package. It's great. But I met a little trouble with it.
I add your package to spacemacs, with use-package,got error:
Error (use-package): org-query-gtd :init: Wrong type argument: symbolp
Error (use-package): org-query-gtd :init: Wrong type argument: symbolp, ("r" "Review Agenda" ((agenda "" ((org-agenda-ndays 1))) (\, (rmh/agendablock-inbox)) (\, (rmh/agendablock-loose-tasks)) (\, (rmh/agendablock-tasks-waiting)) (\, (rmh/agendablock-next-in-active)) (\, (rmh/agendablock-active-projects-with-next)) (\, (rmh/agendablock-active-projects-without-next)) (\, (rmh/agendablock-backlog-of-active)) (\, (rmh/agendablock-checklists))) nil)
Hope to get help from you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.