Add gist to track a metric in an org table
This commit is contained in:
parent
318464c038
commit
f8d36ec4bb
22
gists.org
22
gists.org
|
@ -46,6 +46,28 @@ Put this in ~/.termux/termux.properties for a better Emacs experience inside Ter
|
|||
:after foo)
|
||||
#+end_src
|
||||
|
||||
* Track usage of Emacs packages over time
|
||||
|
||||
#+begin_src org :tangle track-use-package-over-time.org
|
||||
,* TODO Update Emacs package count
|
||||
DEADLINE: <2022-11-25 Fri .+1m>
|
||||
|
||||
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.
|
||||
|
||||
In this case, count the number of packages in my Emacs init file.
|
||||
|
||||
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 "(use-package ")))
|
||||
,#+end_src
|
||||
|
||||
,#+RESULTS:
|
||||
| 2022-11-25 | 140 |
|
||||
#+end_src
|
||||
|
||||
* COMMENT Local variables
|
||||
|
||||
Auto tangle this file on save.
|
||||
|
|
17
track-use-package-over-time.org
Normal file
17
track-use-package-over-time.org
Normal file
|
@ -0,0 +1,17 @@
|
|||
* TODO Update Emacs package count
|
||||
DEADLINE: <2022-11-25 Fri .+1m>
|
||||
|
||||
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.
|
||||
|
||||
In this case, count the number of packages in my Emacs init file.
|
||||
|
||||
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 "(use-package ")))
|
||||
#+end_src
|
||||
|
||||
#+RESULTS:
|
||||
| 2022-11-25 | 140 |
|
Loading…
Reference in a new issue