Here are all the blogs that I have written.

Optional dependency loading in Emacs, a good idea?

Hey guys! I have gotten a sudden motivation to refactor my nixos dotfiles, and I have an idea, don’t know if it’s good or not so here it is:

While developing code, I feel like your system should have 0 development dependencies, all of them should be project dependencies instead. However my text editor has certain configuration files for all languages, so it has packages installed for all of the possible languages and frameworks and tools that i’ll be using.

Read more →

How Emacs taught me programming

I’ve been using emacs for around 4 years now, and as I’m entering the 2nd year of my college, I can feel I’ve grown significanly along with my text editor.

Emacs (and Linux) has taught me a lot about Software Engineering. Reading other people’s configuration files, writing my own unique snippets, and playing with packages has really helped me learn programming. Many programmers advice to make a “project” to really get a grasp of programming and get experience, for me a large part of that was emacs. While I was using emacs to code, I was also learning how to read the manual, refer the web to figure out problems, and gather help from forums(You guys rock).

Read more →

Using meow.el for modal editing

I have been using meow.el instead of evil for my modal editing since the past 4 months, and have mixed reviews about it. Read on if you would like to decide to try meow for yourself.

Introduction

Meow mode takes insipiration from kakoune style keybindings. In vim’s modal bindings, you have to type the verb first (deletion, pasting, etc.) then select the portion on which to act (word, paragraph, etc.). This method is error prone, not only for beginners but for experienced users as well.

Read more →

Ricing Org Mode

A majority of emacs users are absolute die-hard fans of org mode, and wouldn’t be able to live without it. And it makes sense too, it’s a tool that you can use in whatever workflow you prefer, which is really powerful. However as a relatively new emacs users (only 2 years!), I couldn’t really get org mode. I never felt satisfied when using it, as for me it seemed like an old technology, especially for a person who’s used to the web apps, which have a totally different UI .

Read more →

Quickly toggle Eshell in emacs

One of my Emacs’ favourite features is Eshell. However recently I wanted to create a function, that automatically toggles eshell, like vscode, and gives priority to the project root (if in project). This little code snippet does exactly that:

(defun binary-eshell/toggle-eshell ()
  (interactive)
  (let ((eshell-buffer-name (binary-eshell/eshell-buffer-name)))
    (if (binary-eshell/eshell-toggled-p)
        (delete-windows-on eshell-buffer-name)
      (progn
        (split-window-below)
        (if (project-current)
            (let ((default-directory (project-root (project-current))))
              (eshell)))
        (eshell)))))

(defun binary-eshell/eshell-toggled-p ()
  "Checks if eshell is toggled."
  (let ((eshell-buffer-name (binary-eshell/eshell-buffer-name))
        (result))
    (dolist (element (window-list) result)
      (if (string= eshell-buffer-name (buffer-name (window-buffer element)))
          (setq result t)))
    result))

(defun binary-eshell/eshell-buffer-name ()
  "Returns the name of the eshell buffer. It works on the basis of the following rule:
If the current buffer is part of a project, then name it on the basis of the project,
else name it on the basis of default-directory."
  (let ((eshell-buffer-name))
    (if (project-current)
        (setq eshell-buffer-name
              (concat "*eshell-" (project-name (project-current)) "*"))
      (setq eshell-buffer-name (concat "*eshell-" default-directory "*")))))

Call binary-eshell/toggle-eshell and voila! It opens an eshell window, for you to work on! With this, I have hopefully shown you how you can incorporate eshell even more into your workflow.

Read more →

My Workflow

I use Emacs as my main text editor of choice, mainly because I’m trying to incorporate org mode into my workflow.I use the Doom Emacs Configuration, as it is basically what I want, with a very speedy code base. My configuration is not a literate one unfortunately, but it is available at my dotfiles repo.

The other major tool that i use is Nixos. It’s an operating system based on the functional package manager Nix, which is an absolute game changer in writing software. More importantly, it means you can have different versions of the same package for the different software that you may be developing on your machine. Also, it makes it easy for developers to make sure that the software works on everyone’s machine. It’s not for everyone though, and it needs serious dedication to get into the nix ecosystem, but if you do, boy oh boy does it pay off.

Read more →