Questions tagged [paredit]

Paredit is an emacs minor mode for controlled editing of s-expressions.

Paredit keeps parentheses balanced while editing Lisp source code.

65 questions
40
votes
4 answers

How to delete extra parens in Paredit mode?

I'm using Paredit in Emacs to edit Lisp code. How do I delete an extra pair of parens that I accidentally inserted? Paredit does not allow this without extra commands. ((square 5)) into (square 5)
Sathish
  • 20,660
  • 24
  • 63
  • 71
31
votes
6 answers

How do I set up Aquamacs for Clojure development?

I've tried to migrate to Emacs several times for Clojure development, following a variety of blogposts, screencast and tutorials, but somewhere along the way something always went wrong - keybindings that didn't work, incompatible versions, etc, and…
Michiel de Mare
  • 41,982
  • 29
  • 103
  • 134
16
votes
4 answers

How do you comment out all or part of a Lisp s-exp using Paredit?

When editing Lisp code, occasionally it's useful to entirely comment out a top-level definition, like this: ;(defun some-fn-which-is-broken (x) ; ...) ... or comment out only part of an s-expression, like this: (foo x ; y z) ... and then…
okonomichiyaki
  • 8,355
  • 39
  • 51
15
votes
4 answers

I can't find a light table cheat sheet

Does anyone have a cheatsheet for LightTable, even better for the paredit plugin, it seems my google-fu is not up to finding one?
shmish111
  • 3,697
  • 5
  • 30
  • 52
14
votes
3 answers

emacs paredit - how to delete quotes

I'm using the emacs starter kit, https://github.com/technomancy/emacs-starter-kit, which comes with paredit mode. I'm writing some javascript, and would like to remove something from quotes. Eg. "somestring" should become somestring What the best…
mark
  • 4,678
  • 7
  • 36
  • 46
12
votes
3 answers

Paredit forward slurp "C-)" does not work for emacs on Windows 7

After migrating to win7 paredit's forward slurp "C-)" no longer works and "C-right arrow" still works, rebinding the sexp to a different combination (such as C-0) works as well. Does anyone have the same issue out there?
siyu
  • 121
  • 5
11
votes
4 answers

Emacs paredit-mode -- how to correct unbalanced parenthesis in yanked code?

Occasionally I yank code into a paredit-mode buffer that is missing a closing parenthesis or bracket. paredit-mode then detects the unclosed expression and tries to add the missing paren in the wrong place. This is frustrating when I move the cursor…
Reed G. Law
  • 3,897
  • 1
  • 41
  • 78
11
votes
4 answers

what's the use for paredit-convolute-sexp in paredit mode

It changes (a b c d (1 2 |3 4) ha ha ha) into |(1 2 (a b c d 3 4 ha ha ha)) What is the use for that transformation?
Jisang Yoo
  • 3,670
  • 20
  • 31
10
votes
3 answers

Changing Paredit Formatting

When using paredit in programming modes such as C, typing ( will insert a space before the paren when I'm trying to call a function, leaving me with: foo () Is there a way to disable the insertion of the space without changing paredit's source?
Nathaniel Flath
  • 15,477
  • 19
  • 69
  • 94
10
votes
2 answers

paredit curly brace matching in swank-clojure repl

I am using emacs 24 on Windows 7 and have installed technomancy's clojure-mode along with paredit 23 beta. I load the source file from my leiningen project and get a repl using clojure-jack-in. The problem is that while paredit is enabled in both…
pventura
  • 117
  • 6
10
votes
3 answers

Slurpage and barfage in Clojure

I am using vim-sexp and vim-sexp-mappings-for-regular-people plugins for editing Clojure files. I don't quite understand what slurp and barf commands do exactly. I tried playing with them, and it seems that they insert/remove forms at the…
siphiuel
  • 3,480
  • 4
  • 31
  • 34
10
votes
2 answers

How can I get paredit mode when doing eval-expression?

I love Emacs' paredit-mode, but I miss it very sorely when doing eval-expression (M-:). How can I have paredit in the minibuffer when doing eval-expression? Thanks!
draebek
  • 197
  • 1
  • 7
9
votes
3 answers

Why can't I change paredit keybindings

I'm trying to use just a few functions from paredit, without loading all the keybindings. Looking at paredit.el, the only keymap I found was paredit-mode-map, so I tried this. (setq paredit-mode-map (make-sparse-keymap)) (define-key paredit-mode-map…
snowape
  • 1,274
  • 10
  • 23
8
votes
5 answers

Just getting used to paredit in emacs on OS X - how come C-) doesn't work?

I've recently set up a Common Lisp programming environment in Mac OS X Leopard. One emacs module which I've found to be indispensable is paredit. Paredit is doing its part to help me wrangle my Lisp code more easily, but I've ran into a bit of a…
Joe Taylor
  • 638
  • 6
  • 12
8
votes
2 answers

SLIME on Emacs with paredit in repl - how to prevent execution of incomplete but balanced expressions?

I use paredit on emacs with SLIME's repl. This means that at any point during my typing on the repl, my s-expressions are balanced. However, they may not be complete, and I might want to continue typing inside them in another line, as…
ARV
  • 6,287
  • 11
  • 31
  • 41
1
2 3 4 5