Questions tagged [paredit]

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

Filter by
Sorted by
Tagged with
0 votes
1 answer
45 views

Why is `paredit-kill` (`C-k`) not working in the minibuffer?

This is my config file. I frequently use C-k which is bounded to paredit-kill. In general, it works. However, it does not work when I am typing in the minibuffer. For instance, after executing C-x C-f ...
Pedro Delfino's user avatar
2 votes
1 answer
322 views

How do I disable paredit-ret in sly-mrepl*?

I am trying to migrate from slime to sly. But I want to use paredit in sly-mrepl. Naive enabling of paredit in sly-mrepl leads to a problem where pressing RET in repl calls paredit-ret. But I want to ...
ruby_object's user avatar
1 vote
1 answer
60 views

How to ignore errors in the middle of a key/command sequence?

I wanted to jump to the end of the current top-level S-expression as described in this question: How to move up to the ending parenthesis of the enclosing list (if it exists)?. The goal is to position ...
tinlyx's user avatar
  • 1,314
3 votes
2 answers
232 views

How to move up to the ending parenthesis of the enclosing list (if it exists)?

In paredit mode, C-M-u (paredit-backward-up) is used to move the point backward up out of the enclosing list The point is parked at the beginning parenthesis of the enclosing list. My question is: ...
tinlyx's user avatar
  • 1,314
1 vote
0 answers
242 views

How to change this Paredit configuration on the init file from the classic imperative installation to a declarative approach via use-package?

When I first installed Paredit, I used to install things via the classic M-x and package-install. Then, I inserted the following configuration: (autoload 'enable-paredit-mode "paredit" "...
Pedro Delfino's user avatar
3 votes
1 answer
497 views

How can I insert the backslash character ( \ ) before quotation marks (" ") in Emacs?

I am running Emacs and writing on the scratch-buffer. This is my config file. After executing describe-mode, this is the list of minor modes running: Enabled minor modes: Auto-Composition Auto-...
Pedro Delfino's user avatar
3 votes
1 answer
105 views

Key map and vector key sequence

paredit.el has the following example code for setting a keybinding: https://github.com/emacsmirror/paredit/blob/8330a41e8188fe18d3fa805bb9aa529f015318e8/paredit.el#L54 (eval-after-load 'paredit ...
Talespin_Kit's user avatar
0 votes
1 answer
71 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, ...
Witek's user avatar
  • 335
0 votes
0 answers
317 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 ...
zendevil.eth's user avatar
2 votes
3 answers
998 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 ...
zendevil.eth's user avatar
0 votes
0 answers
46 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 ...
scaramouche's user avatar
  • 1,772
0 votes
0 answers
48 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()...
Wizard's user avatar
  • 1,241
2 votes
2 answers
553 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 ...
Rob N's user avatar
  • 577
1 vote
1 answer
184 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. ...
Benilda Key's user avatar
3 votes
1 answer
468 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)
Antoine's user avatar
  • 133
7 votes
1 answer
434 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 ...
jue's user avatar
  • 4,501
1 vote
0 answers
293 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 ...
jue's user avatar
  • 4,501
6 votes
4 answers
688 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 ...
GDP2's user avatar
  • 1,340
0 votes
0 answers
65 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 ...
dagda1's user avatar
  • 605
3 votes
1 answer
155 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 ...
BPS's user avatar
  • 193
1 vote
0 answers
90 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. ...
BPS's user avatar
  • 193
4 votes
1 answer
274 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.
user avatar
3 votes
1 answer
1k 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 ...
user avatar
1 vote
0 answers
346 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 ...
TheDrev's user avatar
  • 111
7 votes
2 answers
601 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 ...
Witek's user avatar
  • 335
8 votes
1 answer
199 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)| ) )) ...
Wilfred Hughes's user avatar
0 votes
0 answers
520 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 ...
Steve's user avatar
  • 65
0 votes
0 answers
202 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 ...
Ben Mabey's user avatar
  • 101
4 votes
1 answer
507 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 ...
Sean's user avatar
  • 929
13 votes
3 answers
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 ...
Rodrigo Flores's user avatar
1 vote
0 answers
75 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 ...
Sean Allred's user avatar
  • 6,871
1 vote
2 answers
305 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, ...
user7610's user avatar
  • 113
1 vote
0 answers
263 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 ...
Chillar Anand's user avatar
5 votes
1 answer
214 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 ...
user avatar