From cab760a1b7912548daf2fa033f11b4ea939a86f3 Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Wed, 14 Jan 2015 15:08:36 -0500 Subject: this was sitting there --- .../index.html | 199 +++++++++++++++++++++ 1 file changed, 199 insertions(+) create mode 100644 web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.html (limited to 'web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.html') diff --git a/web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.html b/web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.html new file mode 100644 index 0000000..b106c0e --- /dev/null +++ b/web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.html @@ -0,0 +1,199 @@ + + + + + Fixing “Wrong type argument: characterp, return” in !Emacs | ltsBlog + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + +

ltsBlog

+ + + + + + + + + + +
+ + + +
+

Fixing “Wrong type argument: characterp, return” in !Emacs

+ +
+

A few months ago, I ran into an issue with Emacs that I just found the solution to. In Emacs term-mode (or ansi-term, or multi-term), hitting Enter doesn’t work, and the mini-buffer displays Wrong type argument: characterp, return, and the term doesn’t see the keystroke.

+

I dented about it on identi.ca, and no one was able to help me. This turned out to be a mistake, because I kept seeing the dent as I Googled/DuckDuckGo’ed for a solution.

+

Anyway, I finally found the solution on the Korean blog Seorenn SIGSEGV.

+

The problem is basically that autopair had remapped the return key to an autopair function, which didn’t jive with term-mode. At least, that’s what Seorenn said.

+

If it were that simple, I would have noticed it when I installed autopair. Only in some environments does the problem manifest. For example, on Ubuntu, where I started using autopair, the problem never appears. When I switched to Fedora (and later Parabola), I figured it was some issue with the X server, because it worked fine when running in a terminal.

+

Now knowing that the problem was related to autopair, I can’t figure out how it ever worked.

+

Anyway, the fix is to add the following to your .emacs:

+
(add-hook 'term-mode-hook
+  #'(lambda () (setq autopair-dont-activate t)))
+

(Code segment from emacs-fu, via Seorenn SIGSEGV.)

+ +
+
+ +
+ +
+ This entry was posted in Computers. Bookmark the permalink. + +
+
+ + + + + +
+
+

Leave a Reply

+
+

Your email address will not be published. Required fields are marked *

*

+ +

+

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

+ + + +

+
+
+ +
+ +
+ + + + + + -- cgit v1.2.3