Org roam seems to be very nice indeed. Maybe I will ditch org-brain…
Emacs
Org-roam over org-brain?
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.
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)))
Running repl commands in cider (emacs)
Ok, I will admit.. this took a while. But I have found a nice way of doing this.
What is this? Well, let’s say that you have a command to start your
server in user namespace. With this cool feature, now you can run
this with a emacs command (or shortcut if you bind it).
The cool thing about this is that the command will run with the namespace from the repl and not the last ns that you loaded with cider =].
Here is a taste:
(defun le2m/cool-repl-command ()
(interactive)
(cider-interactive-eval
(cider-insert-in-repl (format "(clojure.core/require 'a-namespace)
(a-namespace/do-something
(fn lambda-example [t] (:get-a-key (meta t))))") 't)))
Restclient is dead… Now we have verb!
Recently I found an interesting mode in emacs to manage and run http requests!
enjoy! heheh
Emacs code navigation? TAAAGS!
Do you know when you open a code file and you want to navigate it but you have to fire up a whole enviroment just to do it? In clojure, would be cider, in python it would be elpy and so on…
Well, get ready feel free! All you need is a command line and vanilla emacs!!
The command is etags. What this command does is look for all the
definitions you made in the files you pass as an argument with the
language and it will create a TAGS file in the current directory.
find . -type f -name "*.clj" | xargs etags --language=lisp
Once that is done, use you xref-find-definitions and
xref-pop-marker-stack command (alias in
vanilla as M-. and M-,, respectively) and it will ask you where is
the TAGS table.
You can reset the table with tags-reset-tags-table. If it feel very
UNIX like, you would be right. It is! Enjoy!
Oh, not sure what languages are supported? Fear not!
etags --help
Emacs? No, emacsclient!
This is a shoutout for all of you who are tired of waiting emacs to load on startup or annoyed to feel forced to leave an instance open.
emacsclient can save you from that. All you have to do is to leave an
daemon open. Don’t use (server-start) because that will force you to
have an GUI or terminal open at all time. The solution? A command.
On your terminal (or .xsession file):
emacs --daemon
After that, you can invoke emacs GUI with emacsclient -c and
emacsclient -t to open directly in the terminal. The colors probably
will not match, so you can take a look here =].
Now, to make life a little bit better, you can create alias/binary
alias emt='emacsclient -t'
#!/bin/sh
emacsclient -c -F '((font . "Hack 12"))'
The latter I use as a binary in $PATH to be invoked with rofi or as
a shortcut in the dwm.
Thanks Pedro for the post idea hehe.
A first (not bad) emacs experience
Well, not for me. I have been using emacs for almost a decade now and I have used bad configs and good ones. In the past few years that I am feeling more comfortable with lisp, I have been enjoying to tweak the configuration more and more.
My girlfriend has recently come to the good side of workplace and could drop Windows and its tools. In this new world, she tried to go into the Linux and emacs was something that I was more than eager to show her!
The problem
Well, emacs has quite of an interesting learning curve
source
and I totally agree with it! So I created what it could be a first step to use it.
What is FirstEmacs?
What I looked for was a way to drop the two most troublesome keys in emacs (in my opinion) and its consequences. Which are Ctrl+x, Ctrl+c and Ctrl+v for cutting, copying and pasting. And emacs has most of its hotkeys attached to Ctrl+x and Ctrl+c.
It took me some time, but then I found wakib-keys. Which was pretty much the solution I was looking for. Basically, remaps the standart Ctrl+x and Ctrl+c to Ctrl+e and Ctrl+d.
Last note
Writing this assured the usefulness in the notation C-c and C-x for Ctrl-c and Ctrl-x (and so on) =].

/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Org-roam over org-brain?