Pages

Friday, September 3, 2010

using IDO flex matching for ERC buffers


(defun rgr/ido-erc-buffer()
(interactive)
(switch-to-buffer
(ido-completing-read "Channel:"
(save-excursion
(delq
nil
(mapcar (lambda (buf)
(when (buffer-live-p buf)
(with-current-buffer buf
(and (eq major-mode 'erc-mode)
(buffer-name buf)))))
(buffer-list)))))))

(global-set-key (kbd "C-c e") 'rgr/ido-erc-buffer)

No comments:

Post a Comment