3 @setfilename ../../info/erc.info
7 @documentencoding UTF-8
11 This manual is for ERC as distributed with Emacs @value{EMACSVER}.
13 Copyright @copyright{} 2005--2014 Free Software Foundation, Inc.
16 Permission is granted to copy, distribute and/or modify this document
17 under the terms of the GNU Free Documentation License, Version 1.3 or
18 any later version published by the Free Software Foundation; with no
19 Invariant Sections, with the Front-Cover Texts being ``A GNU Manual,''
20 and with the Back-Cover Texts as in (a) below. A copy of the license
21 is included in the section entitled ``GNU Free Documentation License''.
23 (a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
24 modify this GNU manual.''
26 All Emacs Lisp code contained in this document may be used, distributed,
27 and modified without restriction.
31 @dircategory Emacs network features
33 * ERC: (erc). Powerful and extensible IRC client for Emacs.
38 @subtitle a full-featured IRC client
39 @subtitle for Emacs and XEmacs
41 @c The following two commands
42 @c start the copyright page.
44 @vskip 0pt plus 1filll
58 * Introduction:: What is ERC?
59 * Getting Started:: Quick Start guide to using ERC.
60 * Keystroke Summary:: Keystrokes used in ERC buffers.
61 * Modules:: Available modules for ERC.
62 * Advanced Usage:: Cool ways of using ERC.
63 * Getting Help and Reporting Bugs::
64 * History:: The history of ERC.
65 * GNU Free Documentation License:: The license for this documentation.
66 * Concept Index:: Search for terms.
69 --- The Detailed Node Listing ---
73 * Sample Session:: Example of connecting to the #emacs channel
74 * Special Features:: Differences from standalone IRC clients
78 * Connecting:: Ways of connecting to an IRC server.
79 * Sample Configuration:: An example configuration file.
80 * Options:: Options that are available for ERC.
88 ERC is a powerful, modular, and extensible IRC client for Emacs.
89 It is distributed with Emacs since version 22.1.
91 It comes with the following capabilities enabled by default.
96 @item Join channels automatically
97 @item Buttonize URLs, nicknames, and other text
99 @item Highlight or remove IRC control characters
100 @item Highlight pals, fools, and other keywords
101 @item Detect netsplits
102 @item Complete nicknames and commands in a programmable fashion
103 @item Make displayed lines read-only
105 @item Track channel activity in the mode-line
110 @node Getting Started
111 @chapter Getting Started
114 The command @kbd{M-x erc} will start ERC and prompt for the server to
117 If you want to place ERC settings in their own file, you can place them
118 in @file{~/.emacs.d/.ercrc.el}, creating it if necessary.
120 If you would rather use the Customize interface to change how ERC works,
121 do @kbd{M-x customize-group RET erc RET}. In particular, ERC comes with
122 lots of modules that may be enabled or disabled; to select which ones
123 you want, do @kbd{M-x customize-variable RET erc-modules RET}.
126 * Sample Session:: Example of connecting to the #emacs channel
127 * Special Features:: Differences from standalone IRC clients
131 @section Sample Session
133 This is an example ERC session which shows how to connect to the #emacs
134 channel on Freenode. Another IRC channel on Freenode that may be of
135 interest is #erc, which is a channel where ERC users and developers hang
140 @item Connect to Freenode
142 Run @kbd{M-x erc}. Use ``irc.freenode.net'' as the IRC server, ``6667''
143 as the port, and choose a nickname.
145 @item Get used to the interface
147 Switch to the ``irc.freenode.net:6667'' buffer, if you're not already
148 there. You will see first some messages about checking for ident, and
149 then a bunch of other messages that describe the current IRC server.
151 @item Join the #emacs channel
153 In that buffer, type ``/join @key{SPC} #emacs'' and hit @kbd{RET}. Depending
154 on how you've set up ERC, either a new buffer for ``#emacs'' will be
155 displayed, or a new buffer called ``#emacs'' will be created in the
156 background. If the latter, switch to the ``#emacs'' buffer. You will
157 see the channel topic and a list of the people who are currently on the
160 @item Register your nickname with Freenode
162 If you would like to be able to talk with people privately on the
163 Freenode network, you will have to ``register'' your nickname. To do
164 so, switch to the ``irc.freenode.net:6667'' buffer and type ``/msg
165 NickServ register <password>'', replacing ``<password>'' with your
166 desired password. It should tell you that the operation was successful.
168 @item Talk to people in the channel
170 If you switch back to the ``#emacs'' buffer, you can type a message, and
171 everyone on the channel will see it.
173 @item Open a query buffer to talk to someone
175 If you want to talk with someone in private (this should usually not be
176 done for technical help, only for personal questions), type ``/query
177 <nick>'', replacing ``<nick>'' with the nickname of the person you would
178 like to talk to. Depending on how ERC is set up, you will either see a
179 new buffer with the name of the person, or such a buffer will be created
180 in the background and you will have to switch to it. Begin typing
181 messages, and you will be able to have a conversation.
183 Note that if the other person is not registered, you will not be able to
188 @node Special Features
189 @section Special Features
191 ERC has some features that distinguish it from some IRC clients.
195 @item multiple channels and multiple servers
197 Every channel is put in a separate buffer. Several IRC servers may be
198 connected to at the same time.
200 @cindex query buffers
201 @item private message separation
203 Private conversations are treated as channels, and are put into separate
204 buffers in Emacs. We call these ``query buffers''.
208 Some occurrences of words can be highlighted, which makes it easier to
209 track different kinds of conversations.
213 ERC can notify you that certain users are online.
215 @item channel tracking
217 Channels can be hidden and conversation continue in the background. You
218 are notified when something is said in such a channel that is not
219 currently visible. This makes it easy to get Real Work done while still
220 maintaining an IRC presence.
222 @item nick completion
224 ERC can complete words upon hitting @kbd{TAB}, which eases the writing
225 of nicknames in messages.
230 Past actions are kept in history rings for future use. To navigate a
231 history ring, hit @kbd{M-p} to go backwards and @kbd{M-n} to go
234 @item multiple languages
236 Different channels and servers may have different language encodings.
238 multiple languages. Please contact the Emacs developers
239 if you are interested in helping with the
244 Users can load scripts (e.g., auto greeting scripts) when ERC starts up.
246 It is also possible to make custom IRC commands, if you know a little
247 Emacs Lisp. Just make an Emacs Lisp function and call it
248 @code{erc-cmd-NEWCOMMAND}, where @code{NEWCOMMAND} is the name of the
249 new command in capital letters.
253 If the connection goes away at some point, ERC will try to reconnect
254 automatically. If it fails to reconnect, and you want to try to
255 manually reestablish the connection at some later point, switch to an
256 ERC buffer and run the @code{/RECONNECT} command.
261 @node Keystroke Summary
262 @chapter Keys Used in ERC
265 This is a summary of keystrokes available in every ERC buffer.
269 @item C-a or <home> (`erc-bol')
270 Go to beginning of line or end of prompt.
272 @item RET (`erc-send-current-line')
273 Send the current line
275 @item TAB (`erc-complete-word')
276 If at prompt, complete the current word.
277 Otherwise, move to the next link or button.
279 @item M-TAB (`ispell-complete-word')
280 Complete the given word, using ispell.
282 @item C-c C-a (`erc-bol')
283 Go to beginning of line or end of prompt.
285 @item C-c C-b (`erc-iswitchb')
286 Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to.
288 @item C-c C-c (`erc-toggle-interpret-controls')
289 Toggle interpretation of control sequences in messages.
291 @item C-c C-d (`erc-input-action')
292 Interactively input a user action and send it to IRC.
294 @item C-c C-e (`erc-toggle-ctcp-autoresponse')
295 Toggle automatic CTCP replies (like VERSION and PING).
297 @item C-c C-f (`erc-toggle-flood-control')
298 Toggle use of flood control on sent messages.
300 @item C-c TAB (`erc-invite-only-mode')
301 Turn on the invite only mode (+i) for the current channel.
303 @item C-c C-j (`erc-join-channel')
304 Join channel. If point is at the beginning of a channel name, use that
307 @item C-c C-k (`erc-go-to-log-matches-buffer')
308 Interactively open an erc-log-matches buffer
310 @item C-c C-l (`erc-save-buffer-in-logs')
311 Append buffer contents to the log file, if logging is enabled.
313 @item C-c C-n (`erc-channel-names')
314 Run "/names #channel" in the current channel.
316 @item C-c C-o (`erc-get-channel-mode-from-keypress')
317 Read a key sequence and call the corresponding channel mode function.
318 After doing @kbd{C-c C-o}, type in a channel mode letter.
320 @kbd{C-g} means quit.
321 @kbd{RET} lets you type more than one mode at a time.
322 If @kbd{l} is pressed, @code{erc-set-channel-limit} gets called.
323 If @kbd{k} is pressed, @code{erc-set-channel-key} gets called.
324 Anything else will be sent to `erc-toggle-channel-mode'.
326 @item C-c C-p (`erc-part-from-channel')
327 Part from the current channel and prompt for a reason.
329 @item C-c C-q (`erc-quit-server')
330 Disconnect from current server after prompting for reason.
332 @item C-c C-r (`erc-remove-text-properties-region')
333 Clears the region (start,end) in object from all colors, etc.
335 @item C-c C-t (`erc-set-topic')
336 Prompt for a topic for the current channel.
338 @item C-c C-u (`erc-kill-input')
339 Kill current input line using `erc-bol' followed by `kill-line'.
348 One way to add functionality to ERC is to customize which of its many
351 There is a spiffy customize interface, which may be reached by typing
352 @kbd{M-x customize-option erc-modules RET}. Alternatively, set
353 @code{erc-modules} manually and then call @code{erc-update-modules}.
355 The following is a list of available modules.
359 @cindex modules, autoaway
361 Set away status automatically
363 @cindex modules, autojoin
365 Join channels automatically
367 @cindex modules, bbdb
369 Integrate with the Big Brother Database
371 @cindex modules, button
373 Buttonize URLs, nicknames, and other text
375 @cindex modules, capab-identify
377 Mark unidentified users on freenode and other servers supporting CAPAB.
379 @cindex modules, completion
380 @cindex modules, pcomplete
381 @item completion (aka pcomplete)
382 Complete nicknames and commands (programmable)
384 @cindex modules, fill
388 @cindex modules, identd
390 Launch an identd server on port 8113
392 @cindex modules, irccontrols
394 Highlight or remove IRC control characters
400 @cindex modules, match
402 Highlight pals, fools, and other keywords
404 @cindex modules, menu
406 Display a menu in ERC buffers
408 @cindex modules, netsplit
412 @cindex modules, noncommands
414 Don't display non-IRC commands after evaluation
416 @cindex modules, notify
418 Notify when the online status of certain users changes
420 @cindex modules, notifications
422 Send you a notification when you get a private message,
423 or your nickname is mentioned
425 @cindex modules, page
427 Process CTCP PAGE requests from IRC
429 @cindex modules, readonly
431 Make displayed lines read-only
433 @cindex modules, replace
435 Replace text in messages
437 @cindex modules, ring
439 Enable an input history
441 @cindex modules, scrolltobottom
443 Scroll to the bottom of the buffer
445 @cindex modules, services
447 Identify to Nickserv (IRC Services) automatically
449 @cindex modules, smiley
451 Convert smileys to pretty icons
453 @cindex modules, sound
455 Play sounds when you receive CTCP SOUND requests
457 @cindex modules, spelling
459 Check spelling of messages
461 @cindex modules, stamp
463 Add timestamps to messages
465 @cindex modules, track
467 Track channel activity in the mode-line
469 @cindex modules, truncate
471 Truncate buffers to a certain size
473 @cindex modules, unmorse
475 Translate morse code in messages
479 @c PRE5_4: Document every option of every module in its own subnode
483 @chapter Advanced Usage
484 @cindex advanced topics
487 * Connecting:: Ways of connecting to an IRC server.
488 * Sample Configuration:: An example configuration file.
489 * Options:: Options that are available for ERC.
493 @section Connecting to an IRC Server
496 The easiest way to connect to an IRC server is to call @kbd{M-x erc}.
497 If you want to assign this function to a keystroke, the following will
498 help you figure out its parameters.
501 Select connection parameters and run ERC@.
502 Non-interactively, it takes the following keyword arguments.
509 @item @var{full-name}
512 That is, if called with the following arguments, @var{server} and
513 @var{full-name} will be set to those values, whereas
514 @code{erc-compute-port}, @code{erc-compute-nick} and
515 @code{erc-compute-full-name} will be invoked for the values of the other
519 (erc :server "irc.freenode.net" :full-name "Harry S Truman")
525 @defun erc-compute-server &optional server
526 Return an IRC server name.
528 This tries a number of increasingly more default methods until a non-@code{nil}
532 @item @var{server} (the argument passed to this function)
533 @item The @code{erc-server} option
534 @item The value of the IRCSERVER environment variable
535 @item The @code{erc-default-server} variable
541 IRC server to use if one is not provided.
546 @defun erc-compute-port &optional port
547 Return a port for an IRC server.
549 This tries a number of increasingly more default methods until a non-@code{nil}
553 @item @var{port} (the argument passed to this function)
554 @item The @code{erc-port} option
555 @item The @code{erc-default-port} variable
561 IRC port to use if not specified.
563 This can be either a string or a number.
568 @defun erc-compute-nick &optional nick
569 Return user's IRC nick.
571 This tries a number of increasingly more default methods until a
572 non-@code{nil} value is found.
575 @item @var{nick} (the argument passed to this function)
576 @item The @code{erc-nick} option
577 @item The value of the IRCNICK environment variable
578 @item The result from the @code{user-login-name} function
584 Nickname to use if one is not provided.
586 This can be either a string, or a list of strings.
587 In the latter case, if the first nick in the list is already in use,
588 other nicks are tried in the list order.
591 @defopt erc-nick-uniquifier
592 The string to append to the nick if it is already in use.
595 @defopt erc-try-new-nick-p
596 If the nickname you chose isn't available, and this option is non-@code{nil},
597 ERC should automatically attempt to connect with another nickname.
599 You can manually set another nickname with the /NICK command.
605 @defopt erc-prompt-for-password
606 If non-@code{nil} (the default), @kbd{M-x erc} prompts for a password.
609 If you prefer, you can set this option to @code{nil} and use the
610 @code{auth-source} mechanism to store your password. For instance, if
611 you use @file{~/.authinfo} as your auth-source backend, then put
612 something like the following in that file:
615 machine irc.example.net login "#fsf" password sEcReT
619 ERC also consults @code{auth-source} to find any channel keys required
620 for the channels that you wish to autojoin, as specified by the
621 variable @code{erc-autojoin-channels-alist}.
623 For more details, @pxref{Top,,auth-source, auth, Emacs auth-source Library}.
626 @subheading Full name
628 @defun erc-compute-full-name &optional full-name
629 Return user's full name.
631 This tries a number of increasingly more default methods until a
632 non-@code{nil} value is found.
635 @item @var{full-name} (the argument passed to this function)
636 @item The @code{erc-user-full-name} option
637 @item The value of the IRCNAME environment variable
638 @item The result from the @code{user-full-name} function
643 @defopt erc-user-full-name
646 This can be either a string or a function to call.
649 @node Sample Configuration
650 @section Sample Configuration
651 @cindex configuration, sample
653 Here is an example of configuration settings for ERC@. This can go into
654 your Emacs configuration file. Everything after the @code{(require
655 'erc)} command can optionally go into @file{~/.emacs.d/.ercrc.el}.
658 ;;; Sample ERC configuration
660 ;; Add the ERC directory to load path -- you don't need this if you are
661 ;; using the version of ERC that comes with Emacs
662 (add-to-list 'load-path "~/elisp/erc")
667 ;; Load authentication info from an external source. Put sensitive
668 ;; passwords and the like in here.
669 (load "~/.emacs.d/.erc-auth")
671 ;; This is an example of how to make a new command. Type "/uptime" to
673 (defun erc-cmd-UPTIME (&rest ignore)
674 "Display the uptime of the system, as well as some load-related
675 stuff, to the current ERC buffer."
677 (replace-regexp-in-string
678 ", load average: " "] @{Load average@} ["
679 ;; Collapse spaces, remove
680 (replace-regexp-in-string
682 ;; Remove beginning and trailing whitespace
683 (replace-regexp-in-string
685 (shell-command-to-string "uptime"))))))
687 (concat "@{Uptime@} [" uname-output "]"))))
689 ;; This causes ERC to connect to the Freenode network upon hitting
690 ;; C-c e f. Replace MYNICK with your IRC nick.
691 (global-set-key "\C-cef" (lambda () (interactive)
692 (erc :server "irc.freenode.net" :port "6667"
695 ;; This causes ERC to connect to the IRC server on your own machine (if
696 ;; you have one) upon hitting C-c e b. Replace MYNICK with your IRC
697 ;; nick. Often, people like to run bitlbee (http://bitlbee.org/) as an
698 ;; AIM/Jabber/MSN to IRC gateway, so that they can use ERC to chat with
699 ;; people on those networks.
700 (global-set-key "\C-ceb" (lambda () (interactive)
701 (erc :server "localhost" :port "6667"
704 ;; Make C-c RET (or C-c C-RET) send messages instead of RET. This has
705 ;; been commented out to avoid confusing new users.
706 ;; (define-key erc-mode-map (kbd "RET") nil)
707 ;; (define-key erc-mode-map (kbd "C-c RET") 'erc-send-current-line)
708 ;; (define-key erc-mode-map (kbd "C-c C-RET") 'erc-send-current-line)
712 ;; Join the #emacs and #erc channels whenever connecting to Freenode.
713 (setq erc-autojoin-channels-alist '(("freenode.net" "#emacs" "#erc")))
715 ;; Interpret mIRC-style color commands in IRC chats
716 (setq erc-interpret-mirc-color t)
718 ;; The following are commented out by default, but users of other
719 ;; non-Emacs IRC clients might find them useful.
720 ;; Kill buffers for channels after /part
721 ;; (setq erc-kill-buffer-on-part t)
722 ;; Kill buffers for private queries after quitting the server
723 ;; (setq erc-kill-queries-on-quit t)
724 ;; Kill buffers for server messages after quitting the server
725 ;; (setq erc-kill-server-buffer-on-quit t)
732 @c PRE5_4: (Node) Document every ERC option (module options go in
735 This section is extremely incomplete. For now, the easiest way to
736 check out all the available options for ERC is to do
737 @kbd{M-x customize-group erc RET}.
739 @defopt erc-hide-list
740 If non, @code{nil}, this is a list of IRC message types to hide, e.g.:
743 (setq erc-hide-list '("JOIN" "PART" "QUIT"))
747 @defopt erc-lurker-hide-list
748 Like @code{erc-hide-list}, but only applies to messages sent by
749 lurkers. The function @code{erc-lurker-p} determines whether a given
750 nickname is considered a lurker.
754 @node Getting Help and Reporting Bugs
755 @chapter Getting Help and Reporting Bugs
756 @cindex help, getting
757 @cindex bugs, reporting
759 After you have read this guide, if you still have questions about ERC,
760 or if you have bugs to report, there are several places you can go.
765 @uref{http://www.emacswiki.org/cgi-bin/wiki/ERC} is the
766 emacswiki.org page for ERC@. Anyone may add tips, hints, etc. to it.
769 You can ask questions about using ERC on the Emacs mailing list,
770 @uref{http://lists.gnu.org/mailman/listinfo/help-gnu-emacs}.
773 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
774 contributors are frequently around and willing to answer your
778 To report a bug in ERC, use @kbd{M-x report-emacs-bug}.
785 @cindex history, of ERC
787 @c abel@@bfr.co.il, sergey.berezin@@cs.cmu.edu
788 ERC was originally written by Alexander L. Belikoff and Sergey Berezin.
789 They stopped development around
790 December 1999. Their last released version was ERC 2.0.
792 P.S.: If one of the original developers of ERC reads this, we'd like to
793 receive additional information for this file and hear comments in
799 @c mlang@@delysid.org, alex@@gnu.org
800 In June 2001, Mario Lang and Alex Schroeder
801 took over development and created a ERC Project at
802 @uref{http://sourceforge.net/projects/erc}.
804 In reaction to a mail about the new ERC development effort, Sergey
805 Berezin said, ``First of all, I'm glad that my version of ERC is being
806 used out there. The thing is, I do not have free time and enough
807 incentive anymore to work on ERC, so I would be happy if you guys take
808 over the project entirely.''
810 So we happily hacked away on ERC, and soon after (September 2001)
811 released the next "stable" version, 2.1.
813 Most of the development of the new ERC happened on #emacs on
814 irc.openprojects.net. Over time, many people contributed code, ideas,
815 bugfixes, and a lot of alpha/beta/gamma testing.
817 See the @file{CREDITS} file for a list of contributors.
821 ERC 3.0 was released.
825 ERC 4.0 was released.
830 ERC 5.0 was released. Michael Olson became
831 the release manager and eventually the maintainer.
833 After some discussion between him and the Emacs developers, it was
834 decided to include ERC in Emacs.
838 ERC 5.1 was released. It was subsequently included in Emacs 22.
840 ERC became an official GNU project, and development moved to
841 @uref{http://sv.gnu.org/projects/erc}. We switched to using GNU Arch as
842 our revision control system. Our mailing list address changed as well.
846 We switched to using git for our version control system.
850 Since about 2009, ERC is no longer developed as a separate project, but
851 is maintained as part of Emacs.
855 @node GNU Free Documentation License
856 @appendix GNU Free Documentation License
857 @include doclicense.texi