<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>Emacs blog</title>
    <link>blog-emacs.html</link>
    <description></description>
    <language>en-us</language>
    <generator>Emacs Muse</generator>

<item>
<title> IRC with furigana</title>
<link>blog-emacs.html#%20IRC%20with%20furigana</link>
<description><![CDATA[
<p class="image"><img src="erc-furigana.png" alt=""></p>

<p>Today I have written code that displays kanji reading in Japanese
while chatting on IRC. I often know the meaning of the character but
forget the pronunciation. Other people who go to Japanese channel
might find this hack helpful.</p>

<pre class="src">
<span style="color: #008b00; background-color: #b9babd;">;; </span><span style="color: #008b00; background-color: #b9babd;">lisp/emacs.d/ivan-erc.el
</span>
(<span style="color: #8b008b; background-color: #b9babd;">defvar</span> <span style="color: #000000; background-color: #b9babd;">ivan-erc-japanese-channel</span>
  <span style="color: #8b5a00; background-color: #b9babd;">"#japanese</span><span style="color: #8b8b00; background-color: #b9babd;">\\</span><span style="color: #8b8b00; background-color: #b9babd;">|</span><span style="color: #8b5a00; background-color: #b9babd;">#nihongo"</span>
  <span style="color: #008b00; background-color: #b9babd;">"Regexp of channels that are in Japanese"</span>)


(<span style="color: #8b008b; background-color: #b9babd;">defun</span> <span style="color: #00008b; background-color: #b9babd;">ivan-erc-furigana</span> ()
  <span style="color: #008b00; background-color: #b9babd;">"Display furigana when receiving a message in Japanese"</span>
  (<span style="color: #8b008b; background-color: #b9babd;">when</span> (and (string-match ivan-erc-japanese-channel (buffer-name))
             (memq 'unicode (find-charset-region
                             (point-min) (point-max)))
             (ivan-japanese-kanji string))
    (insert (kakasi (buffer-substring-no-properties
                     (point-min) (point-max))))
    (erc-restore-text-properties)))

(add-hook 'erc-insert-modify-hook 'ivan-erc-furigana)

<span style="color: #008b00; background-color: #b9babd;">;; </span><span style="color: #008b00; background-color: #b9babd;">/lisp/emacs.d/ivan-japanese.el
</span>
(<span style="color: #8b008b; background-color: #b9babd;">defun</span> <span style="color: #00008b; background-color: #b9babd;">ivan-japanese-kakasi</span> (input)
  <span style="color: #008b00; background-color: #b9babd;">"Take a Japanese string and return INPUT in hiragana"</span>
  (get-buffer-create kakasi-buffer)
  (<span style="color: #8b008b; background-color: #b9babd;">with-temp-buffer</span>
    (insert input)
    (<span style="color: #8b008b; background-color: #b9babd;">let</span> ((coding-system-for-read 'euc-jp)
          (coding-system-for-write 'euc-jp))
      (call-process-region (point-min) (point-max)
                           <span style="color: #8b5a00; background-color: #b9babd;">"kakasi"</span> nil kakasi-buffer nil <span style="color: #8b5a00; background-color: #b9babd;">"-JH"</span> <span style="color: #8b5a00; background-color: #b9babd;">"-s"</span>)))
  (<span style="color: #8b008b; background-color: #b9babd;">prog1</span>
      (<span style="color: #8b008b; background-color: #b9babd;">with-current-buffer</span> kakasi-buffer
        (setq kakasi-ret
              (buffer-substring-no-properties (point-min) (point-max))))
    (kill-buffer kakasi-buffer)))

(<span style="color: #8b008b; background-color: #b9babd;">defun</span> <span style="color: #00008b; background-color: #b9babd;">ivan-japanese-kanji</span> (string)
  <span style="color: #008b00; background-color: #b9babd;">"Return t if string contains Japanese kanji"</span>
  (<span style="color: #8b008b; background-color: #b9babd;">let</span> ((length (length string))
        (count 0)
        (ret nil)
        (char ?a))
    (<span style="color: #8b008b; background-color: #b9babd;">while</span> (&lt; count length)
      (setq char (aref string count))
      (<span style="color: #8b008b; background-color: #b9babd;">if</span> (and (&lt; char ?\u9fa5)
               (&gt; char ?\u4e00))
          (setq ret t))
      (setq count (1+ count)))
    ret))

</pre>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Sun, 29 Aug 2010 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#%20IRC%20with%20furigana</guid>

</item>

<item>
<title>nterm version 0.4</title>
<link>blog-emacs.html#nterm%20version%200%2E4</link>
<description><![CDATA[
<p>In this <a href="nterm.html">version of nterm </a>I have added unit testing and reworked ED and EL.</p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Thu, 26 Aug 2010 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#nterm%20version%200%2E4</guid>

</item>

<item>
<title>nterm version 0.3</title>
<link>blog-emacs.html#nterm%20version%200%2E3</link>
<description><![CDATA[
<p>This version fixed several bugs that made the program
crash. Optimisation makes nterm noticably faster.</p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Sun, 25 Jul 2010 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#nterm%20version%200%2E3</guid>

</item>

<item>
<title>etags and bookmarks</title>
<link>blog-emacs.html#etags%20and%20bookmarks</link>
<description><![CDATA[
<p>I did some contracting work on a C++ project that was a complete
disaster. I used etags on hundreds of classes and I wish I had a tag
history listing mode for emacs. With bookmark it's dead simple, the
following code will stash all etags you jumped to in the bookmark file.</p>

<pre class="src">
<span style="color: #008b00; background-color: #b9babd;">;; </span><span style="color: #008b00; background-color: #b9babd;">put etags information in bookmark
</span>(<span style="color: #8b008b; background-color: #b9babd;">defun</span> <span style="color: #00008b; background-color: #b9babd;">ivan-etags-bookmark</span> ()
  (bookmark-set tagname))

(add-hook 'find-tag-hook 'ivan-etags-bookmark)
</pre>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Sun, 30 May 2010 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#etags%20and%20bookmarks</guid>

</item>

<item>
<title>new version of winpack</title>
<link>blog-emacs.html#new%20version%20of%20winpack</link>
<description><![CDATA[
<p>I have made a new version of <a href="winpack.html">winpack</a>. I cut it to half the size. It
includes emacs and many other goodies. Most Unix users will feel at
home with a bash shell and several GNU tools.</p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Sat, 17 Apr 2010 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#new%20version%20of%20winpack</guid>

</item>

<item>
<title>appointment implement variable warning time</title>
<link>blog-emacs.html#appointment%20implement%20variable%20warning%20time</link>
<description><![CDATA[
<p>I use appointment with org. I find that a global time delay for each
appointments is inconvenient. For example I need to be warned an hour
before an appointment downtown and only 5 minutes for a meeting at
work. I have hacked appt.el to keep track of a delay for each
appointment. The function appt-add is compatible with the old appt.</p>

<p>Download the new <a href="appt.el">appt</a>, or apply the <a href="appt.patch">patch</a>.</p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Thu, 17 Dec 2009 00:00:00 CET</pubDate>
<guid>blog-emacs.html#appointment%20implement%20variable%20warning%20time</guid>

</item>

<item>
<title>nterm version 0.2 is out</title>
<link>blog-emacs.html#nterm%20version%200%2E2%20is%20out</link>
<description><![CDATA[
<p>The big new feature is double width and height font. If you are
interested it can be downloade <a href="nterm.html">here</a>.</p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Sun, 29 Nov 2009 00:00:00 CET</pubDate>
<guid>blog-emacs.html#nterm%20version%200%2E2%20is%20out</guid>

</item>

<item>
<title>Picture for bbdb</title>
<link>blog-emacs.html#Picture%20for%20bbdb</link>
<description><![CDATA[
<p>Bbdb (Big Brother DataBase) is the rolodex of emacs. I have added
picture support so that you can see your contacts face.</p>

<p class="image"><img src="bbdb-picture.png" alt=""></p>

<p>All you need is to download the following file <a href="bbdb-picture.el">bbdb-picture.el</a>.</p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Sun, 27 Sep 2009 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#Picture%20for%20bbdb</guid>

</item>

<item>
<title>Why emacs is great</title>
<link>blog-emacs.html#Why%20emacs%20is%20great</link>
<description><![CDATA[
<p>With emacs you can chat in japanese in irc and look up words you
don't know.</p>

<p class="image"><img src="emacs-erc-lookup.png" alt=""></p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Mon, 14 Sep 2009 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#Why%20emacs%20is%20great</guid>

</item>

<item>
<title>Gradient Color Faces on Emacs</title>
<link>blog-emacs.html#Gradient%20Color%20Faces%20on%20Emacs</link>
<description><![CDATA[
<p>Another productive day hacking and what not. A picture is worth a
thousand words. <a href="ivan-face.el">Download the code</a> if you want to use it.</p>


<table class="image">
  <tr><img src="http://kanis.fr/emacs-gradient-face.png" alt="Snapshot of emacs with gradient color faces"></td></tr>
  <tr><td class="image-caption">Snapshot of emacs with gradient color faces</td></tr>
</table>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Fri, 08 Jun 2007 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#Gradient%20Color%20Faces%20on%20Emacs</guid>

</item>

<item>
<title>Miscelleneous projects</title>
<link>blog-emacs.html#Miscelleneous%20projects</link>
<description><![CDATA[
<p>This month has been productive with Emacs. The mercurial back-end I
wrote last year made it in CVS. I wrote a world clock that should be
included as well.</p>

<p>I have made a <a href="realplay.el">Real Player interface</a>. It needs X Windows to run. It
interface with emacs-w3m so that you can listen to radio. Users can
bind keys to pause, fast forward, rewind stream.</p>

<p>It can even embed the player in a frame if emacs is compiled with
GTK, I am not using this functionality. I expect it could play video
in a different frame.</p>

<p>I made good progress on a <a href="keyring.el">password manager</a> called keyring. It was
designed with a modular back-end.</p>

<p>Currently, there are two back-ends pwsafe and palm. Pwsafe uses the
program of the same name. Palm is a back-end for the GNU Keyring
program for the Palm OS. It uses a Perl script that called <a href="http://kanis.fr/hg/bin/keyring.pl">keyring.pl</a>.</p>

<p>Support for editing, renaming and deleting entries still needs to
be written.</p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Fri, 29 Jun 2007 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#Miscelleneous%20projects</guid>

</item>

<item>
<title>Nxml Mode For Emacs</title>
<link>blog-emacs.html#Nxml%20Mode%20For%20Emacs</link>
<description><![CDATA[
<p>Another tips on emacs. Use James Clark's nxml mode, it is a fantastic
XML mode that validates document on the fly. It is handy to edit
Docbook document.</p>

<p>It can also be used to edit XHTML pages. No need to run the document
through a validator as the errors will be highlighted on the fly. This
software is just too good for words and helps me create valid HTML
document quicker.</p>

<p>The screenshot belows show a document with intentional errors. All
errors are underlined red. If you move the cursor on the error, it
will display more information on the status bar.</p>

<table class="image">
  <tr><img src="http://kanis.fr/nxml.png" alt="Nxml mode in action"></td></tr>
  <tr><td class="image-caption">Nxml mode in action</td></tr>
</table>

<p>There is package ready to install on Debian testing called <code>nxml-mode</code>.</p>

<p><a href="index.html">back</a></p>

]]></description>
<author>Ivan Kanis</author>
<pubDate>Thu, 24 Jun 2004 00:00:00 CEST</pubDate>
<guid>blog-emacs.html#Nxml%20Mode%20For%20Emacs</guid>

</item>

  </channel>
</rss>
