-----BEGIN PGP PUBLIC KEY BLOCK-----
mDMEamicvBYJKwYBBAHaRw8BAQdAt/buKp/D8lia5OvFNoXc5PoIMKWtoxgUpdpX
a1nnFau0NEx1Y2FzIEUgTW9yZWlyYSAobm9tZSBjb20gZSkgPG1lQGx1Y2FzZW1t
b3JlaXJhLnh5ej6ImQQTFgoAQRYhBNTS9Ew+hr6URe8CiDk+Kz5R8HBLBQJqaJy8
AhsDBQkB4TOABQsJCAcCAiICBhUKCQgLAgQWAgMBAh4HAheAAAoJEDk+Kz5R8HBL
ZBoBAOY5yW9TBHDsGU0qF3ep7jNctGf0e+uZw1gFfPfdvjEtAQCowQW33v13aXKH
Nq//t0uc0YH4Yy8tyIyoHesv6tYNA7g4BGponLwSCisGAQQBl1UBBQEBB0DUldcK
VyZQRM/9l2HtqcMFTr1HtBpL3qqhPqvGurybBAMBCAeIfgQYFgoAJhYhBNTS9Ew+
hr6URe8CiDk+Kz5R8HBLBQJqaJy8AhsMBQkB4TOAAAoJEDk+Kz5R8HBLYBIBAKac
7IrQyBUYO5TXlvfFRzfKMSz7tmH5qnH1lUeOXj+aAP9EAnjtnmPLy2no5yFDRoAh
ck0QKDZsb6LKl0CD+8KBCA==
=5Nkw
-----END PGP PUBLIC KEY BLOCK-----
My gpg key
Erlang small QoL
This is small proposal to improve erlang navigation when coding. It is a two piece adjustment:
In the Makefile
tags:
find src include deps -name "*.[he]rl" -print | xargs etags -o TAGS
And in emacs, you can do this:
(defun le2m/erlang-update-tags ()
(interactive)
(let ((root (locate-dominating-file default-directory "Makefile")))
(when root
(let ((default-directory root))
(shell-command "gmake tags")
(message "Tags updated")))))
(advice-add 'erlang-compile :before #'le2m/erlang-update-tags)
When typing C-c C-k, the TAGS file will be “automagically” created
Org-roam over org-brain?
Tmux over fancy terminals
I do like minimal stuff so I have avoided most of the terminal with tabs and fancy “features”. Turns out, all I want, I can get from tmux.
A few tips from my usage
- divide usage of session per context:
new-session - inside same context, use windows:
new-windoworprefix+c - Use
list-window(prefix+w) orlist-session(prefix+s) to navigate
If you are a dwm user, I have just set up to open the tmux directly
static const char *cmd_term[] = { "st", "-e", "tmux", NULL };
// inside Key
{ MODKEY, XK_Return, spawn, {.v = cmd_term } }, // terminal
This is interesting because everytime you open the terminal a new session will pop. Hate it or love it.
Emacs mode line
If like me, you don’t mind how pretty the modeline looks in your emacs, then you can set it pretty easy.
Why would you want to do this? Well, what happens is that I have a pretty small screen in my monitor and if I split vertically, I lose some useful information like the time on a task.
Now to the how:
(setq-default mode-line-format
(list "%e"
mode-line-remote
mode-line-modified
mode-line-front-space
mode-line-frame-identification
mode-line-buffer-identification " "
mode-line-position project-mode-line
" "
mode-line-misc-info
mode-line-end-spaces))
Not sure what all that is? Checking the docs in emacs is ez ;]
Org mode audience
Org-mode is not for everybody, I think. However, I do think that org-mode is for anybody that is willing to learn enough elisp to shape the desired workflow.
A keyboard utility for everyone
Have you ever noticed that your on your keyboard the letters j and f
both have a little dent on it. Well, that is not by chance. I will tell
you more, my brazilian keyboard as well as my american keyboard, also
have it.
Why? It is a way for you to find the “rest” position of your hands without you having to look at it. Is your mind blown? Mine was!
Improving mode line in emacs
A nice UI feature in emacs in my configuration was having a bit more control over the mode line (the thing between the buffer and the mini buffer).
Now that I have been controling my hours with emacs org clock, it is really nice to have at glance how many hours I have been working. The issue is that sometimes, my config has a bunch of minor modes and the mode line has a lot of noise. dminish-mode was a great finding for this!
Improved (maybe) indenting on save
I realized that sometimes identing the whole buffer might not be the desired output. That because if the file is on different identation, your git commit might be hard to follow.
Because of that I studied a bit emacs lisp and came up with similar idea. On save, indent only the function that you are working on.
(defun le2m/indent-function ()
"indent only function"
;; (interactive)
(delete-trailing-whitespace)
(let ((begin (save-excursion (beginning-of-defun) (point)))
(end (save-excursion (end-of-defun) (point))))
(indent-region begin end nil)))
Indent file on save, please
So, I discovered that I really like to format the code on save (I am not the best typer). So emacs to the rescue:
(defun le2m/indent-buffer ()
"indent whole buffer"
(delete-trailing-whitespace)
(indent-region (point-min) (point-max) nil)
(untabify (point-min) (point-max)))
(add-hook 'clojure-mode-hook
(lambda ()
(add-hook 'before-save-hook
#'le2m/indent-buffer
t t)))
I did this on clojure-mode but it can be done in any mode I guess.

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: My gpg key