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.
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 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!
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)))
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
=].
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!
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
/comments ~lucasemmoreira/opinions@lists.sr.ht?Subject=Re: Erlang small QoL