[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Proposed Minor-mode] Speed of thought Lisp (was: Abbrevs for the most f

From: Artur Malabarba
Subject: [Proposed Minor-mode] Speed of thought Lisp (was: Abbrevs for the most frequent elisp symbols)
Date: Sat, 24 Jan 2015 14:38:53 -0200

For a while now, I've been using a system that leads to very fluid elisp coding. The focus is on writing lisp as fast as you can think of it, without being slowed down by your typing speed.
Thus the name: Speed-of-thought Lisp.

I've packaged it into a minor mode, which I'm proposing for inclusion into Emacs. I really can't overstate how much I've come to like this little mode, so hopefully some here will find it useful too.

The mode is quite simple, and is composed of two parts:


A large number of abbrevs, almost identical to what was discussed back in December on a thread in help-emacs. These abbrevs expand function initials to their name. The actual abbrevs are completely arbitrary (I added them as I ran into them), so I'm perfectly open to changing them based on general usage frequency.

A few examples (currently they are 96 in total):

However, these are defined in a way such that they ONLY expand in a place where you would use a function, so hitting SPC after “(r” expands to “(require '”, but hitting SPC after “(delete-region r” will NOT expand the `r', because that's obviously not a function.

Furtheromre, “#'r” will expand to “#'require” (note how it ommits that extra quote, since it would be useless here).


It also defines 4 commands, which really fit into this “follow the thought-flow” way of writing. The bindings are as follows, I understand these don't fully adhere to conventions, and I'd appreaciate suggestions on better bindings.

Hitting RET followed by a `(' was one of the most common key sequences for me while writing elisp, so giving it a quick-to-hit key was a significant improvement.

With these commands, you just write your code as you think of it. Once you hit a “stop-point” of sorts in your tought flow, you hit C-c f/v on any undefined functions/variables, write their definitions, and hit C-u C-SPC to go back to the main function.

Small Example

With the above (assuming you use something like paredit or electric-pair-mode), if you write:

    ( w t b M-RET i SPC text

You get

      (insert text))

Cheers to all, and please let me hear your thoughts!

Attachment: sotlisp.el
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]