|
由于erc的文档不是很全,又没有info可以看,所以,以前俺用erc都要对它动粗的(修改代码)
昨天仔细看了看cvs版本的erc的发送编码部分,发现可以通过配制文件搞定发送中文的问题诶!!
这下,使用erc就非常简单了!!
apt-get install erc
装好以后,只要在.emacs里面添加如下东东:
--8<---------------cut here---------------start------------->8---
;; To prevent ERC from loading at startup, you may use auto-load in
;; your ~/.emacs file. Here is an example:
(autoload 'erc-select "erc" "IRC client." t)
;; This will add it to the Tools menu. It uses EasyMenu.
(require 'easymenu)
(easy-menu-add-item nil '("tools")
["IRC" erc-select t])
--8<---------------cut here---------------end--------------->8---
然后在~/下面建立有如下内容的.ercrc.el文件
--8<---------------cut here---------------start------------->8---
;; Add dcc support
(require 'erc-dcc)
;; ;; To prevent ERC from loading at startup, you may use auto-load in
;; ;; your ~/.emacs file. Here is an example:
;; (autoload 'erc-select "erc" "IRC client." t)
;; Filling is disabled by default. To enable it, add erc-fill to the
;; hooks that modify the display of incoming and outgoing text:
(require 'erc-fill)
(add-hook 'erc-insert-modify-hook 'erc-fill)
(add-hook 'erc-send-modify-hook 'erc-fill)
;; (setq erc-fill-prefix " ")
(setq erc-timestamp-format "[%H:%M] ")
(setq erc-fill-prefix " + ")
;; ERC Highlighting primitives can be found in the module
;; 'erc-match. Use the following in your ~/.emacs to activate it.
(require 'erc-match)
(erc-match-mode 1)
(setq erc-current-nick-highlight-type 'nick)
;; ;; This will add it to the Tools menu. It uses EasyMenu.
;; (require 'easymenu)
;; (easy-menu-add-item nil '("tools")
;; ["IRC" erc-select t])
;; erc-notify.el allows you to keep track of the online status of
;; certain people.Use (require 'erc-notify) in your .emacs or M-x
;; load-library RET erc-notify RET to activate it.
(require 'erc-notify)
;; Channel tracking is defined as global minor mode in
;; erc-track.el. Use `M-x erc-track-modified-channels-mode RET' to
;; activate it. This interactive function is auto-loaded, so you don't
;; need to (require 'erc-track).
(require 'erc-track)
(erc-track-mode 1)
;; Join #emacs and #emdummy. Then /leave #emdummy, but don't kill its
;; buffer. #emacs would continue showing up as #ema in the
;; modeline. Puzzled? Kill the #emdummy. buffer and #emacs will again
;; become #e. Also consider setting the variable
;; `erc-track-shorten-aggressively' to 'max, and looking at its
;; documentation.
;; using ProgrammableCompletion, in erc-pcomplete.el. To have
;; pcomplete work automatically, try this:
(add-hook 'erc-mode-hook
'(lambda ()
(require 'erc-pcomplete)
(pcomplete-erc-setup)
(erc-completion-mode 1)))
;; Likewise, messages will land in the server buffer by default. To
;; cause new messages to automatically open up a query buffer with the
;; sender, add the following form to your startup files:
(setq erc-auto-query t) ; open a query window when someone messages me
(setq erc-encoding-default 'chinese-iso-8bit)
--8<---------------cut here---------------end--------------->8---
之后重新启动你的emacs就可以使用erc了,快试试最新的erc吧!! ;)
--
Someone is speaking well of you. |
|