Add notes
This commit is contained in:
parent
949ef58c61
commit
8d096188bb
1 changed files with 31 additions and 1 deletions
32
notes.org
32
notes.org
|
|
@ -6,6 +6,37 @@
|
|||
|
||||
[2017-12-31 Sun 17:54] I wonder if, instead of parsing the whole buffer with =org-element-parse-buffer=, we could simply work on a list of heading positions, e.g. a loop would search forward to the next heading position, then call whatever predicates it needed at the heading's position, using =save-excursion= around each function call. The predicates would need to be updated to get their data from the buffer, instead of using =org-element-property=, but that wouldn't be hard.
|
||||
|
||||
* Examples / testing
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(org-agenda-ng org-agenda-files
|
||||
(and (or (date :deadline '<= (org-today))
|
||||
(date :scheduled '<= (org-today)))
|
||||
(not (apply #'todo org-done-keywords-for-agenda)))
|
||||
((group (tags "bills"))
|
||||
(group (todo "SOMEDAY"))))
|
||||
|
||||
(org-agenda-ng org-agenda-files
|
||||
(and (or (date :deadline '<= (org-today))
|
||||
(date :scheduled '<= (org-today)))
|
||||
(not (apply #'todo org-done-keywords-for-agenda))))
|
||||
(org-agenda-ng "~/org/main.org"
|
||||
(and (or (date :deadline '<= (org-today))
|
||||
(date :scheduled '<= (org-today)))
|
||||
(not (apply #'todo org-done-keywords-for-agenda))))
|
||||
|
||||
(org-ql org-agenda-files
|
||||
(and (todo "SOMEDAY")
|
||||
(tags "Emacs")))
|
||||
(org-ql org-agenda-files
|
||||
(and (todo "SOMEDAY")
|
||||
(tags "Emacs")
|
||||
(priority >= "B")))
|
||||
(org-ql "~/org/main.org"
|
||||
(or (tags "Emacs")
|
||||
(priority >= "B")))
|
||||
#+END_SRC
|
||||
|
||||
* Profiling
|
||||
|
||||
This basically works, as a very basic kind of agenda view, but we can already see that it's much slower (at least, for single-day views) because =org-element-parse-buffer= is slow compared to the agenda code.
|
||||
|
|
@ -303,7 +334,6 @@ outline-on-heading-p 3452 0.0101
|
|||
string-match 4594 0.0064121759 1.395...e-06
|
||||
mapcar 30 0.0041008740 0.0001366958
|
||||
#+end_example
|
||||
|
||||
* Profiling position-based
|
||||
|
||||
** Macro
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue