1

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.

Scenario 1.

I had the following in the clipboard.

(substitute-in-file-name "${SystemDrive}/opt

I pasted this at the end of a line that already had the following text.

((file-directory-p 

The result was the following line of text.

((file-directory-p (substitute-in-file-name "${SystemDrive}/opt

I then typed a " at the end of this line.

Portacle escaped the " so that the final result was as follows.

((file-directory-p (substitute-in-file-name "${SystemDrive}/opt\"

Portacle does similar nonsense when I try to type ).

How do I get " to simply put a " where my caret is instead of getting cute.

  • 3
    I'm not really familiar with paredit, but I think that C-q " and C-q ) should do what you want. C-q runs the command quoted-insert and reads the next character and itputs it as it is. – andrej Oct 17 '18 at 8:43
  • Is this a question about portacle or about emacs? – Dan Oct 17 '18 at 13:30
  • It looks like Portacle is a software bundle that includes Emacs and some packages. Not clear how they've configured it or how far from standard it is. – Tyler Oct 17 '18 at 13:53
  • 1
    Regardless of Portacle, I can't find another post dealing with typing individual open or close parens, This is useful especially when yanking code from a region that was mistakenly short of an open or close parentheses... I think @andrej should post his comment as an answer. – manandearth Oct 17 '18 at 21:10
4

C-q runs the command quoted-insert and reads the next character and itputs it as it is (works everywhere on my emacs configuration). So I think that C-q " and C-q ) should do what you want.

  • Unfortunately, Portacle remaps C-q to er/expand-region. I was able to run quoted-insert by using M-x quoted-insert and this did solve my problem. I think I am going to have to abandon Portacle as an unusable mess and go back to plain Emacs. – Ben Key Oct 18 '18 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.