Emacs Rocks! Episode 14: Paredit

Channel:emacsrocks · Length:3:25 · Published:2013-03-21 · Views:65462

Watch on YouTube

Summary

A three-minute Emacs Rocks screencast by Magnar Sveen demonstrating paredit, which edits Lisp code structurally as a tree of s-expressions rather than characters.

Why HN recommends it

Repeatedly offered as the quickest, most convincing demo of structured editing and why Lisp programmers love paredit.

it's well worth the 3:40. — HN, 2013

Functional programming · Testing, debugging & developer tools

Subtitles (excerpt)

the other day Kent Beck the eminent the all father of test driven development himself said this he'd like a text editor that only allows transformations of the abstracts in text Tre for lisp emx is that editor paredit is a wonder and a struggle I had a really hard time adjusting and I quit several times it took this quote from technomancy to guilt me into working through the pain what made me finally understand parit is realizing it is about treating the code not as text to be inserted and erased but as a tree to be manipulated let's look at some cool stuff we can do saving Excursion is a favorite pastime for emex list Packers let's wrap these three functions notice how it wraps around the first s expression and those next two slurp them in and barf them out again slurping and barfing beautiful how can you not like it okay next example let's say Just One of These predicates will do I can race it up oh look again racing replaces the entire parent with a child so if I erase this those other statements are gone instead I use splice as expression killing backwards breaking out of the conditional very handy next I have a conditional around the let statement let's say I need V and X in one of the predicates so I need let first and then the

On Hacker News

For those not familiar with Emacs, IntelliJ IDEA with La Clojure is also an okay choice. I use IDEA for Python, Java and Scala; and still switch to Emacs when I code in Clojure. The reason is that Emacs has really strong toolset for LISP, where many of the features are missing from other environments, or implemented partially. Slime/swank (nrepl replaces it, but I'm just slowly transitioning to i… — Kaali, 2013-06
Yeah... a couple GIFs would. If I was them I would've just embedded this video from "Emacs Rocks!": [VIDEO] It shows how incredible paredit is. — gabiruh, 2022-11
not op but for me structured editing is one of the biggest pluses when it comes to editing lisp code. here is a good example of what i mean [0]. btw autolisp standard formating is kind of an anti-example of good lisp formating. in emacs lots of excellent tools exist to make parantheses an extremely helpful feature [1] [0] [VIDEO] [1] [LINK] — medo-bear, 2022-10
The parentheses end up serving as a tool to speed up the development process with tool like paredit. You end up manipulating the "tree" of code vs the characters on a line. Check this out: [VIDEO] — peterhadlaw, 2017-05
Emacs's structured editing, in the style of paredit[1], sounds very similar to a text-based version of syntax-directed editing (SDE). Designed for Lisp and S-expressions, it's a system that lets you edit and navigate around nested expressions at a syntactic rather than textual language. As you type, the correct level of nesting is maintained and there are commands for moving and editing code in t… — tikhonj, 2014-08

Related videos