Questions tagged [paredit]
Paredit is an emacs minor mode for controlled editing of s-expressions.
29
questions
13
votes
3answers
2k views
Move form up and down on paredit mode
I've been using cursive's Structural Editing (a paredit-like mode for Intellij and Cursive) and I found a nice command there called move form-up (and down).
Move form up does this (the | is the ...
8
votes
1answer
162 views
Is there a command for tidying trailing parentheses?
When editing lisp code, I often end up with trailing parentheses scattered around (assuming | is point):
(defun example-function ()
(let ((x (+ 1 1)))
(when x
(message x)|
)
))
...
6
votes
1answer
297 views
fill-paragraph (`M-q`) for s-expressions?
With M-q (aka fill-paragraph), it is possible to format a single line of text nicely.
Is there a command or function which does a similar thing for lisps s-expressions?
It should break one-liner ...
6
votes
2answers
397 views
What is the reverse command to paredit-wrap-around?
I am using paredit. Sometimes I accidentely wrap something in curly braces or I have a situation where I want unwrap something for some other reason? What ist the right command to use when undo does ...
5
votes
1answer
168 views
hippie-expand disturbes paredit
paredit restricts my editing freedom to guarantee me that my s-expressions are never unbalanced. Unfortunately, hippie-expand doesn't care a bit about rules and manages to disturb the balance by ...
5
votes
4answers
495 views
How to do paredit-kill backwards?
Most everyone who uses paredit has used paredit-kill (i.e., C-k), which allows one to delete a line forwards whilst keeping delimiters balanced properly. But how does one do this in the reverse ...
4
votes
1answer
258 views
Paredit doesn't close {
I am using paredit. It terminates ( and [ and " fine, but does not close the { in any modes. How can i configure it to do this too? I have emacs24.
3
votes
1answer
102 views
Lispy movement commands that treat atoms and parenthesized s-expressions the same?
lispy-flow almost does what I want. The problem is, though it descends into a parenthesized sexp, it does so only if that parenthesized sexp contains another parenthesized sexp. The fact that it skips ...
2
votes
1answer
870 views
Cannot install Paredit
I am new to emacs.
I want to install paredit mode on emacs 24. I am using Melpa.
When i do M-x package-install RET paredit RET or try to install it from package-list-package i see the error in the ...
1
vote
1answer
151 views
Paredit: How to just enter " or )
I am having enormous difficulties typing lisp code in Portacle, is a complete IDE for Common Lisp based on Emacs. It is trying to get cute whenever I enter a " or a ). Sometimes it breaks my code.
...
1
vote
1answer
326 views
Editing HTML structurally
Recently I've done a lot of work cleaning up some HTML files that were generated by LibreOffice. It made me really wish for a way to edit the document structure, Ć la paredit-mode.
For example, for ...
1
vote
2answers
254 views
In terminal, C-) and ) both execute evil-forward-sentence. I want C-) to run paredit-forward-slurp-sexp
If I type C-f paredit-forward-slurp-sexp, Emacs tells me the command is mapped to C-). Yet through C-h k I realized that both C-) and ) run evil-forward-sentence. If I do C-f evil-forward-sentence, ...
1
vote
2answers
337 views
Can't type unbalanced closing curly brace in Clojure mode
When I open a Clojure file, and I'm not using Paredit, I expect to be able to type unbalanced parentheses and brackets. I can type any of these characters: ()[]{, balanced on not. But if I try to type ...
1
vote
1answer
188 views
How to swap s-expressions with paredit?
I often need to swap s-expressions. How can I do that with paredit? I want to do things like the following:
(list |1 0)
(list 0 |1)
or:
(list 1 |0)
(list |0 1)
1
vote
0answers
211 views
How to get hungry-delete working in paredit-mode?
Using hungry-delete is really nice, see this Blog post. But with paredit activated, hungry-delete functions are not triggered.
paredit defines <delete> as paredit-forward-delete and DEL as ...
1
vote
0answers
60 views
paredit-forward-up won't cross line boundary
(a b (c |d) e f)
C-M-n works as I would expect, producing this:
(a b (c d)| e f)
But if I break the line after the (c d) like soā¦
(a b (c |d)
e f)
The same C-M-n does absolutely nothing. ...
1
vote
0answers
226 views
use paredit key bindings with paredit-everywhere
How can I tell paredit-everywhere to use bindings from paredit,
so I can :
Use paredit's keybinding without having to redeclare them
Keep paredit-everywhere shortcuts the same as paredit if I ...
1
vote
0answers
69 views
Can I make paredit work with only braces {ā¦} instead of other parens?
I'm trying to create paredit functionality for TeX modes and I'd really like to avoid actually rewriting paredit.el. (I've spent a good portion of the day doing this with no significant progress.)
I ...
1
vote
0answers
245 views
Unable to get backtrace for error
I have installed paredit & need to turnoff smartparens. I checked this answer and I have added
(advice-add #'smartparens-mode :before-until (lambda (&rest args) t))
to my prelude starter ...
0
votes
1answer
33 views
Spacemacs, Lisp, Pasting and the missing Space
When editing Lisp or Clojure in Spacemacs (Emacs with Evil) I find the pasting behavior anoying. Say I have yanked bar and want to paste it as a parameter to (foo) so I get (foo bar). The problem is, ...
0
votes
0answers
16 views
What is the hook for Slime Eval minibuffer?
I have installed Slime and Paredit (M-x package-install paredit) and I have configured it in my ~/.emacs too like this:
(setq inferior-lisp-program "/usr/local/bin/sbcl")
(add-hook 'eval-...
0
votes
0answers
33 views
Enabling paredit automatically in clojure and clojurescript buffers
I want to auto-enable paredit it in clojure and clojurescript buffers, and have the following:
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code....
0
votes
0answers
111 views
How to enable paredit mode on all clojure, closurescript and elisp buffers automatically?
I want to enable paredit-mode on all clojure, cljs and elisp buffers by default, which is probably going to happen through the .spacemacs file. This is what I have so far in the user-config function ...
0
votes
1answer
201 views
How to enable paredit mode on all clojure, clojurescript and elisp buffers automatically?
I want to enable paredit-mode on all clojure, cljs and elisp buffers by default, which is probably going to happen through the .spacemacs file. This is what I have so far in the user-config function ...
0
votes
0answers
32 views
Use arrows keys to call Lispy functions
In lispy-mode, I want to use control + the arrow keys instead of lispy's defaults (h, j, k, l).
But if I run the obvious code
(define-key lispy-mode-map [C-up] 'lispy-up)
then C-up always ...
0
votes
0answers
39 views
Debugger entered--Lisp error: (wrong-type-argument wholenump -98) [duplicate]
I am working on Org 9.1.8 and emacs 26.1,
Every time I invoke Enter, it prompts
Debugger entered--Lisp error: (wrong-type-argument wholenump -98)
make-list(-98 nil)
lisp-indent-initial-state()...
0
votes
0answers
60 views
bug with web-mode and paredit
I have paredit configured to work on javascript files. I also have web-mode enabled
It seems to cause a bug in certain situations.
Here is a stack trace I got by trying to clear all the text in an ...
0
votes
0answers
515 views
Paredit slurp hotkey doesnt work [duplicate]
I'm having a real hard time getting the paredit slurp key to work. I know it is bound to C-), and by describing the paredit-slurp-forward-sexp it confirms that.
When I fire up M-x describe-key and ...
0
votes
0answers
113 views
lisp code not indenting after paredit slurping, etc
When I use smartparens-mode or paredit-mode to shift parens around (e.g. paredit-forward-slurp-sexp) the effected forms are not being indented appropriately. For example if I add a let and then slurp ...