Gnu Screen, Emacs, Terminals, and Japanese

I spent a while today at work getting things to work in Gnu Screen, Emacs, and Japanese. What I want to be able to do is type japanese in the native environment IME over a terminal connected to a Gnu Screen session in Emacs.

This has proved to be pretty difficult. For a long time I just put up with backspace being ^H (M-x normal-erase-mode-is-backspace) which totally sucks. Finally fixed that by rejiggering the screen .screenrc. Of course, I did all that at work, and now I can’t remember what exactly it was that I did… It was the “bindkey” command in some strange way. Back at home, things worked just fine on my Fedora system, so maybe it is down to peculiarities of my work environment (PuTTy and Windows currently.)

So, once backspace and delete are working right, I wanted to get Japanese input working correctly. At work the machines usually use emacs 21 of some kind. For some reason when emacs in screen tried to display Japanese it would usually show \201 \235 or other control sequences, and then the display would be mucked up somehow. That was a problem. Luckily, there was a relatively easy way to get Emacs 22 installed on my dev box, and once I did that Japanese showed up correctly. I couldn’t input it with the Windows IME though. I was able to fix that by setting current-language-environment to japanese. I also then had to set the keyboard-coding-system (C-x RET k) to utf-8. That seemed to take care of things and I could enter Japanese using the Windows IME. I also set the Emacs default-input-method to japanese so I can use Emacs own Japanese input method if for some reason I have to do that.

Back at home on Fedora, I needed to set current-language-enrivonment to japanese for things to work. That was a bit easier than at work, which was nice.

So now on my home laptop I can boot into Fedora 10, pull up a terminal, turn off the scrollbar, pop it into fullscreen mode, start Gnu Screen, and head start emacs. Set the font green, and things are totally 70s. And awesome. Also, check out this site to get 256 colors working screen – I don’t know why I would need it, but it sounds really cool. I have no idea what actually needs 256 colors but at least I can run the test script. That looks kind of pretty.

Also, this post here talks about using cmatrix as a screensaver in screen which I also set up. It is pretty cool. But now I wonder if there are cooler screensavers that use 256 colors… I’ll try playing around with mplayer -vo caca to see how that looks.

Anyway, I actually played around with getting the laptop to boot into text mode, but unfortunately then all my other customizations (make Caps lock a control key, make the font pretty, etc.) weren’t running. Also, in text mode the font is too big. So booting directly into a terminal, screen, then emacs is cool, but not quite as useful as having a real GUI.


Posted

in

by

Tags:

Comments

Leave a Reply

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