-1

In Emacs - Portacle when I want to add an opening bracket I got this (), So if I want to enclose (list 1 2 3) I get

(append () (list 1 2 3))

I do want

(append ( (list 1 2 3))

So I can put an closing bracket on the end.

(append (list 1 2 3) '(4 5))

1 Answer 1

1

Per its docs Portacle includes Paredit as part of its distribution, which does the thing you're asking about. I especially suggest reading the Using It section of those docs, which mentions automatic closing delimiters (though in no great detail). It tells you how to configure Portacle (portacle-configure) and how to get help (Ctrl-HH).

That help document contains a section on Paredit commands, although IMO it is very barebones and I would recommend reading any tutorial on Paredit, which will include sections both on how to disable it (to let you insert unbalanced parentheses), and how to work with it (i.e., what you should do instead of inserting unbalanced parentheses).

Perhaps configuring Portacle via portacle-configure will also let you opt out of Paredit, though I wouldn't be surprised if it didn't.

Sign up to request clarification or add additional context in comments.

3 Comments

- What do you mean with portacle-configure? Is this a menu-command, a lisp-command in Emacs? - When I google Paredits, I get info about a video-editor. Where Can i find more info about the so called "paredit"? - Where can I find a descent book or tutorial about Emacs? Documentation seems really poor.
paredit is a third-party package for Emacs. See paredit.org fro some information. The Emacs manual is available within Emacs with C-h i but you can find HTML versions online: seach for Emacs manual. Emacs is probably the best-documented piece of software you will ever find (not that the documentation is perfect, but it is miles ahead of anything else you are likely to run into). But it is a complicated beast, so the learning curve is steep. Try the tutorial that comes with Emacs: C-h t. Good luck and enjoy the journey!
@KustekjéMeklootn It's "paredit", not "paredits" (which is indeed some kind of video editor). You get much better search results with the correct spelling. Once you learn some basic paredit commands, you never want to write Lisp without it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.