3 @setfilename ../../info/erc
10 This manual is for ERC as distributed with Emacs @value{EMACSVER}.
12 Copyright @copyright{} 2005--2013 Free Software Foundation, Inc.
15 Permission is granted to copy, distribute and/or modify this document
16 under the terms of the GNU Free Documentation License, Version 1.3 or
17 any later version published by the Free Software Foundation; with no
18 Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
19 and with the Back-Cover Texts as in (a) below. A copy of the license
20 is included in the section entitled ``GNU Free Documentation License''.
22 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
23 modify this GNU manual.''
25 All Emacs Lisp code contained in this document may be used, distributed,
26 and modified without restriction.
30 @dircategory Emacs network features
32 * ERC: (erc). Powerful and extensible IRC client for Emacs.
37 @subtitle a full-featured IRC client
38 @subtitle for Emacs and XEmacs
40 @c The following two commands
41 @c start the copyright page.
43 @vskip 0pt plus 1filll
57 * Introduction:: What is ERC?
58 * Getting Started:: Quick Start guide to using ERC.
59 * Keystroke Summary:: Keystrokes used in ERC buffers.
60 * Modules:: Available modules for ERC.
61 * Advanced Usage:: Cool ways of using ERC.
62 * Getting Help and Reporting Bugs::
63 * History:: The history of ERC.
64 * GNU Free Documentation License:: The license for this documentation.
65 * Concept Index:: Search for terms.
68 --- The Detailed Node Listing ---
72 * Sample Session:: Example of connecting to the #emacs channel
73 * Special Features:: Differences from standalone IRC clients
77 * Connecting:: Ways of connecting to an IRC server.
78 * Sample Configuration:: An example configuration file.
79 * Options:: Options that are available for ERC.
87 ERC is a powerful, modular, and extensible IRC client for Emacs.
88 It is distributed with Emacs since version 22.1.
90 It comes with the following capabilities enabled by default.
95 @item Join channels automatically
96 @item Buttonize URLs, nicknames, and other text
98 @item Highlight or remove IRC control characters
99 @item Highlight pals, fools, and other keywords
100 @item Detect netsplits
101 @item Complete nicknames and commands in a programmable fashion
102 @item Make displayed lines read-only
104 @item Track channel activity in the mode-line
109 @node Getting Started
110 @chapter Getting Started
113 The command @kbd{M-x erc} will start ERC and prompt for the server to
116 If you want to place ERC settings in their own file, you can place them
117 in @file{~/.emacs.d/.ercrc.el}, creating it if necessary.
119 If you would rather use the Customize interface to change how ERC works,
120 do @kbd{M-x customize-group RET erc RET}. In particular, ERC comes with
121 lots of modules that may be enabled or disabled; to select which ones
122 you want, do @kbd{M-x customize-variable RET erc-modules RET}.
125 * Sample Session:: Example of connecting to the #emacs channel
126 * Special Features:: Differences from standalone IRC clients
130 @section Sample Session
132 This is an example ERC session which shows how to connect to the #emacs
133 channel on Freenode. Another IRC channel on Freenode that may be of
134 interest is #erc, which is a channel where ERC users and developers hang
139 @item Connect to Freenode
141 Run @kbd{M-x erc}. Use ``irc.freenode.net'' as the IRC server, ``6667''
142 as the port, and choose a nickname.
144 @item Get used to the interface
146 Switch to the ``irc.freenode.net:6667'' buffer, if you're not already
147 there. You will see first some messages about checking for ident, and
148 then a bunch of other messages that describe the current IRC server.
150 @item Join the #emacs channel
152 In that buffer, type ``/join SPC #emacs'' and hit @kbd{RET}. Depending
153 on how you've set up ERC, either a new buffer for ``#emacs'' will be
154 displayed, or a new buffer called ``#emacs'' will be created in the
155 background. If the latter, switch to the ``#emacs'' buffer. You will
156 see the channel topic and a list of the people who are currently on the
159 @item Register your nickname with Freenode
161 If you would like to be able to talk with people privately on the
162 Freenode network, you will have to ``register'' your nickname. To do
163 so, switch to the ``irc.freenode.net:6667'' buffer and type ``/msg
164 NickServ register <password>'', replacing ``<password>'' with your
165 desired password. It should tell you that the operation was successful.
167 @item Talk to people in the channel
169 If you switch back to the ``#emacs'' buffer, you can type a message, and
170 everyone on the channel will see it.
172 @item Open a query buffer to talk to someone
174 If you want to talk with someone in private (this should usually not be
175 done for technical help, only for personal questions), type ``/query
176 <nick>'', replacing ``<nick>'' with the nickname of the person you would
177 like to talk to. Depending on how ERC is set up, you will either see a
178 new buffer with the name of the person, or such a buffer will be created
179 in the background and you will have to switch to it. Begin typing
180 messages, and you will be able to have a conversation.
182 Note that if the other person is not registered, you will not be able to
187 @node Special Features
188 @section Special Features
190 ERC has some features that distinguish it from some IRC clients.
194 @item multiple channels and multiple servers
196 Every channel is put in a separate buffer. Several IRC servers may be
197 connected to at the same time.
199 @cindex query buffers
200 @item private message separation
202 Private conversations are treated as channels, and are put into separate
203 buffers in Emacs. We call these ``query buffers''.
207 Some occurrences of words can be highlighted, which makes it easier to
208 track different kinds of conversations.
212 ERC can notify you that certain users are online.
214 @item channel tracking
216 Channels can be hidden and conversation continue in the background. You
217 are notified when something is said in such a channel that is not
218 currently visible. This makes it easy to get Real Work done while still
219 maintaining an IRC presence.
221 @item nick completion
223 ERC can complete words upon hitting @kbd{TAB}, which eases the writing
224 of nicknames in messages.
229 Past actions are kept in history rings for future use. To navigate a
230 history ring, hit @kbd{M-p} to go backwards and @kbd{M-n} to go
233 @item multiple languages
235 Different channels and servers may have different language encodings.
237 multiple languages. Please contact the Emacs developers
238 if you are interested in helping with the
243 Users can load scripts (e.g., auto greeting scripts) when ERC starts up.
245 It is also possible to make custom IRC commands, if you know a little
246 Emacs Lisp. Just make an Emacs Lisp function and call it
247 @code{erc-cmd-NEWCOMMAND}, where @code{NEWCOMMAND} is the name of the
248 new command in capital letters.
252 If the connection goes away at some point, ERC will try to reconnect
253 automatically. If it fails to reconnect, and you want to try to
254 manually reestablish the connection at some later point, switch to an
255 ERC buffer and run the @code{/RECONNECT} command.
260 @node Keystroke Summary
261 @chapter Keys Used in ERC
264 This is a summary of keystrokes available in every ERC buffer.
268 @item C-a or <home> (`erc-bol')
269 Go to beginning of line or end of prompt.
271 @item RET (`erc-send-current-line')
272 Send the current line
274 @item TAB (`erc-complete-word')
275 If at prompt, complete the current word.
276 Otherwise, move to the next link or button.
278 @item M-TAB (`ispell-complete-word')
279 Complete the given word, using ispell.
281 @item C-c C-a (`erc-bol')
282 Go to beginning of line or end of prompt.
284 @item C-c C-b (`erc-iswitchb')
285 Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to.
287 @item C-c C-c (`erc-toggle-interpret-controls')
288 Toggle interpretation of control sequences in messages.
290 @item C-c C-d (`erc-input-action')
291 Interactively input a user action and send it to IRC.
293 @item C-c C-e (`erc-toggle-ctcp-autoresponse')
294 Toggle automatic CTCP replies (like VERSION and PING).
296 @item C-c C-f (`erc-toggle-flood-control')
297 Toggle use of flood control on sent messages.
299 @item C-c TAB (`erc-invite-only-mode')
300 Turn on the invite only mode (+i) for the current channel.
302 @item C-c C-j (`erc-join-channel')
303 Join channel. If point is at the beginning of a channel name, use that
306 @item C-c C-k (`erc-go-to-log-matches-buffer')
307 Interactively open an erc-log-matches buffer
309 @item C-c C-l (`erc-save-buffer-in-logs')
310 Append buffer contents to the log file, if logging is enabled.
312 @item C-c C-n (`erc-channel-names')
313 Run "/names #channel" in the current channel.
315 @item C-c C-o (`erc-get-channel-mode-from-keypress')
316 Read a key sequence and call the corresponding channel mode function.
317 After doing @kbd{C-c C-o}, type in a channel mode letter.
319 @kbd{C-g} means quit.
320 @kbd{RET} lets you type more than one mode at a time.
321 If @kbd{l} is pressed, @code{erc-set-channel-limit} gets called.
322 If @kbd{k} is pressed, @code{erc-set-channel-key} gets called.
323 Anything else will be sent to `erc-toggle-channel-mode'.
325 @item C-c C-p (`erc-part-from-channel')
326 Part from the current channel and prompt for a reason.
328 @item C-c C-q (`erc-quit-server')
329 Disconnect from current server after prompting for reason.
331 @item C-c C-r (`erc-remove-text-properties-region')
332 Clears the region (start,end) in object from all colors, etc.
334 @item C-c C-t (`erc-set-topic')
335 Prompt for a topic for the current channel.
337 @item C-c C-u (`erc-kill-input')
338 Kill current input line using `erc-bol' followed by `kill-line'.
347 One way to add functionality to ERC is to customize which of its many
350 There is a spiffy customize interface, which may be reached by typing
351 @kbd{M-x customize-option erc-modules RET}. Alternatively, set
352 @code{erc-modules} manually and then call @code{erc-update-modules}.
354 The following is a list of available modules.
358 @cindex modules, autoaway
360 Set away status automatically
362 @cindex modules, autojoin
364 Join channels automatically
366 @cindex modules, bbdb
368 Integrate with the Big Brother Database
370 @cindex modules, button
372 Buttonize URLs, nicknames, and other text
374 @cindex modules, capab-identify
376 Mark unidentified users on freenode and other servers supporting CAPAB.
378 @cindex modules, completion
379 @cindex modules, pcomplete
380 @item completion (aka pcomplete)
381 Complete nicknames and commands (programmable)
383 @cindex modules, fill
387 @cindex modules, identd
389 Launch an identd server on port 8113
391 @cindex modules, irccontrols
393 Highlight or remove IRC control characters
399 @cindex modules, match
401 Highlight pals, fools, and other keywords
403 @cindex modules, menu
405 Display a menu in ERC buffers
407 @cindex modules, netsplit
411 @cindex modules, noncommands
413 Don't display non-IRC commands after evaluation
415 @cindex modules, notify
417 Notify when the online status of certain users changes
419 @cindex modules, notifications
421 Send you a notification when you get a private message,
422 or your nickname is mentioned
424 @cindex modules, page
426 Process CTCP PAGE requests from IRC
428 @cindex modules, readonly
430 Make displayed lines read-only
432 @cindex modules, replace
434 Replace text in messages
436 @cindex modules, ring
438 Enable an input history
440 @cindex modules, scrolltobottom
442 Scroll to the bottom of the buffer
444 @cindex modules, services
446 Identify to Nickserv (IRC Services) automatically
448 @cindex modules, smiley
450 Convert smileys to pretty icons
452 @cindex modules, sound
454 Play sounds when you receive CTCP SOUND requests
456 @cindex modules, spelling
458 Check spelling of messages
460 @cindex modules, stamp
462 Add timestamps to messages
464 @cindex modules, track
466 Track channel activity in the mode-line
468 @cindex modules, truncate
470 Truncate buffers to a certain size
472 @cindex modules, unmorse
474 Translate morse code in messages
478 @c PRE5_4: Document every option of every module in its own subnode
482 @chapter Advanced Usage
483 @cindex advanced topics
486 * Connecting:: Ways of connecting to an IRC server.
487 * Sample Configuration:: An example configuration file.
488 * Options:: Options that are available for ERC.
492 @section Connecting to an IRC Server
495 The easiest way to connect to an IRC server is to call @kbd{M-x erc}.
496 If you want to assign this function to a keystroke, the following will
497 help you figure out its parameters.
500 Select connection parameters and run ERC@.
501 Non-interactively, it takes the following keyword arguments.
508 @item @var{full-name}
511 That is, if called with the following arguments, @var{server} and
512 @var{full-name} will be set to those values, whereas
513 @code{erc-compute-port}, @code{erc-compute-nick} and
514 @code{erc-compute-full-name} will be invoked for the values of the other
518 (erc :server "irc.freenode.net" :full-name "Harry S Truman")
524 @defun erc-compute-server &optional server
525 Return an IRC server name.
527 This tries a number of increasingly more default methods until a non-@code{nil}
531 @item @var{server} (the argument passed to this function)
532 @item The @code{erc-server} option
533 @item The value of the IRCSERVER environment variable
534 @item The @code{erc-default-server} variable
540 IRC server to use if one is not provided.
545 @defun erc-compute-port &optional port
546 Return a port for an IRC server.
548 This tries a number of increasingly more default methods until a non-@code{nil}
552 @item @var{port} (the argument passed to this function)
553 @item The @code{erc-port} option
554 @item The @code{erc-default-port} variable
560 IRC port to use if not specified.
562 This can be either a string or a number.
567 @defun erc-compute-nick &optional nick
568 Return user's IRC nick.
570 This tries a number of increasingly more default methods until a
571 non-@code{nil} value is found.
574 @item @var{nick} (the argument passed to this function)
575 @item The @code{erc-nick} option
576 @item The value of the IRCNICK environment variable
577 @item The result from the @code{user-login-name} function
583 Nickname to use if one is not provided.
585 This can be either a string, or a list of strings.
586 In the latter case, if the first nick in the list is already in use,
587 other nicks are tried in the list order.
590 @defopt erc-nick-uniquifier
591 The string to append to the nick if it is already in use.
594 @defopt erc-try-new-nick-p
595 If the nickname you chose isn't available, and this option is non-@code{nil},
596 ERC should automatically attempt to connect with another nickname.
598 You can manually set another nickname with the /NICK command.
604 @defopt erc-prompt-for-password
605 If non-@code{nil} (the default), @kbd{M-x erc} prompts for a password.
608 If you prefer, you can set this option to @code{nil} and use the
609 @code{auth-source} mechanism to store your password. For instance, if
610 you use @file{~/.authinfo} as your auth-source backend, then put
611 something like the following in that file:
614 machine irc.example.net login "#fsf" password sEcReT
618 ERC also consults @code{auth-source} to find any channel keys required
619 for the channels that you wish to autojoin, as specified by the
620 variable @code{erc-autojoin-channels-alist}.
622 For more details, @pxref{Top,,auth-source, auth, Emacs auth-source Library}.
625 @subheading Full name
627 @defun erc-compute-full-name &optional full-name
628 Return user's full name.
630 This tries a number of increasingly more default methods until a
631 non-@code{nil} value is found.
634 @item @var{full-name} (the argument passed to this function)
635 @item The @code{erc-user-full-name} option
636 @item The value of the IRCNAME environment variable
637 @item The result from the @code{user-full-name} function
642 @defopt erc-user-full-name
645 This can be either a string or a function to call.
648 @node Sample Configuration
649 @section Sample Configuration
650 @cindex configuration, sample
652 Here is an example of configuration settings for ERC@. This can go into
653 your Emacs configuration file. Everything after the @code{(require
654 'erc)} command can optionally go into @file{~/.emacs.d/.ercrc.el}.
657 ;;; Sample ERC configuration
659 ;; Add the ERC directory to load path -- you don't need this if you are
660 ;; using the version of ERC that comes with Emacs
661 (add-to-list 'load-path "~/elisp/erc")
666 ;; Load authentication info from an external source. Put sensitive
667 ;; passwords and the like in here.
668 (load "~/.emacs.d/.erc-auth")
670 ;; This is an example of how to make a new command. Type "/uptime" to
672 (defun erc-cmd-UPTIME (&rest ignore)
673 "Display the uptime of the system, as well as some load-related
674 stuff, to the current ERC buffer."
676 (replace-regexp-in-string
677 ", load average: " "] @{Load average@} ["
678 ;; Collapse spaces, remove
679 (replace-regexp-in-string
681 ;; Remove beginning and trailing whitespace
682 (replace-regexp-in-string
684 (shell-command-to-string "uptime"))))))
686 (concat "@{Uptime@} [" uname-output "]"))))
688 ;; This causes ERC to connect to the Freenode network upon hitting
689 ;; C-c e f. Replace MYNICK with your IRC nick.
690 (global-set-key "\C-cef" (lambda () (interactive)
691 (erc :server "irc.freenode.net" :port "6667"
694 ;; This causes ERC to connect to the IRC server on your own machine (if
695 ;; you have one) upon hitting C-c e b. Replace MYNICK with your IRC
696 ;; nick. Often, people like to run bitlbee (http://bitlbee.org/) as an
697 ;; AIM/Jabber/MSN to IRC gateway, so that they can use ERC to chat with
698 ;; people on those networks.
699 (global-set-key "\C-ceb" (lambda () (interactive)
700 (erc :server "localhost" :port "6667"
703 ;; Make C-c RET (or C-c C-RET) send messages instead of RET. This has
704 ;; been commented out to avoid confusing new users.
705 ;; (define-key erc-mode-map (kbd "RET") nil)
706 ;; (define-key erc-mode-map (kbd "C-c RET") 'erc-send-current-line)
707 ;; (define-key erc-mode-map (kbd "C-c C-RET") 'erc-send-current-line)
711 ;; Join the #emacs and #erc channels whenever connecting to Freenode.
712 (setq erc-autojoin-channels-alist '(("freenode.net" "#emacs" "#erc")))
714 ;; Interpret mIRC-style color commands in IRC chats
715 (setq erc-interpret-mirc-color t)
717 ;; The following are commented out by default, but users of other
718 ;; non-Emacs IRC clients might find them useful.
719 ;; Kill buffers for channels after /part
720 ;; (setq erc-kill-buffer-on-part t)
721 ;; Kill buffers for private queries after quitting the server
722 ;; (setq erc-kill-queries-on-quit t)
723 ;; Kill buffers for server messages after quitting the server
724 ;; (setq erc-kill-server-buffer-on-quit t)
731 @c PRE5_4: (Node) Document every ERC option (module options go in
734 This section is extremely incomplete. For now, the easiest way to
735 check out all the available options for ERC is to do
736 @kbd{M-x customize-group erc RET}.
738 @defopt erc-hide-list
739 If non, @code{nil}, this is a list of IRC message types to hide, e.g.:
742 (setq erc-hide-list '("JOIN" "PART" "QUIT"))
746 @defopt erc-lurker-hide-list
747 Like @code{erc-hide-list}, but only applies to messages sent by
748 lurkers. The function @code{erc-lurker-p} determines whether a given
749 nickname is considered a lurker.
753 @node Getting Help and Reporting Bugs
754 @chapter Getting Help and Reporting Bugs
755 @cindex help, getting
756 @cindex bugs, reporting
758 After you have read this guide, if you still have questions about ERC,
759 or if you have bugs to report, there are several places you can go.
764 @uref{http://www.emacswiki.org/cgi-bin/wiki/ERC} is the
765 emacswiki.org page for ERC@. Anyone may add tips, hints, etc. to it.
768 You can ask questions about using ERC on the Emacs mailing list,
769 @uref{http://lists.gnu.org/mailman/listinfo/help-gnu-emacs}.
772 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
773 contributors are frequently around and willing to answer your
777 To report a bug in ERC, use @kbd{M-x report-emacs-bug}.
784 @cindex history, of ERC
786 @c abel@@bfr.co.il, sergey.berezin@@cs.cmu.edu
787 ERC was originally written by Alexander L. Belikoff and Sergey Berezin.
788 They stopped development around
789 December 1999. Their last released version was ERC 2.0.
791 P.S.: If one of the original developers of ERC reads this, we'd like to
792 receive additional information for this file and hear comments in
798 @c mlang@@delysid.org, alex@@gnu.org
799 In June 2001, Mario Lang and Alex Schroeder
800 took over development and created a ERC Project at
801 @uref{http://sourceforge.net/projects/erc}.
803 In reaction to a mail about the new ERC development effort, Sergey
804 Berezin said, ``First of all, I'm glad that my version of ERC is being
805 used out there. The thing is, I do not have free time and enough
806 incentive anymore to work on ERC, so I would be happy if you guys take
807 over the project entirely.''
809 So we happily hacked away on ERC, and soon after (September 2001)
810 released the next "stable" version, 2.1.
812 Most of the development of the new ERC happened on #emacs on
813 irc.openprojects.net. Over time, many people contributed code, ideas,
814 bugfixes, and a lot of alpha/beta/gamma testing.
816 See the @file{CREDITS} file for a list of contributors.
820 ERC 3.0 was released.
824 ERC 4.0 was released.
829 ERC 5.0 was released. Michael Olson became
830 the release manager and eventually the maintainer.
832 After some discussion between him and the Emacs developers, it was
833 decided to include ERC in Emacs.
837 ERC 5.1 was released. It was subsequently included in Emacs 22.
839 ERC became an official GNU project, and development moved to
840 @uref{http://sv.gnu.org/projects/erc}. We switched to using GNU Arch as
841 our revision control system. Our mailing list address changed as well.
845 We switched to using git for our version control system.
849 Since about 2009, ERC is no longer developed as a separate project, but
850 is maintained as part of Emacs.
854 @node GNU Free Documentation License
855 @appendix GNU Free Documentation License
856 @include doclicense.texi