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.chtml | 231 +++++++++++++++++++++ .../index.html | 228 ++++++++++++++++++++ .../index.chtml | 202 ++++++++++++++++++ .../index.html | 199 ++++++++++++++++++ web/lukeshu.ath.cx/1/wordpress/2011/08/index.chtml | 205 ++++++++++++++++++ web/lukeshu.ath.cx/1/wordpress/2011/08/index.html | 202 ++++++++++++++++++ 6 files changed, 1267 insertions(+) create mode 100644 web/lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/index.chtml create mode 100644 web/lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/index.html create mode 100644 web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.chtml create mode 100644 web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.html create mode 100644 web/lukeshu.ath.cx/1/wordpress/2011/08/index.chtml create mode 100644 web/lukeshu.ath.cx/1/wordpress/2011/08/index.html (limited to 'web/lukeshu.ath.cx/1/wordpress/2011/08') diff --git a/web/lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/index.chtml b/web/lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/index.chtml new file mode 100644 index 0000000..f80c28f --- /dev/null +++ b/web/lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/index.chtml @@ -0,0 +1,231 @@ + +
This is Google's cache of http://lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/. It is a snapshot of the page as it appeared on Dec 15, 2011 07:15:39 GMT. The current page could have changed in the meantime. Learn more

Text-only version
+
 
+ + + + + [Emacs] autopair problems when using term-mode | ltsBlog + + + + + + + + + + + + + + + + + + + + + + + + + +

ltsBlog

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

[Emacs] autopair problems when using term-mode

+ +
+

I found this awesome blog post on the Korean blog Seorenn SIGSEGV.

+

Using Google translate, I was able to extract the information I needed. However, Google translate quite botched it, as did Yahoo and Bing translate. I’ve used a combination of these three tools, and my understanding of Emacs, to put together a more reasonable translation.

+

I’m posting the full English text of it here because this is a problem I’ve had, and would like to help others find the solution. I don’t mean to rip off the original author, his blog seems quite good, worth reading, if you don’t mind poor translations (or, can read Korean).

+

The original post can be found here here.

+

+In Emacs term-mode (M-x term) and multi-term-mode pressing the Enter key causes an error to appear in the mini-buffer, and the keystroke appears to have been eaten.

+

This problem only occurs when using autopair. are thought to In addition to or RET (Enter) as a separate feature for all modes of binding may also occur. if autopair the last of the solution are presented.

+

See below sum up shoveling machine.

+

Issue

+

During term-mode RET does not work. The mini-buffer shows the error message Wrong type argument: characterp, return. RET has been bound to something here, or maybe you saw the state I had a feeling heard nil.

+

Alternative

+

Fortunately, I was able to replace the RET key with C-j. This is used as a temporary measure to work with.

+

Cause Analysis

+

In term-mode use C-h k to find the function that RET is bound to. autopair that certain functions were bound.

+

As a result, be sure that autopair is the culprit.

+

Attempted Solution

+

In term-mode C-h k with C-j to determine the function bound to: term-send-raw.

+

In conclusion, I believe you will solve the problem in the RET key bindings by using define-key to bind the key to term-send-raw in term-mode-map.

+

But the code encounters an error. Is not allowed to do something it felt like.

+

Solution

+

The code below. Not two lines were able to solve it.

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

Source of the above code: http://emacs-fu.blogspot.com/2010/06/console-apps-in-emacs-with-multi-term.html +

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

One Response to [Emacs] autopair problems when using term-mode

+ +
    + +
  1. +

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

    + +
  2. + +
+
+

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>

+ + + +

+
+
+ +
+ +
+ + + + + + diff --git a/web/lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/index.html b/web/lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/index.html new file mode 100644 index 0000000..f127117 --- /dev/null +++ b/web/lukeshu.ath.cx/1/wordpress/2011/08/emacs-autopair-problems-when-using-term-mode/index.html @@ -0,0 +1,228 @@ + + + + + [Emacs] autopair problems when using term-mode | ltsBlog + + + + + + + + + + + + + + + + + + + + + + + + + +

ltsBlog

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

[Emacs] autopair problems when using term-mode

+ +
+

I found this awesome blog post on the Korean blog Seorenn SIGSEGV.

+

Using Google translate, I was able to extract the information I needed. However, Google translate quite botched it, as did Yahoo and Bing translate. I’ve used a combination of these three tools, and my understanding of Emacs, to put together a more reasonable translation.

+

I’m posting the full English text of it here because this is a problem I’ve had, and would like to help others find the solution. I don’t mean to rip off the original author, his blog seems quite good, worth reading, if you don’t mind poor translations (or, can read Korean).

+

The original post can be found here here.

+

+In Emacs term-mode (M-x term) and multi-term-mode pressing the Enter key causes an error to appear in the mini-buffer, and the keystroke appears to have been eaten.

+

This problem only occurs when using autopair. are thought to In addition to or RET (Enter) as a separate feature for all modes of binding may also occur. if autopair the last of the solution are presented.

+

See below sum up shoveling machine.

+

Issue

+

During term-mode RET does not work. The mini-buffer shows the error message Wrong type argument: characterp, return. RET has been bound to something here, or maybe you saw the state I had a feeling heard nil.

+

Alternative

+

Fortunately, I was able to replace the RET key with C-j. This is used as a temporary measure to work with.

+

Cause Analysis

+

In term-mode use C-h k to find the function that RET is bound to. autopair that certain functions were bound.

+

As a result, be sure that autopair is the culprit.

+

Attempted Solution

+

In term-mode C-h k with C-j to determine the function bound to: term-send-raw.

+

In conclusion, I believe you will solve the problem in the RET key bindings by using define-key to bind the key to term-send-raw in term-mode-map.

+

But the code encounters an error. Is not allowed to do something it felt like.

+

Solution

+

The code below. Not two lines were able to solve it.

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

Source of the above code: http://emacs-fu.blogspot.com/2010/06/console-apps-in-emacs-with-multi-term.html +

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

One Response to [Emacs] autopair problems when using term-mode

+ +
    + +
  1. +

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

    + +
  2. + +
+
+

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>

+ + + +

+
+
+ +
+ +
+ + + + + + diff --git a/web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.chtml b/web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.chtml new file mode 100644 index 0000000..6739755 --- /dev/null +++ b/web/lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/index.chtml @@ -0,0 +1,202 @@ + +
This is Google's cache of http://lukeshu.ath.cx/1/wordpress/2011/08/fixing-wrong-type-argument-characterp-return-in-emacs/. It is a snapshot of the page as it appeared on Dec 16, 2011 06:35:41 GMT. The current page could have changed in the meantime. Learn more

Text-only version
+
 
+ + + + + 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>

+ + + +

+
+
+ +
+ +
+ + + + + + 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>

+ + + +

+
+
+ +
+ +
+ + + + + + diff --git a/web/lukeshu.ath.cx/1/wordpress/2011/08/index.chtml b/web/lukeshu.ath.cx/1/wordpress/2011/08/index.chtml new file mode 100644 index 0000000..737de42 --- /dev/null +++ b/web/lukeshu.ath.cx/1/wordpress/2011/08/index.chtml @@ -0,0 +1,205 @@ + +
This is Google's cache of http://lukeshu.ath.cx/1/wordpress/2011/08/. It is a snapshot of the page as it appeared on Dec 12, 2011 01:22:46 GMT. The current page could have changed in the meantime. Learn more

+
 
+ + + + + August | 2011 | ltsBlog + + + + + + + + + + + + + + + + + +

ltsBlog

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

Monthly Archives: August 2011

+ + +
+ +

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 … Continue reading

+ +
+ + +
+ + + Posted in Computers + + | + + + Leave a comment + +
+ +
+ +
+ +

[Emacs] autopair problems when using term-mode

+ + + + +
+

I found this awesome blog post on the Korean blog Seorenn SIGSEGV. Using Google translate, I was able to extract the information I needed. However, Google translate quite botched it, as did Yahoo and Bing translate. I’ve used a combination … Continue reading

+ +
+ + +
+ + + Posted in Computers + + | + + + 1 Comment + +
+ +
+ + + +
+ + + + + + diff --git a/web/lukeshu.ath.cx/1/wordpress/2011/08/index.html b/web/lukeshu.ath.cx/1/wordpress/2011/08/index.html new file mode 100644 index 0000000..ad59fb8 --- /dev/null +++ b/web/lukeshu.ath.cx/1/wordpress/2011/08/index.html @@ -0,0 +1,202 @@ + + + + + August | 2011 | ltsBlog + + + + + + + + + + + + + + + + + +

ltsBlog

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

Monthly Archives: August 2011

+ + +
+ +

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 … Continue reading

+ +
+ + +
+ + + Posted in Computers + + | + + + Leave a comment + +
+ +
+ +
+ +

[Emacs] autopair problems when using term-mode

+ + + + +
+

I found this awesome blog post on the Korean blog Seorenn SIGSEGV. Using Google translate, I was able to extract the information I needed. However, Google translate quite botched it, as did Yahoo and Bing translate. I’ve used a combination … Continue reading

+ +
+ + +
+ + + Posted in Computers + + | + + + 1 Comment + +
+ +
+ + + +
+ + + + + + -- cgit v1.2.3-2-g168b