lisp/server.el (server-ensure-safe-dir): Simplify.
[emacs.git] / doc / misc / erc.texi
blob6d791d7c5f653c8e6cc709fbbc34e63872844c82
1 \input texinfo
2 @c %**start of header
3 @setfilename ../../info/erc
4 @settitle ERC Manual
5 @syncodeindex fn cp
6 @c %**end of header
8 @copying
9 This manual is for ERC version 5.3.
11 Copyright @copyright{} 2005-2012
12 Free Software Foundation, Inc.
14 @quotation
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.  Buying copies from the FSF supports it in
24 developing GNU and promoting software freedom.''
26 All Emacs Lisp code contained in this document may be used, distributed,
27 and modified without restriction.
28 @end quotation
29 @end copying
31 @dircategory Emacs network features
32 @direntry
33 * ERC: (erc).                   Powerful and extensible IRC client for Emacs.
34 @end direntry
36 @titlepage
37 @title ERC manual
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.
43 @page
44 @vskip 0pt plus 1filll
45 @insertcopying
46 @end titlepage
48 @contents
50 @ifnottex
51 @node Top, Introduction, (dir), (dir)
52 @comment  node-name,  next,  previous,  up
53 @top ERC
55 @insertcopying
56 @end ifnottex
58 @menu
59 * Introduction::                What is ERC?
60 * Obtaining ERC::               How to get ERC releases and development
61                                   versions.
62 * Installation::                Compiling and installing ERC.
63 * Getting Started::             Quick Start guide to using ERC.
64 * Keystroke Summary::           Keystrokes used in ERC buffers.
65 * Modules::                     Available modules for ERC.
66 * Advanced Usage::              Cool ways of using ERC.
67 * Getting Help and Reporting Bugs::  
68 * History::                     The history of ERC.
69 * Copying::                     The GNU General Public License gives you
70                                   permission to redistribute ERC on
71                                   certain terms; it also explains that
72                                   there is no warranty.
73 * GNU Free Documentation License::  The license for this documentation.
74 * Concept Index::               Search for terms.
76 @detailmenu
77  --- The Detailed Node Listing ---
79 Obtaining ERC
81 * Releases::                    Released versions of ERC.
82 * Development::                 Latest unreleased development changes.
84 Getting Started
86 * Sample Session::              Example of connecting to the #emacs channel
87 * Special Features::            Differences from standalone IRC clients
89 Advanced Usage
91 * Connecting::                  Ways of connecting to an IRC server.
92 * Sample Configuration::        An example configuration file.
93 * Options::                     Options that are available for ERC.
95 @end detailmenu
96 @end menu
98 @node Introduction, Obtaining ERC, Top, Top
99 @comment  node-name,  next,  previous,  up
100 @chapter Introduction
102 ERC is a powerful, modular, and extensible IRC client for Emacs.
104 It comes with the following capabilities enabled by default.
106 @itemize @bullet
107 @item Flood control
108 @item Timestamps
109 @item Join channels automatically
110 @item Buttonize URLs, nicknames, and other text
111 @item Wrap long lines
112 @item Highlight or remove IRC control characters
113 @item Highlight pals, fools, and other keywords
114 @item Detect netsplits
115 @item Complete nicknames and commands in a programmable fashion
116 @item Make displayed lines read-only
117 @item Input history
118 @item Track channel activity in the mode-line
120 @end itemize
122 @node Obtaining ERC, Installation, Introduction, Top
123 @comment  node-name,  next,  previous,  up
124 @chapter Obtaining ERC
126 @menu
127 * Releases::                    Released versions of ERC.
128 * Development::                 Latest unreleased development changes.
129 @end menu
131 Note that some ERC files are not included with Emacs due to copyright or
132 dependency issues.  If desired, they may be found at the following
133 locations, or from your local GNU mirror.
135 @itemize @bullet
136 @item @uref{http://ftp.gnu.org/gnu/erc/erc-5.3-extras.tar.gz}
137 @item @uref{http://ftp.gnu.org/gnu/erc/erc-5.3-extras.zip}
138 @end itemize
140 The rest of this chapter may be skipped if you are using the version of
141 ERC that comes with Emacs.
143 @node Releases, Development, Obtaining ERC, Obtaining ERC
144 @comment  node-name,  next,  previous,  up
145 @section Releases
147 Choose to install a release if you want to minimize risk.
149 Errors are corrected in development first.  User-visible changes will be
150 announced on the @email{erc-discuss@@gnu.org} mailing list.
151 @pxref{Getting Help and Reporting Bugs}.
153 @cindex releases, Debian package
154 @cindex Debian package for ERC
155 Debian users can get ERC via apt-get.  The @file{erc} package is
156 available in the official Debian repository.
158 @cindex releases, from source
159 Alternatively, you can download the latest release from
160 @uref{http://ftp.gnu.org/gnu/erc}, or your local GNU mirror.
162 @node Development,  , Releases, Obtaining ERC
163 @comment  node-name,  next,  previous,  up
164 @section Development
165 @cindex development
167 Choose the development version if you want to live on the bleeding edge
168 of ERC development or try out new features before release.
170 @cindex git version control system, using
171 The git version control system allows you to keep up-to-date with the
172 latest changes to the development version of ERC.  It also allows you
173 to contribute changes (via commits, if you are have developer access to
174 the repository, or via patches, otherwise).  If you would like to
175 contribute to ERC development, it is highly recommended that you use
176 git.
178 If you are new to git, you might find this tutorial helpful:
179 @uref{http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html}.
181 Downloading ERC with git and staying up-to-date involves the following
182 steps.
184 @enumerate
185 @item Install git.
187 @itemize @bullet
188 @item Debian and Ubuntu: @kbd{apt-get install git-core}.
189 @item Windows: @uref{http://git.or.cz/gitwiki/WindowsInstall}.
190 @item Other operating systems: download, compile, and install the source
191 from @uref{http://www.kernel.org/pub/software/scm/git/}, or find a git
192 package for your operating system.
193 @end itemize
195 @item Download the ERC development branch.
197 If you have developer access to ERC, do:
199 @example
200 git clone ssh://loginname@@git.sv.gnu.org/srv/git/erc.git
201 @end example
203 otherwise, do:
205 @example
206 git clone git://git.sv.gnu.org/erc.git
207 @end example
209 If you are behind a restrictive firewall, and do not have developer
210 access, then do the following instead:
212 @example
213 git clone http://git.sv.gnu.org/r/erc.git
214 @end example
216 @item List upstream changes that are missing from your local copy.
217 Do this whenever you want to see whether new changes have been committed
218 to ERC.  If you wish, you may skip this step and proceed directly to
219 the ``update'' step.
221 @example
222 # Change to the source directory you are interested in.
223 cd erc
225 # Fetch new changes from the repository, but don't apply them yet
226 git fetch origin
228 # Display log messages for the new changes
229 git log HEAD..origin
230 @end example
232 ``origin'' is git's name for the location where you originally got ERC
233 from.  You can change this location at any time by editing the
234 @file{.git/config} file in the directory where the ERC source was
235 placed.
237 @cindex updating ERC with git
238 @item Update to the latest version by pulling in any missing changes.
240 @example
241 cd erc
242 git pull origin
243 @end example
245 git will show how many files changed, and will provide a visual display
246 for how many lines were changed in each file.
248 @end enumerate
250 There are other ways to interact with the ERC repository.
252 @itemize
253 @item Browse git repo: @uref{http://git.sv.gnu.org/gitweb/?p=erc.git}
254 @item Latest development snapshot: @uref{http://mwolson.org/static/dist/erc-latest.tar.gz}
255 @item Latest development snapshot (zip file): @uref{http://mwolson.org/static/dist/erc-latest.zip}
256 @end itemize
258 The latest development snapshot can lag behind the git repo by as much
259 as 20 minutes, but never more than that.
261 For further information on committing changes to ERC and performing
262 development, please consult
263 @uref{http://emacswiki.org/cgi-bin/wiki/ErcDevelopment}.
266 @node Installation, Getting Started, Obtaining ERC, Top
267 @comment  node-name,  next,  previous,  up
268 @chapter Installation
270 ERC may be compiled and installed on your machine.
272 This section may be skipped if you are using the version of ERC that
273 comes with Emacs.
275 @subsubheading Compilation
277 This is an optional step, since Emacs Lisp source code does not
278 necessarily have to be byte-compiled.  It will yield a speed increase,
279 though.
281 A working copy of Emacs or XEmacs is needed in order to compile ERC.  By
282 default, the program that is installed with the name @command{emacs}
283 will be used.
285 If you want to use the @command{xemacs} binary to perform the
286 compilation, you would need to edit @file{Makefile} in the top-level
287 directory as follows.  You can put either a full path to an Emacs or
288 XEmacs binary or just the command name, as long as it is in the
289 @env{PATH}.
291 @example
292 EMACS    = xemacs
293 SITEFLAG = -no-site-file
294 @end example
296 Running @code{make} should compile the ERC source files in the
297 @file{lisp} directory.
299 @subsubheading Installation
301 ERC may be installed into your file hierarchy by doing the following.
303 Edit the @file{Makefile} file so that @env{ELISPDIR} points to where you
304 want the source and compiled ERC files to be installed and
305 @env{INFODIR} indicates where to put the ERC manual.  Of course, you
306 will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
307 Compilation section if you are using XEmacs.
309 If you are installing ERC on a Debian system, you might want to change
310 the value of @env{INSTALLINFO} as specified in @file{Makefile}.
312 Run @code{make} as a normal user.
314 Run @code{make install} as the root user if you have chosen installation
315 locations that require this.
318 @node Getting Started, Keystroke Summary, Installation, Top
319 @comment  node-name,  next,  previous,  up
320 @chapter Getting Started
321 @cindex settings
323 To use ERC, add the directory containing its files to your
324 @code{load-path} variable, in your @file{.emacs} file.  Then, load ERC
325 itself.  An example follows.
327 @lisp
328 (require 'erc)
329 @end lisp
331 Once ERC is loaded, the command @kbd{M-x erc} will start ERC and
332 prompt for the server to connect to.
334 If you want to place ERC settings in their own file, you can place them
335 in @file{~/.emacs.d/.ercrc.el}, creating it if necessary.
337 If you would rather use the Customize interface to change how ERC works,
338 do @kbd{M-x customize-group RET erc RET}.  In particular, ERC comes with
339 lots of modules that may be enabled or disabled; to select which ones
340 you want, do @kbd{M-x customize-variable RET erc-modules RET}.
342 @menu
343 * Sample Session::              Example of connecting to the #emacs channel
344 * Special Features::            Differences from standalone IRC clients
345 @end menu
347 @node Sample Session, Special Features, Getting Started, Getting Started
348 @comment  node-name,  next,  previous,  up
349 @section Sample Session
351 This is an example ERC session which shows how to connect to the #emacs
352 channel on Freenode.  Another IRC channel on Freenode that may be of
353 interest is #erc, which is a channel where ERC users and developers hang
354 out.
356 @itemize @bullet
358 @item Connect to Freenode
360 Run @kbd{M-x erc}.  Use ``irc.freenode.net'' as the IRC server, ``6667''
361 as the port, and choose a nickname.
363 @item Get used to the interface
365 Switch to the ``irc.freenode.net:6667'' buffer, if you're not already
366 there.  You will see first some messages about checking for ident, and
367 then a bunch of other messages that describe the current IRC server.
369 @item Join the #emacs channel
371 In that buffer, type ``/join SPC #emacs'' and hit @kbd{RET}.  Depending
372 on how you've set up ERC, either a new buffer for ``#emacs'' will be
373 displayed, or a new buffer called ``#emacs'' will be created in the
374 background.  If the latter, switch to the ``#emacs'' buffer.  You will
375 see the channel topic and a list of the people who are currently on the
376 channel.
378 @item Register your nickname with Freenode
380 If you would like to be able to talk with people privately on the
381 Freenode network, you will have to ``register'' your nickname.  To do
382 so, switch to the ``irc.freenode.net:6667'' buffer and type ``/msg
383 NickServ register <password>'', replacing ``<password>'' with your
384 desired password.  It should tell you that the operation was successful.
386 @item Talk to people in the channel
388 If you switch back to the ``#emacs'' buffer, you can type a message, and
389 everyone on the channel will see it.
391 @item Open a query buffer to talk to someone
393 If you want to talk with someone in private (this should usually not be
394 done for technical help, only for personal questions), type ``/query
395 <nick>'', replacing ``<nick>'' with the nickname of the person you would
396 like to talk to.  Depending on how ERC is set up, you will either see a
397 new buffer with the name of the person, or such a buffer will be created
398 in the background and you will have to switch to it.  Begin typing
399 messages, and you will be able to have a conversation.
401 Note that if the other person is not registered, you will not be able to
402 talk with them.
404 @end itemize
406 @node Special Features, , Sample Session, Getting Started
407 @comment  node-name,  next,  previous,  up
408 @section Special Features
410 ERC has some features that distinguish it from some IRC clients.
412 @itemize @bullet
414 @item multiple channels and multiple servers
416 Every channel is put in a separate buffer.  Several IRC servers may be
417 connected to at the same time.
419 @cindex query buffers
420 @item private message separation
422 Private conversations are treated as channels, and are put into separate
423 buffers in Emacs.  We call these ``query buffers''.
425 @item highlighting
427 Some occurrences of words can be highlighted, which makes it easier to
428 track different kinds of conversations.
430 @item notification
432 ERC can notify you that certain users are online.
434 @item channel tracking
436 Channels can be hidden and conversation continue in the background.  You
437 are notified when something is said in such a channel that is not
438 currently visible.  This makes it easy to get Real Work done while still
439 maintaining an IRC presence.
441 @item nick completion
443 ERC can complete words upon hitting @kbd{TAB}, which eases the writing
444 of nicknames in messages.
446 @cindex history ring
447 @item history
449 Past actions are kept in history rings for future use.  To navigate a
450 history ring, hit @kbd{M-p} to go backwards and @kbd{M-n} to go
451 forwards.
453 @item multiple languages
455 Different channels and servers may have different language encodings.
457 In addition, it is possible to translate the messages that ERC uses into
458 multiple languages.  Please contact the developers of ERC at
459 @email{erc-discuss@@gnu.org} if you are interested in helping with the
460 translation effort.
462 @item user scripting
464 Users can load scripts (e.g. auto greeting scripts) when ERC starts up.
466 It is also possible to make custom IRC commands, if you know a little
467 Emacs Lisp.  Just make an Emacs Lisp function and call it
468 @code{erc-cmd-NEWCOMMAND}, where @code{NEWCOMMAND} is the name of the
469 new command in capital letters.
471 @item auto reconnect
473 If the connection goes away at some point, ERC will try to reconnect
474 automatically.  If it fails to reconnect, and you want to try to
475 manually reestablish the connection at some later point, switch to an
476 ERC  buffer and run the @code{/RECONNECT} command.
478 @end itemize
481 @node Keystroke Summary, Modules, Getting Started, Top
482 @comment  node-name,  next,  previous,  up
483 @chapter Keys Used in ERC
484 @cindex keystrokes
486 This is a summary of keystrokes available in every ERC buffer.
488 @table @kbd
490 @item C-a or <home> (`erc-bol')
491 Go to beginning of line or end of prompt.
493 @item RET (`erc-send-current-line')
494 Send the current line
496 @item TAB (`erc-complete-word')
497 If at prompt, complete the current word.
498 Otherwise, move to the next link or button.
500 @item M-TAB (`ispell-complete-word')
501 Complete the given word, using ispell.
503 @item C-c C-a (`erc-bol')
504 Go to beginning of line or end of prompt.
506 @item C-c C-b (`erc-iswitchb')
507 Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to.
509 @item C-c C-c (`erc-toggle-interpret-controls')
510 Toggle interpretation of control sequences in messages.
512 @item C-c C-d (`erc-input-action')
513 Interactively input a user action and send it to IRC.
515 @item C-c C-e (`erc-toggle-ctcp-autoresponse')
516 Toggle automatic CTCP replies (like VERSION and PING).
518 @item C-c C-f (`erc-toggle-flood-control')
519 Toggle use of flood control on sent messages.
521 @item C-c TAB (`erc-invite-only-mode')
522 Turn on the invite only mode (+i) for the current channel.
524 @item C-c C-j (`erc-join-channel')
525 Join channel.  If point is at the beginning of a channel name, use that
526 as default.
528 @item C-c C-k (`erc-go-to-log-matches-buffer')
529 Interactively open an erc-log-matches buffer
531 @item C-c C-l (`erc-save-buffer-in-logs')
532 Append buffer contents to the log file, if logging is enabled.
534 @item C-c C-n (`erc-channel-names')
535 Run "/names #channel" in the current channel.
537 @item C-c C-o (`erc-get-channel-mode-from-keypress')
538 Read a key sequence and call the corresponding channel mode function.
539 After doing @kbd{C-c C-o}, type in a channel mode letter.
541 @kbd{C-g} means quit.
542 @kbd{RET} lets you type more than one mode at a time.
543 If @kbd{l} is pressed, @code{erc-set-channel-limit} gets called.
544 If @kbd{k} is pressed, @code{erc-set-channel-key} gets called.
545 Anything else will be sent to `erc-toggle-channel-mode'.
547 @item C-c C-p (`erc-part-from-channel')
548 Part from the current channel and prompt for a reason.
550 @item C-c C-q (`erc-quit-server')
551 Disconnect from current server after prompting for reason.
553 @item C-c C-r (`erc-remove-text-properties-region')
554 Clears the region (start,end) in object from all colors, etc.
556 @item C-c C-t (`erc-set-topic')
557 Prompt for a topic for the current channel.
559 @item C-c C-u (`erc-kill-input')
560 Kill current input line using `erc-bol' followed by `kill-line'.
562 @end table
565 @node Modules, Advanced Usage, Keystroke Summary, Top
566 @comment  node-name,  next,  previous,  up
567 @chapter Modules
568 @cindex modules
570 One way to add functionality to ERC is to customize which of its many
571 modules are loaded.
573 There is a spiffy customize interface, which may be reached by typing
574 @kbd{M-x customize-option erc-modules RET}.  Alternatively, set
575 @code{erc-modules} manually and then call @code{erc-update-modules}.
577 The following is a list of available modules.
579 @table @code
581 @cindex modules, autoaway
582 @item autoaway
583 Set away status automatically
585 @cindex modules, autojoin
586 @item autojoin
587 Join channels automatically
589 @cindex modules, bbdb
590 @item bbdb
591 Integrate with the Big Brother Database
593 @cindex modules, button
594 @item button
595 Buttonize URLs, nicknames, and other text
597 @cindex modules, capab-identify
598 @item capab-identify
599 Mark unidentified users on freenode and other servers supporting CAPAB.
601 @cindex modules, completion
602 @cindex modules, pcomplete
603 @item completion (aka pcomplete)
604 Complete nicknames and commands (programmable)
606 @cindex modules, fill
607 @item fill
608 Wrap long lines
610 @cindex modules, hecomplete
611 @item hecomplete
612 Complete nicknames and commands (old).  This is the old module---you
613 might prefer the ``completion'' module instead.
615 @cindex modules, identd
616 @item identd
617 Launch an identd server on port 8113
619 @cindex modules, irccontrols
620 @item irccontrols
621 Highlight or remove IRC control characters
623 @cindex modules, log
624 @item log
625 Save buffers in logs
627 @cindex modules, match
628 @item match
629 Highlight pals, fools, and other keywords
631 @cindex modules, menu
632 @item menu
633 Display a menu in ERC buffers
635 @cindex modules, netsplit
636 @item netsplit
637 Detect netsplits
639 @cindex modules, noncommands
640 @item noncommands
641 Don't display non-IRC commands after evaluation
643 @cindex modules, notify
644 @item notify
645 Notify when the online status of certain users changes
647 @cindex modules, page
648 @item page
649 Process CTCP PAGE requests from IRC
651 @cindex modules, readonly
652 @item readonly
653 Make displayed lines read-only
655 @cindex modules, replace
656 @item replace
657 Replace text in messages
659 @cindex modules, ring
660 @item ring
661 Enable an input history
663 @cindex modules, scrolltobottom
664 @item scrolltobottom
665 Scroll to the bottom of the buffer
667 @cindex modules, services
668 @item services
669 Identify to Nickserv (IRC Services) automatically
671 @cindex modules, smiley
672 @item smiley
673 Convert smileys to pretty icons
675 @cindex modules, sound
676 @item sound
677 Play sounds when you receive CTCP SOUND requests
679 @cindex modules, spelling
680 @item spelling
681 Check spelling of messages
683 @cindex modules, stamp
684 @item stamp
685 Add timestamps to messages
687 @cindex modules, track
688 @item track
689 Track channel activity in the mode-line
691 @cindex modules, truncate
692 @item truncate
693 Truncate buffers to a certain size
695 @cindex modules, unmorse
696 @item unmorse
697 Translate morse code in messages
699 @end table
701 @c PRE5_4: Document every option of every module in its own subnode
704 @node Advanced Usage, Getting Help and Reporting Bugs, Modules, Top
705 @comment  node-name,  next,  previous,  up
706 @chapter Advanced Usage
707 @cindex advanced topics
709 @menu
710 * Connecting::                  Ways of connecting to an IRC server.
711 * Sample Configuration::        An example configuration file.
712 * Options::                     Options that are available for ERC.
713 @end menu
715 @node Connecting, Sample Configuration, Advanced Usage, Advanced Usage
716 @comment  node-name,  next,  previous,  up
717 @section Connecting to an IRC Server
718 @cindex connecting
720 The easiest way to connect to an IRC server is to call @kbd{M-x erc}.
721 If you want to assign this function to a keystroke, the following will
722 help you figure out its parameters.
724 @defun erc
725 Select connection parameters and run ERC.
726 Non-interactively, it takes the following keyword arguments.
728 @itemize @bullet
729 @item @var{server}
730 @item @var{port}
731 @item @var{nick}
732 @item @var{password}
733 @item @var{full-name}
734 @end itemize
736 That is, if called with the following arguments, @var{server} and
737 @var{full-name} will be set to those values, whereas
738 @code{erc-compute-port}, @code{erc-compute-nick} and
739 @code{erc-compute-full-name} will be invoked for the values of the other
740 parameters.
742 @example
743 (erc :server "irc.freenode.net" :full-name "Harry S Truman")
744 @end example
745 @end defun
747 @subheading Server
749 @defun erc-compute-server &optional server
750 Return an IRC server name.
752 This tries a number of increasingly more default methods until a non-nil
753 value is found.
755 @itemize @bullet
756 @item @var{server} (the argument passed to this function)
757 @item The @code{erc-server} option
758 @item The value of the IRCSERVER environment variable
759 @item The @code{erc-default-server} variable
760 @end itemize
762 @end defun
764 @defopt erc-server nil
765 IRC server to use if one is not provided.
766 @end defopt
768 @subheading Port
770 @defun erc-compute-port &optional port
771 Return a port for an IRC server.
773 This tries a number of increasingly more default methods until a non-nil
774 value is found.
776 @itemize @bullet
777 @item @var{port} (the argument passed to this function)
778 @item The @code{erc-port} option
779 @item The @code{erc-default-port} variable
780 @end itemize
782 @end defun
784 @defopt erc-port
785 IRC port to use if not specified.
787 This can be either a string or a number.
788 @end defopt
790 @subheading Nick
792 @defun erc-compute-nick &optional nick
793 Return user's IRC nick.
795 This tries a number of increasingly more default methods until a
796 non-nil value is found.
798 @itemize
799 @item @var{nick} (the argument passed to this function)
800 @item The @code{erc-nick} option
801 @item The value of the IRCNICK environment variable
802 @item The result from the @code{user-login-name} function
803 @end itemize
805 @end defun
807 @defopt erc-nick
808 Nickname to use if one is not provided.
810 This can be either a string, or a list of strings.
811 In the latter case, if the first nick in the list is already in use,
812 other nicks are tried in the list order.
813 @end defopt
815 @defopt erc-nick-uniquifier
816 The string to append to the nick if it is already in use.
817 @end defopt
819 @defopt erc-try-new-nick-p
820 If the nickname you chose isn't available, and this option is non-nil,
821 ERC should automatically attempt to connect with another nickname.
823 You can manually set another nickname with the /NICK command.
824 @end defopt
826 @subheading Full name
828 @defun erc-compute-full-name &optional full-name
829 Return user's full name.
831 This tries a number of increasingly more default methods until a
832 non-nil value is found.
834 @itemize @bullet
835 @item @var{full-name} (the argument passed to this function)
836 @item The @code{erc-user-full-name} option
837 @item The value of the IRCNAME environment variable
838 @item The result from the @code{user-full-name} function
839 @end itemize
841 @end defun
843 @defopt erc-user-full-name
844 User full name.
846 This can be either a string or a function to call.
847 @end defopt
849 @node Sample Configuration, Options, Connecting, Advanced Usage
850 @comment  node-name,  next,  previous,  up
851 @section Sample Configuration
852 @cindex configuration, sample
854 Here is an example of configuration settings for ERC.  This can go into
855 your Emacs configuration file.  Everything after the @code{(require
856 'erc)} command can optionally go into @file{~/.emacs.d/.ercrc.el}.
858 @lisp
859 ;;; Sample ERC configuration
861 ;; Add the ERC directory to load path -- you don't need this if you are
862 ;; using the version of ERC that comes with Emacs
863 (add-to-list 'load-path "~/elisp/erc")
865 ;; Load ERC
866 (require 'erc)
868 ;; Load authentication info from an external source.  Put sensitive
869 ;; passwords and the like in here.
870 (load "~/.emacs.d/.erc-auth")
872 ;; This is an example of how to make a new command.  Type "/uptime" to
873 ;; use it.
874 (defun erc-cmd-UPTIME (&rest ignore)
875   "Display the uptime of the system, as well as some load-related
876 stuff, to the current ERC buffer."
877   (let ((uname-output
878          (replace-regexp-in-string
879           ", load average: " "] @{Load average@} ["
880           ;; Collapse spaces, remove
881           (replace-regexp-in-string
882            " +" " "
883            ;; Remove beginning and trailing whitespace
884            (replace-regexp-in-string
885             "^ +\\|[ \n]+$" ""
886             (shell-command-to-string "uptime"))))))
887     (erc-send-message
888      (concat "@{Uptime@} [" uname-output "]"))))
890 ;; This causes ERC to connect to the Freenode network upon hitting
891 ;; C-c e f.  Replace MYNICK with your IRC nick.
892 (global-set-key "\C-cef" (lambda () (interactive)
893                            (erc :server "irc.freenode.net" :port "6667"
894                                 :nick "MYNICK")))
896 ;; This causes ERC to connect to the IRC server on your own machine (if
897 ;; you have one) upon hitting C-c e b.  Replace MYNICK with your IRC
898 ;; nick.  Often, people like to run bitlbee (http://bitlbee.org/) as an
899 ;; AIM/Jabber/MSN to IRC gateway, so that they can use ERC to chat with
900 ;; people on those networks.
901 (global-set-key "\C-ceb" (lambda () (interactive)
902                            (erc :server "localhost" :port "6667"
903                                 :nick "MYNICK")))
905 ;; Make C-c RET (or C-c C-RET) send messages instead of RET. This has
906 ;; been commented out to avoid confusing new users.
907 ;; (define-key erc-mode-map (kbd "RET") nil)
908 ;; (define-key erc-mode-map (kbd "C-c RET") 'erc-send-current-line)
909 ;; (define-key erc-mode-map (kbd "C-c C-RET") 'erc-send-current-line)
911 ;;; Options
913 ;; Join the #emacs and #erc channels whenever connecting to Freenode.
914 (setq erc-autojoin-channels-alist '(("freenode.net" "#emacs" "#erc")))
916 ;; Interpret mIRC-style color commands in IRC chats
917 (setq erc-interpret-mirc-color t)
919 ;; The following are commented out by default, but users of other
920 ;; non-Emacs IRC clients might find them useful.
921 ;; Kill buffers for channels after /part
922 ;; (setq erc-kill-buffer-on-part t)
923 ;; Kill buffers for private queries after quitting the server
924 ;; (setq erc-kill-queries-on-quit t)
925 ;; Kill buffers for server messages after quitting the server
926 ;; (setq erc-kill-server-buffer-on-quit t)
927 @end lisp
929 @node Options, , Sample Configuration, Advanced Usage
930 @comment  node-name,  next,  previous,  up
931 @section Options
932 @cindex options
934 @c PRE5_4: (Node) Document every ERC option (module options go in
935 @c previous chapter)
937 This section has not yet been written.  For now, the easiest way to
938 check out the available options for ERC is to do
939 @kbd{M-x customize-group erc RET}.
942 @node Getting Help and Reporting Bugs, History, Advanced Usage, Top
943 @comment  node-name,  next,  previous,  up
944 @chapter Getting Help and Reporting Bugs
945 @cindex help, getting
946 @cindex bugs, reporting
948 After you have read this guide, if you still have questions about ERC,
949 or if you have bugs to report, there are several places you can go.
951 @itemize @bullet
953 @item
954 @uref{http://www.emacswiki.org/cgi-bin/wiki/ERC} is the
955 emacswiki.org page for ERC.  Anyone may add tips, hints, or bug
956 descriptions to it.
958 @item
959 There are several mailing lists for ERC.  To subscribe, visit
960 @uref{http://savannah.gnu.org/mail/?group=erc}.
962 The mailing lists are also available on Gmane.
963 (@url{http://gmane.org/}).  Gmane provides additional methods for
964 accessing the mailing lists, adding content to them, and searching them.
966 @enumerate
967 @item gmane.emacs.erc.announce: Announcements
969 @item gmane.emacs.erc.discuss: General discussion
971 @item gmane.emacs.erc.cvs: Log messages for changes to the ERC source code
973 @end enumerate
975 @item
976 You can visit the IRC Freenode channel @samp{#emacs}. Many of the
977 contributors are frequently around and willing to answer your
978 questions.
980 @end itemize
983 @node History, Copying, Getting Help and Reporting Bugs, Top
984 @comment  node-name,  next,  previous,  up
985 @chapter History
986 @cindex history, of ERC
988 ERC was originally written by Alexander L. Belikoff
989 @email{abel@@bfr.co.il} and Sergey Berezin
990 @email{sergey.berezin@@cs.cmu.edu}.  They stopped development around
991 December 1999.  Their last released version was ERC 2.0.
993 P.S.: If one of the original developers of ERC reads this, we'd like to
994 receive additional information for this file and hear comments in
995 general.
997 @itemize
998 @item 2001
1000 In June 2001, Mario Lang @email{mlang@@delysid.org} and Alex Schroeder
1001 @email{alex@@gnu.org} took over development and created a ERC Project at
1002 @uref{http://sourceforge.net/projects/erc}.
1004 In reaction to a mail about the new ERC development effort, Sergey
1005 Berezin said, ``First of all, I'm glad that my version of ERC is being
1006 used out there.  The thing is, I do not have free time and enough
1007 incentive anymore to work on ERC, so I would be happy if you guys take
1008 over the project entirely.''
1010 So we happily hacked away on ERC, and soon after (September 2001)
1011 released the next "stable" version, 2.1.
1013 Most of the development of the new ERC happened on #emacs on
1014 irc.openprojects.net.  Over time, many people contributed code, ideas,
1015 bugfixes, and a lot of alpha/beta/gamma testing.
1017 See the @file{CREDITS} file for a list of contributors.
1019 @item 2003
1021 ERC 3.0 was released.
1023 @item 2004
1025 ERC 4.0 was released.
1027 @item 2005
1029 ERC 5.0 was released.  Michael Olson @email{mwolson@@gnu.org} became
1030 the release manager and eventually the maintainer.
1032 After some discussion between him and the Emacs developers, it was
1033 decided to include ERC in Emacs.
1035 @item 2006
1037 ERC 5.1 was released.  It was subsequently included in Emacs 22.
1039 ERC became an official GNU project, and development moved to
1040 @uref{http://sv.gnu.org/projects/erc}.  We switched to using GNU Arch as
1041 our revision control system.  Our mailing list address changed as well.
1043 @item 2007
1045 We switched to using git for our version control system.
1047 @end itemize
1049 @node Copying, GNU Free Documentation License, History, Top
1050 @comment  node-name,  next,  previous,  up
1051 @include gpl.texi
1053 @node GNU Free Documentation License, Concept Index, Copying, Top
1054 @comment  node-name,  next,  previous,  up
1055 @include doclicense.texi
1057 @node Concept Index,  , GNU Free Documentation License, Top
1058 @comment  node-name,  next,  previous,  up
1059 @unnumbered Index
1061 @printindex cp
1063 @bye