Skip to content

Instantly share code, notes, and snippets.

View bigodel's full-sized avatar

João Pedro bigodel

View GitHub Profile
@bigodel
bigodel / literate-ledger.org
Last active March 7, 2024 07:27
Literate Ledger Programming(?) with Org-mode

Literate Ledger Programming(?) with Org-mode

Recently, given the economic hardships presented by the current pandemic, coupled with the fact that I have started making my own money, I have started to keep track of my finances. I have always known that I would use Ledger, the command line account tool, to manage my money. Ledger was created by an Emacs maintainer, which hints to a very good Emacs integration, and indeed =ledger-mode= offers a great environment for editing, reporting and modifying Ledger files. But even though it is a pretty complete major mode, I missed being

;; declare it here for Emacs < 28
(defmacro dlet (binders &rest body)
"Like `let' but using dynamic scoping."
(declare (indent 1) (debug let))
;; (defvar FOO) only affects the current scope, but in order for
;; this not to affect code after the main `let' we need to create a new scope,
;; which is what the surrounding `let' is for.
;; FIXME: (let () ...) currently doesn't actually create a new scope,
;; which is why we use (let (_) ...).
`(let (_)
@bigodel
bigodel / modular-tex-templates-with.org
Last active October 23, 2021 03:38
Contrived (La)TeX templates for Org-mode

Contrived (La)TeX templates for Org-mode

In my for ever long task of achieving Emacs and Org-mode configuration nirvana I stumbled upon the problem of trying to reuse a couple of .tex files I keep as templates for my (La)TeX exports for Org-mode. As I started to collaborate more and more in my TeX files, I realized that this setup would also need to be TeX-wise independent, that is, the exported .tex file should be self contained and self sufficient, so that I can keep collaborating and other people can see my work and (hopefully) reproduce whatever I have written without my

@bigodel
bigodel / return-to-hyper.org
Created February 8, 2021 14:58
Remapping Return to Hyper when pressed

Remapping Return to Hyper when pressed

Try with Return if this doesn’t work.

First you need to remove Hyper from the mod4 group of modifiers[fn:1], because it will most likely be interpreted as Super. To do that:

xmodmap -e "remove mod4 = Hyper_L"
xmodmap -e "add mod3 = Hyper_L"