<em><a href="Non-Sumou.html">Other GNU Emacs tips</a></em></p>

<a href="http://www.gnu.org/software/emacs/">GNU Emacs</a> is the greatest piece of software ever written. If you're unfamiliar with GNU Emacs, learn it, it is the greatest piece of software ever written, it can achieve incredible things for you. Search...</p>

If all you want to do is use GNU Emacs for entering CJK text, to copy/paste into other applications, here is a basic primer on using GNU Emacs for this purpose.</p>

<em>Explanation of GNU Emacs notation:</em><br /> GNU Emacs info texts generally use the following notation standards: for Control key combinations use <strong>C-</strong> shorthand, i.e. this <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x</b></td></tr></table> means you press `Ctrl' and `x', i.e. hold the control key and press `x'. This <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x C-c</b></td></tr></table> means you hold the control key and press `x', followed by holding the control key and pressing `c'. This <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x s</b></td></tr></table> means you hold the control key and press `x', followed by letting go of the control key and pressing only `s'. This <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x S</b></td></tr></table> means you hold the control key and press `x', followed by letting go of the control key and pressing capital `S', i.e. holding the Shift key and pressing `s'.</p>

For the Meta key (sometimes refered to as the Alt key) use <strong>M-</strong> shorthand, i.e. this <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>M-x</b></td></tr></table> means you hold the Meta key and press `x'.</p>

`RET' means hitting the Enter key, `TAB' means hitting the Tab key.</p>

If your keyboard doesn't have the Meta key, you can hit `Escape' and release it, instead of using Meta, i.e. to enter <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>M-x</b></td></tr></table> press `Escape', release it, and then press `x'.<br /> <em>End of GNU Emacs notation explanation</em></p>

Before first using GNU Emacs, to make sure that GNU Emacs clipboard is integrated with the system clipboard (IMPORTANT), make sure you have an <strong>.emacs</strong> file in your home directory with the following text:<br /> <strong>(set-clipboard-coding-system 'utf-8)</strong><br /> <strong>(setq x-select-enable-clipboard t)</strong> <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>$ echo &quot;(set-clipboard-coding-system 'utf-8)&quot; &gt;&gt; ~/.emacs<br /> $ echo &quot;(setq x-select-enable-clipboard t)&quot; &gt;&gt; ~/.emacs</b></td></tr></table></p>

You can also start GNU Emacs and edit this file in it:</p> <ol> <li>Run GNU Emacs.</li> <li>Create the file: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x C-f .emacs RET</b></td></tr></table></li> <li>Type the text in it.</li> <li>Save the file: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x C-s</b></td></tr></table></li> <li>Exit GNU Emacs: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x C-c</b></td></tr></table></li> <li>Restart GNU Emacs.</li> </ol>

To enter CJK text:</p> <ol> <li>Start GNU Emacs: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>$ emacs</b></td></tr></table></li> <li>In GNU Emacs, once started, switch to the * scratch* buffer: <blockquote> <p class="quoted"><table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x b</b></td></tr></table> select * scratch*, i.e. type *sc and hit `TAB'.</p> </blockquote></li> <li>Switch to the input method of your choice, e.g. for Japanese: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x RET C-\<br /> jap TAB TAB</b></td></tr></table> will give you a list of available Japanese input methods, select one by finishing typing its name and hitting RET.<br /> For Chinese: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x RET C-\<br /> chinese TAB TAB</b></td></tr></table> For Korean: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x RET C-\<br /> korean TAB TAB</b></td></tr></table></li> <li>Type the text.</li> <li>Cut the text: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-a</b></td></tr></table> will move you to the beginning of the line. If you've typed more lines, move to the first one, by repeatedly hitting: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-p</b></td></tr></table> Cut the text in one line to place it on the clipboard with: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-k</b></td></tr></table> To cut more lines and place them on the clipboard, hit C-k repeatedly, two times for each line, first C-k cuts the line, the second one cuts the linebreak.</li> <li>The CJK text is in the clipboard now. Switch to the application where you want to enter the CJK text and paste it there.</li> </ol>

To exit GNU Emacs when you're finished: <table bgcolor="#000000" border="1"><tr><td border="0"><font color="#FFFF00"><b>C-x C-c</b></td></tr></table></p>

<a href="n900/emacs-cjk.avi">Video screencast of CJK input in GNU Emacs on the Nokia N900.</a> <!— Page published by Emacs Muse ends here —> </div> <i>To send me feedback about this page, use the below email.</i><br /> <b>&copy; sumoudou.org 2010</b><br /> <img style="border:0" alt="sumoudou.org" src="email.gif" width="129" height="10" /><br /> <a href="http://www.gnu.org/" style="text-decoration: none;"><img style="border:0" alt="GNU" src="powered-by-gnu.png" />]] <a href="http://www.gnu.org/software/emacs/emacs.html" style="text-decoration: none;"><img style="border:0" alt="GNU Emacs" src="made-with-emacs.png" />]] <a href="http://hcoop.net/" style="text-decoration: none;"><img style="border:0" alt="HCoop" src="hcoop-proud-member.png" />]] <a href="http://hcoop.net/" style="text-decoration: none;"><img style="border:0" alt="HCoop" src="hosted-by-hcoop.png" />]] <a href="http://mwolson.org/projects/EmacsMuse.html" style="text-decoration: none;"><img style="border:0" alt="Emacs Muse" src="made-with-muse.png" />]] <a href="http://mwolson.org/projects/EmacsMuse.html" style="text-decoration: none;"><img style="border:0" alt="Emacs Muse" src="powered-by-muse.png" />]] <br /> <a href="http://www.fsf.org/resources/formats/playogg" style="text-decoration: none;"><img style="border:0" alt="Ogg" src="play-ogg.png" />]] <a href="http://www.catb.org/hacker-emblem/" style="text-decoration: none;"><img style="border:0" alt="Glider" src="glider.png" />]] <a href="http://ubuntu.com/" style="text-decoration: none;"><img style="border:0" alt="Ubuntu" src="ubuntu.png" />]] <a href="http://validator.w3.org/check?uri=referer" style="text-decoration: none;"><img style="border:0" alt="Valid XHTML 1.0 Strict!" src="valid-xhtml10-blue.png" />]] <a href="http://jigsaw.w3.org/css-validator/check/referer" style="text-decoration: none;"><img style="border:0" alt="Valid CSS!" src="valid-css-blue.png" />]] <br />Last updated 2009-12-15-010101

</div> <br />. </body> </html>

.