Skip to content
Emacs mode for interacting with ii
Emacs Lisp
Find file
Pull request Compare This branch is 18 commits behind krl:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
COPYING
README.org
ii-mode.el

README.org

About

ii-mode is an Emacs mode for handling files created by ii. It can help you to stay logged in even through emacs restarts.

The model of using Emacs for interfaces to external programs, rather than running them inside the elisp environment itself also seems more elegant.

This allows for a much more detached use of irc, not having to keep one buffer open for each channel, but still getting notified if someone pings you.

Credits/contact

Written by Kristoffer Ström, with significant contributions by mang @ http://github.com/mang/ Questions can be directed at email host rymdkoloni.se, with local part kristoffer

License

GPL v3 or later.

Dependencies

GNU Emacs
not tested in any other flavor.
krl/ii
The minimalist filesystem based irc client from suckless. Patched up version reqired. Available @ http://github.com/krl/ii
inotify-tools
ii-mode uses inotifywait from this package to keep track of file changes.

How to use

Put ii-mode.el in your emacs path and write something like this in your init file:

(require 'ii-mode)
 (setf ii-irc-directory "/home/username/irc/")

To customize behavior you can use ii-mode-hook, this is what I do:

(add-hook 'ii-mode-hook (lambda ()
                          (visual-line-mode)
                          (local-set-key (kbd "RET") 'newline)
                          (local-set-key (kbd "C-c C-s") 'ii-send-message)))

Look in the source variable definitions for customizing face colors etc.

To visit any of the channels tracked by ii-mode use ‘ii-visit-channel-file, to visit only the server channels use ‘ii-visit-server-file.

Automatic backlogging

ii-mode inserts ii-chunk-size bytes of backlog into the buffer on visiting a channel buffer. This variable can be customized to save memory.

It also attaches a hook into reverse isearch wrap, that inserts more of the log if your search wraps, thus allowing for searching through the whole channel log. This feature still needs some polishing.

Notification

By default, you only get notified on user queries. To ii-mode, this is channels with ii-directories not starting with “#” or “&”. To get notified on mentioning of your user name or favourite dish just set the variable ‘ii-notify-regexps in your config like this:

(setf ii-notify-regexps '("\\bkrl\\b" "\\bkrrl\\b" "\\basparagus\\b"))

If you have a channel you want to keep extra track of, put it in the list ‘ii-notify-channels and you will be bugged whenever it’s updated.

(setf ii-notify-channels '("irc.efnet.net/#data_kraft"))

You will se a ”ii” in the global modeline when a notification is activated. To see which and/or to visit them, bind the command ‘ii-visit-notified-file to a key sequence of choice.

Something went wrong with that request. Please try again.