Idea for event handlers in Org mode
This commit is contained in:
parent
bcdd0157b7
commit
74f10827ff
20
gists.org
20
gists.org
|
@ -79,6 +79,26 @@ Put this in ~/.termux/termux.properties for a better Emacs experience inside Ter
|
|||
| 2022-11-26 | 140 |
|
||||
#+end_src
|
||||
|
||||
** Idea: event handlers :idea:
|
||||
|
||||
Have =ON_<STATE>= properties containing code that evaluates when that state is reached. Can be looked up and evaluated from =org-after-todo-state-change-hook=.
|
||||
|
||||
#+begin_src org :tangle gists/org-event-handlers.org
|
||||
,* TODO Update metric
|
||||
:PROPERTIES:
|
||||
:ON_DONE: (org-babel-execute-subtree)
|
||||
:END:
|
||||
|
||||
,#+begin_src elisp :results table append
|
||||
(with-temp-buffer
|
||||
(insert-file-contents user-init-file)
|
||||
(list (format-time-string "%F") (count-matches "(use-package ")))
|
||||
,#+end_src
|
||||
|
||||
,#+RESULTS:
|
||||
| 2022-11-26 | 140 |
|
||||
#+end_src
|
||||
|
||||
* vertico-repeat setup :emacs:vertico:
|
||||
|
||||
My vertico-repeat setup.
|
||||
|
|
13
gists/org-event-handlers.org
Normal file
13
gists/org-event-handlers.org
Normal file
|
@ -0,0 +1,13 @@
|
|||
* TODO Update metric
|
||||
:PROPERTIES:
|
||||
:ON_DONE: (org-babel-execute-subtree)
|
||||
:END:
|
||||
|
||||
#+begin_src elisp :results table append
|
||||
(with-temp-buffer
|
||||
(insert-file-contents user-init-file)
|
||||
(list (format-time-string "%F") (count-matches "(use-package ")))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| 2022-11-26 | 140 |
|
Loading…
Reference in a new issue