Kaviraj       Archive       Tags

Review: Emacs Lisp Intro Manual

Once you start using emacs for most of your editing/coding tasks, then that will make you serious about using it productively

From then on, you can no longer use Emacs without customizing it. Yea, of course there are tons of elisp code snippet out there to customize it just by copy pasting without understanding what it does or how it works.

But that no longer works on the longer run. At some point of time you have get started on learning Emacs lisp.

Same thing happened to me few weeks back. I got tired of customizing emacs just by including some piece of elisp code from somewhere on the internet into my .emacs file without even understanding what the code does.

So at the end,

  • My .emacs file got messy without organizing.
  • Its very frustating to debug if something goes wrong.
  • I started to get afraid of parenthesis 😧

Just then, I figured it out I just need to get started on learning Emacs lisp.

Read More

#elisp #emacs

Emacs: Split window with different buffer

It’s common to split windows while working in emacs. By default, whenever we split windows in emacs the newly created window will also have the same buffer(same buffer in two windows). So it is always needed to change to another buffer by C-x b after splitting it.

We can customize it by little elisp code as below.

Read More

#elisp #emacs

Understanding regular expression parsing

I was reading a wonderfull article on python regular expression. And I was playing with some example code.

import re

text = "aabbbaaababaab"
pattern = "abb"

re.findall(pattern, text)
# output: ['abb']
# pattern 'abb' found at index 1:3

then I got stuck with following code. I couldn’t understand why the output is the way it is.

import re

text = "aabbbaaababaab"
pattern = "ab+" # a followed by one or more b

re.findall(pattern, text)
# output: ['abbb', 'ab', 'ab', 'ab']
# wait.. Where is "abb"?

Read More

#python #regular-expression