Questions tagged [paredit]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
20 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()...
1
vote
2answers
102 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
77 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
56 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
2answers
215 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, ...
6
votes
1answer
190 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 ...
1
vote
0answers
149 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 ...
5
votes
3answers
352 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 ...
0
votes
0answers
41 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 ...
3
votes
1answer
76 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 ...
1
vote
0answers
46 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. ...
4
votes
1answer
248 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.
1
vote
0answers
154 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
1answer
742 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 ...
5
votes
2answers
216 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 ...
8
votes
1answer
138 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)| ) )) ...
0
votes
0answers
505 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
77 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 ...
0
votes
1answer
255 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
0answers
230 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 ...
13
votes
3answers
1k 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 ...
1
vote
0answers
61 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 ...
4
votes
1answer
140 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 ...