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.
now usable over ssh as well. just set the ii-ssh-domain variable to “mydomain.lol” and you’re off. uses ssh, and requires inotify on the remote host. (still linux only this)
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
GPL v3 or later.
- 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.
Put ii-mode.el in your emacs path and write something like this in your init file:
(require 'ii-mode) (setq 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.
To make this more pleasant you probably want to replace the default emacs completing read. Personally I use the one provided by ido-mode.
(setq ii-completing-read 'ido-completing-read)
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.
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:
(setq 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.
(setq 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.