77 lines
2.4 KiB
Org Mode
77 lines
2.4 KiB
Org Mode
#+title: Gists by bram85
|
|
#+PROPERTY: header-args :mkdirp yes
|
|
|
|
#+begin_src org :tangle README.org
|
|
Gists referred from [[https://emacs.ch/@bram85][@bram85@emacs.ch]].
|
|
|
|
Unfortunately gitea has no gist support and there's no mature yet lightweight gist solution suitable for self-hosting, so resorting to this poor-man's setup of sharing gists with an audience.
|
|
#+end_src
|
|
|
|
* Termux keys :termux:emacs:
|
|
:PROPERTIES:
|
|
:URL: https://emacs.ch/@bram85/109393570150138285
|
|
:END:
|
|
|
|
Put this in ~/.termux/termux.properties for a better Emacs experience inside Termux.
|
|
|
|
#+begin_src conf :tangle gists/termux-emacs-keys.conf
|
|
extra-keys = [[ \
|
|
{key: ESC, popup: {macro: "CTRL g", display: "C-g"}}, \
|
|
{key: CTRL, popup: {macro: "CTRL x", display: "C-x"}}, \
|
|
{key: ALT, popup: {macro: "ALT x", display: "M-x"}}, \
|
|
{key: TAB}, \
|
|
{key: DEL, popup: {macro: "CTRL k", display: C-k}}, \
|
|
{key: LEFT, popup: HOME}, \
|
|
{key: DOWN, popup: PGDN}, \
|
|
{key: UP, popup: PGUP}, \
|
|
{key: RIGHT, popup: END} \
|
|
]]
|
|
#+end_src
|
|
|
|
* Nesting with use-package :emacs:usepackage:
|
|
:PROPERTIES:
|
|
:URL: https://emacs.ch/@bram85/109393551314878399
|
|
:END:
|
|
|
|
#+begin_src elisp :tangle gists/use-package-nesting.el
|
|
;; Demonstrate that use-package allows for nesting configurations,
|
|
;; although it is done semantically rather than syntactically. The
|
|
;; :after keyword makes sure that the 'bar' package is only evaluated
|
|
;; after the 'foo' package was loaded.
|
|
|
|
(use-package foo)
|
|
|
|
;; only loads after foo has been loaded
|
|
(use-package bar
|
|
:after foo)
|
|
#+end_src
|
|
|
|
* Track usage of Emacs packages over time :emacs:org:orgbabel:
|
|
|
|
#+begin_src org :tangle gists/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.
|
|
|
|
Local variables:
|
|
eval: (add-hook 'after-save-hook #'org-babel-tangle 0 t)
|
|
End:
|