29 lines
1.2 KiB
Org Mode
29 lines
1.2 KiB
Org Mode
* TODO Update Emacs package count
|
|
DEADLINE: <2023-03-15 Wed .+1m>
|
|
:PROPERTIES:
|
|
:LAST_REPEAT: [2023-02-15 Wed 08:12]
|
|
:ON_DONE: (org-babel-execute-subtree)
|
|
:END:
|
|
:LOGBOOK:
|
|
- State "DONE" from "TODO" [2023-02-15 Wed 08:12]
|
|
- State "DONE" from "TODO" [2022-11-26 Sat 07:57]
|
|
:END:
|
|
|
|
A small org file to keep track of some metric in a table, see [[https://orgmode.org/manual/Results-of-Evaluation.html][Results of Evaluation]] in the Org mode manual for more information. It's important that the function is supposed to return a list in order to record the result as a table row.
|
|
|
|
In this case, count the number of packages in my Emacs init file. It is executed automatically when the task is marked as done, using [[https://apps.bram85.nl/gitea/bram/gists/src/branch/main/gists/evaluate-code-on-task-state-change.org][this function]].
|
|
|
|
Press =C-c C-c= inside the code block to add a new entry to the table below.
|
|
|
|
#+begin_src elisp :results table append
|
|
(with-temp-buffer
|
|
(insert-file-contents user-init-file)
|
|
(list (format-time-string "%F")
|
|
(count-matches (rx (seq "(" (? "elpaca-") "use-package" space)))))
|
|
#+end_src
|
|
|
|
#+RESULTS:
|
|
| 2022-11-25 | 140 |
|
|
| 2022-11-26 | 140 |
|
|
| 2023-02-15 | 138 |
|