My Emacs Workflow

After a few years of using Emacs mainly for smaller side projects or scripting, I have started to integrate it more and more into my daily work, turning it slowly but surely into my main IDE.

Although PyCharm still has a couple of tools which I can't resist abandoning (namely the Conflict Resolution action and the execution configurations), I am starting to feel that with Emacs 28 built with native compilation and native json support, I do not miss much from outside Emacs, and all the newer tools like counsel, vertico, project.el, tab bar and vertico are making developing a personal workflow simple and enjoyable.

I wanted, then, to share my experience in building an environment that makes it easy to have a highly customized workflow that simply adapts to what you want, and offers tools that sometimes are only behind paid versions of other IDE's.

Start the project of the day with a cup of coffee and tab-bar

The first thing I do, after booting and letting native compilation complete, is to go to the project I am going to work on by using C-x p p (using the built-in project.el) and opening the directory or file I need to work on. Usually, it is a python file, and next to it I open a new window running and interpreter always ready to be used and a third window where I can have the output of execution configurations be displayed. After these windows are set up, I just start tab-bar-mode , this way I have my main workspace set. This is where I can have fun.

/img/python-workspace.png

Keep the house clean while doing VC.

I create a new workspace C-x t 2 and start dirvish (https://github.com/alexluigit/dirvish ), which is a file manager based on dired to have smoother browsing and previews of your file system. The reason I prefer dirvish to dired is that it can show file previews and has a side version you can toggle which makes you forget about neotree. On a second window I open eshell, customized with a module from elken https://github.com/elken/eshell-p10k so that it can be as nice as oh-my-bash. This allows me to execute commands if needed, let me know if my venv is enabled and show some things of the git status, plus, I'm already in my project directory. Finally, on a third window, I open the magit-status menu. What is magit (https://github.com/magit/magit ) ? It is an awesome package, something difficult to come back from once discovered, that makes a lot of git actions way smoother and easier, from cherry picking commits across other branches from their logs, to squashing commits, to browsing the repo history. This workspace is where I will come to manage files to be deleted or commit/pull changes. This, I view as housekeeping.

/img/magit-workspace.png

Look out the window and stop a process when needed

Finally, I create one last workspace where I can keep an eye on my machine system status and resources with built-in proced, check and manage docker containers with docker.el, from here I can also easily ssh or edit stuff inside a container with docker-tramp, which makes it really simple and easy to do even with remote machines. Here I can aslo look at things are going on in my cluster using kubernetes.el, although the cli k9s is an awesome alternative I use more often than kubernetes.el. This, is when I have to look out of the window and check the weather.

/img/system-workspace.png