Merge from emacs-23
[bpt/emacs.git] / doc / misc / erc.texi
CommitLineData
4009494e
GM
1\input texinfo
2@c %**start of header
db78a8cb 3@setfilename ../../info/erc
4009494e 4@settitle ERC Manual
4009494e 5@syncodeindex fn cp
5dc584b5 6@c %**end of header
4009494e
GM
7
8@copying
15db4a13 9This manual is for ERC version 5.3.
4009494e 10
5df4f04c 11Copyright @copyright{} 2005, 2006, 2007, 2008, 2009, 2010, 2011
62e034c2 12Free Software Foundation, Inc.
4009494e
GM
13
14@quotation
15Permission is granted to copy, distribute and/or modify this document
6a2c4aec 16under the terms of the GNU Free Documentation License, Version 1.3 or
4009494e 17any later version published by the Free Software Foundation; with no
cd5c05d2
GM
18Invariant Sections, with the Front-Cover texts being ``A GNU Manual,''
19and with the Back-Cover Texts as in (a) below. A copy of the license
20is included in the section entitled ``GNU Free Documentation License''.
21
22(a) The FSF's Back-Cover Text is: ``You have the freedom to copy and
23modify this GNU manual. Buying copies from the FSF supports it in
24developing GNU and promoting software freedom.''
4009494e
GM
25
26All Emacs Lisp code contained in this document may be used, distributed,
27and modified without restriction.
28@end quotation
29@end copying
30
5dc584b5
KB
31@dircategory Emacs
32@direntry
62e034c2 33* ERC: (erc). Powerful and extensible IRC client for Emacs.
5dc584b5
KB
34@end direntry
35
4009494e
GM
36@titlepage
37@title ERC manual
38@subtitle a full-featured IRC client
39@subtitle for GNU Emacs and XEmacs
40
41@c The following two commands
42@c start the copyright page.
43@page
44@vskip 0pt plus 1filll
45@insertcopying
46@end titlepage
47
4009494e
GM
48@contents
49
50@ifnottex
51@node Top, Introduction, (dir), (dir)
52@comment node-name, next, previous, up
53@top ERC
54
55@insertcopying
56@end ifnottex
57
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.
526dc846
MO
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.
15db4a13 73* GNU Free Documentation License:: The license for this documentation.
4009494e
GM
74* Concept Index:: Search for terms.
75
76@detailmenu
77 --- The Detailed Node Listing ---
78
79Obtaining ERC
80
81* Releases:: Released versions of ERC.
82* Development:: Latest unreleased development changes.
83
84Getting Started
85
86* Sample Session:: Example of connecting to the #emacs channel
87* Special Features:: Differences from standalone IRC clients
88
89Advanced Usage
90
91* Connecting:: Ways of connecting to an IRC server.
92* Sample Configuration:: An example configuration file.
93* Options:: Options that are available for ERC.
94
95@end detailmenu
96@end menu
97
98@node Introduction, Obtaining ERC, Top, Top
99@comment node-name, next, previous, up
100@chapter Introduction
101
102ERC is a powerful, modular, and extensible IRC client for Emacs.
103
104It comes with the following capabilities enabled by default.
105
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
119
120@end itemize
121
122@node Obtaining ERC, Installation, Introduction, Top
123@comment node-name, next, previous, up
124@chapter Obtaining ERC
125
126@menu
127* Releases:: Released versions of ERC.
128* Development:: Latest unreleased development changes.
129@end menu
130
131Note that some ERC files are not included with Emacs due to copyright or
132dependency issues. If desired, they may be found at the following
133locations, or from your local GNU mirror.
134
135@itemize @bullet
15db4a13
MO
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}
4009494e
GM
138@end itemize
139
140The rest of this chapter may be skipped if you are using the version of
141ERC that comes with Emacs.
142
143@node Releases, Development, Obtaining ERC, Obtaining ERC
144@comment node-name, next, previous, up
145@section Releases
146
147Choose to install a release if you want to minimize risk.
148
149Errors are corrected in development first. User-visible changes will be
150announced on the @email{erc-discuss@@gnu.org} mailing list.
151@pxref{Getting Help and Reporting Bugs}.
152
153@cindex releases, Debian package
154@cindex Debian package for ERC
155Debian users can get ERC via apt-get. The @file{erc} package is
156available in the official Debian repository.
157
158@cindex releases, from source
159Alternatively, you can download the latest release from
160@uref{http://ftp.gnu.org/gnu/erc}, or your local GNU mirror.
161
162@node Development, , Releases, Obtaining ERC
163@comment node-name, next, previous, up
164@section Development
165@cindex development
166
167Choose the development version if you want to live on the bleeding edge
168of ERC development or try out new features before release.
169
15db4a13
MO
170@cindex git version control system, using
171The git version control system allows you to keep up-to-date with the
172latest changes to the development version of ERC. It also allows you
173to contribute changes (via commits, if you are have developer access to
174the repository, or via patches, otherwise). If you would like to
175contribute to ERC development, it is highly recommended that you use
176git.
4009494e 177
15db4a13 178If you are new to git, you might find this tutorial helpful:
c6d47315 179@uref{http://www.kernel.org/pub/software/scm/git/docs/gittutorial.html}.
15db4a13
MO
180
181Downloading ERC with git and staying up-to-date involves the following
182steps.
4009494e
GM
183
184@enumerate
15db4a13 185@item Install git.
4009494e
GM
186
187@itemize @bullet
15db4a13
MO
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
191from @uref{http://www.kernel.org/pub/software/scm/git/}, or find a git
192package for your operating system.
4009494e
GM
193@end itemize
194
15db4a13
MO
195@item Download the ERC development branch.
196
197If you have developer access to ERC, do:
198
199@example
200git clone ssh://loginname@@git.sv.gnu.org/srv/git/erc.git
201@end example
202
203otherwise, do:
204
4009494e 205@example
15db4a13 206git clone git://git.sv.gnu.org/erc.git
4009494e
GM
207@end example
208
15db4a13
MO
209If you are behind a restrictive firewall, and do not have developer
210access, then do the following instead:
211
4009494e 212@example
15db4a13 213git clone http://git.sv.gnu.org/r/erc.git
4009494e
GM
214@end example
215
216@item List upstream changes that are missing from your local copy.
217Do this whenever you want to see whether new changes have been committed
15db4a13
MO
218to ERC. If you wish, you may skip this step and proceed directly to
219the ``update'' step.
4009494e
GM
220
221@example
222# Change to the source directory you are interested in.
15db4a13
MO
223cd erc
224
225# Fetch new changes from the repository, but don't apply them yet
226git fetch origin
4009494e 227
15db4a13
MO
228# Display log messages for the new changes
229git log HEAD..origin
4009494e
GM
230@end example
231
15db4a13
MO
232``origin'' is git's name for the location where you originally got ERC
233from. You can change this location at any time by editing the
234@file{.git/config} file in the directory where the ERC source was
235placed.
236
237@cindex updating ERC with git
238@item Update to the latest version by pulling in any missing changes.
239
4009494e
GM
240@example
241cd erc
15db4a13 242git pull origin
4009494e
GM
243@end example
244
15db4a13
MO
245git will show how many files changed, and will provide a visual display
246for how many lines were changed in each file.
247
4009494e
GM
248@end enumerate
249
15db4a13 250There are other ways to interact with the ERC repository.
4009494e 251
15db4a13
MO
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
4009494e 257
15db4a13
MO
258The latest development snapshot can lag behind the git repo by as much
259as 20 minutes, but never more than that.
4009494e 260
15db4a13
MO
261For further information on committing changes to ERC and performing
262development, please consult
263@uref{http://emacswiki.org/cgi-bin/wiki/ErcDevelopment}.
4009494e
GM
264
265
266@node Installation, Getting Started, Obtaining ERC, Top
267@comment node-name, next, previous, up
268@chapter Installation
269
270ERC may be compiled and installed on your machine.
271
272This section may be skipped if you are using the version of ERC that
273comes with Emacs.
274
275@subsubheading Compilation
276
277This is an optional step, since Emacs Lisp source code does not
278necessarily have to be byte-compiled. It will yield a speed increase,
279though.
280
281A working copy of Emacs or XEmacs is needed in order to compile ERC. By
282default, the program that is installed with the name @command{emacs}
283will be used.
284
285If you want to use the @command{xemacs} binary to perform the
286compilation, you would need to edit @file{Makefile} in the top-level
287directory as follows. You can put either a full path to an Emacs or
288XEmacs binary or just the command name, as long as it is in the
289@env{PATH}.
290
291@example
292EMACS = xemacs
293SITEFLAG = -no-site-file
294@end example
295
296Running @code{make} should compile the ERC source files in the
297@file{lisp} directory.
298
299@subsubheading Installation
300
301ERC may be installed into your file hierarchy by doing the following.
302
303Edit the @file{Makefile} file so that @env{ELISPDIR} points to where you
304want the source and compiled ERC files to be installed and
305@env{INFODIR} indicates where to put the ERC manual. Of course, you
306will want to edit @env{EMACS} and @env{SITEFLAG} as shown in the
307Compilation section if you are using XEmacs.
308
309If you are installing ERC on a Debian system, you might want to change
310the value of @env{INSTALLINFO} as specified in @file{Makefile}.
311
312Run @code{make} as a normal user.
313
314Run @code{make install} as the root user if you have chosen installation
315locations that require this.
316
317
318@node Getting Started, Keystroke Summary, Installation, Top
319@comment node-name, next, previous, up
320@chapter Getting Started
321@cindex settings
322
323To use ERC, add the directory containing its files to your
324@code{load-path} variable, in your @file{.emacs} file. Then, load ERC
325itself. An example follows.
326
327@lisp
328(require 'erc)
329@end lisp
330
331Once ERC is loaded, the command @kbd{M-x erc} will start ERC and
332prompt for the server to connect to.
333
334If you want to place ERC settings in their own file, you can place them
335in @file{~/.emacs.d/.ercrc.el}, creating it if necessary.
336
337If you would rather use the Customize interface to change how ERC works,
338do @kbd{M-x customize-group RET erc RET}. In particular, ERC comes with
339lots of modules that may be enabled or disabled; to select which ones
340you want, do @kbd{M-x customize-variable RET erc-modules RET}.
341
342@menu
343* Sample Session:: Example of connecting to the #emacs channel
344* Special Features:: Differences from standalone IRC clients
345@end menu
346
347@node Sample Session, Special Features, Getting Started, Getting Started
348@comment node-name, next, previous, up
349@section Sample Session
350
351This is an example ERC session which shows how to connect to the #emacs
352channel on Freenode. Another IRC channel on Freenode that may be of
353interest is #erc, which is a channel where ERC users and developers hang
354out.
355
356@itemize @bullet
357
358@item Connect to Freenode
359
360Run @kbd{M-x erc}. Use ``irc.freenode.net'' as the IRC server, ``6667''
361as the port, and choose a nickname.
362
363@item Get used to the interface
364
365Switch to the ``irc.freenode.net:6667'' buffer, if you're not already
366there. You will see first some messages about checking for ident, and
367then a bunch of other messages that describe the current IRC server.
368
369@item Join the #emacs channel
370
371In that buffer, type ``/join SPC #emacs'' and hit @kbd{RET}. Depending
372on how you've set up ERC, either a new buffer for ``#emacs'' will be
373displayed, or a new buffer called ``#emacs'' will be created in the
374background. If the latter, switch to the ``#emacs'' buffer. You will
375see the channel topic and a list of the people who are currently on the
376channel.
377
378@item Register your nickname with Freenode
379
380If you would like to be able to talk with people privately on the
381Freenode network, you will have to ``register'' your nickname. To do
382so, switch to the ``irc.freenode.net:6667'' buffer and type ``/msg
383NickServ register <password>'', replacing ``<password>'' with your
384desired password. It should tell you that the operation was successful.
385
386@item Talk to people in the channel
387
388If you switch back to the ``#emacs'' buffer, you can type a message, and
389everyone on the channel will see it.
390
391@item Open a query buffer to talk to someone
392
393If you want to talk with someone in private (this should usually not be
394done for technical help, only for personal questions), type ``/query
395<nick>'', replacing ``<nick>'' with the nickname of the person you would
396like to talk to. Depending on how ERC is set up, you will either see a
397new buffer with the name of the person, or such a buffer will be created
398in the background and you will have to switch to it. Begin typing
399messages, and you will be able to have a conversation.
400
401Note that if the other person is not registered, you will not be able to
402talk with them.
403
404@end itemize
405
406@node Special Features, , Sample Session, Getting Started
407@comment node-name, next, previous, up
408@section Special Features
409
410ERC has some features that distinguish it from some IRC clients.
411
412@itemize @bullet
413
414@item multiple channels and multiple servers
415
416Every channel is put in a separate buffer. Several IRC servers may be
417connected to at the same time.
418
419@cindex query buffers
420@item private message separation
421
422Private conversations are treated as channels, and are put into separate
423buffers in Emacs. We call these ``query buffers''.
424
425@item highlighting
426
d20cf916 427Some occurrences of words can be highlighted, which makes it easier to
4009494e
GM
428track different kinds of conversations.
429
430@item notification
431
432ERC can notify you that certain users are online.
433
434@item channel tracking
435
436Channels can be hidden and conversation continue in the background. You
437are notified when something is said in such a channel that is not
438currently visible. This makes it easy to get Real Work done while still
439maintaining an IRC presence.
440
441@item nick completion
442
443ERC can complete words upon hitting @kbd{TAB}, which eases the writing
444of nicknames in messages.
445
446@cindex history ring
447@item history
448
449Past actions are kept in history rings for future use. To navigate a
450history ring, hit @kbd{M-p} to go backwards and @kbd{M-n} to go
451forwards.
452
453@item multiple languages
454
455Different channels and servers may have different language encodings.
456
457In addition, it is possible to translate the messages that ERC uses into
458multiple languages. Please contact the developers of ERC at
459@email{erc-discuss@@gnu.org} if you are interested in helping with the
460translation effort.
461
462@item user scripting
463
464Users can load scripts (e.g. auto greeting scripts) when ERC starts up.
465
466It is also possible to make custom IRC commands, if you know a little
467Emacs Lisp. Just make an Emacs Lisp function and call it
468@code{erc-cmd-NEWCOMMAND}, where @code{NEWCOMMAND} is the name of the
469new command in capital letters.
470
471@item auto reconnect
472
473If the connection goes away at some point, ERC will try to reconnect
474automatically. If it fails to reconnect, and you want to try to
475manually reestablish the connection at some later point, switch to an
476ERC buffer and run the @code{/RECONNECT} command.
477
478@end itemize
479
480
481@node Keystroke Summary, Modules, Getting Started, Top
482@comment node-name, next, previous, up
483@chapter Keys Used in ERC
484@cindex keystrokes
485
486This is a summary of keystrokes available in every ERC buffer.
487
488@table @kbd
489
490@item C-a or <home> (`erc-bol')
491Go to beginning of line or end of prompt.
492
493@item RET (`erc-send-current-line')
494Send the current line
495
496@item TAB (`erc-complete-word')
497If at prompt, complete the current word.
498Otherwise, move to the next link or button.
499
500@item M-TAB (`ispell-complete-word')
501Complete the given word, using ispell.
502
503@item C-c C-a (`erc-bol')
504Go to beginning of line or end of prompt.
505
506@item C-c C-b (`erc-iswitchb')
507Use `iswitchb-read-buffer' to prompt for a ERC buffer to switch to.
508
509@item C-c C-c (`erc-toggle-interpret-controls')
510Toggle interpretation of control sequences in messages.
511
512@item C-c C-d (`erc-input-action')
513Interactively input a user action and send it to IRC.
514
515@item C-c C-e (`erc-toggle-ctcp-autoresponse')
516Toggle automatic CTCP replies (like VERSION and PING).
517
518@item C-c C-f (`erc-toggle-flood-control')
519Toggle use of flood control on sent messages.
520
521@item C-c TAB (`erc-invite-only-mode')
522Turn on the invite only mode (+i) for the current channel.
523
524@item C-c C-j (`erc-join-channel')
525Join channel. If point is at the beginning of a channel name, use that
526as default.
527
528@item C-c C-k (`erc-go-to-log-matches-buffer')
529Interactively open an erc-log-matches buffer
530
531@item C-c C-l (`erc-save-buffer-in-logs')
532Append buffer contents to the log file, if logging is enabled.
533
534@item C-c C-n (`erc-channel-names')
535Run "/names #channel" in the current channel.
536
537@item C-c C-o (`erc-get-channel-mode-from-keypress')
538Read a key sequence and call the corresponding channel mode function.
539After doing @kbd{C-c C-o}, type in a channel mode letter.
540
541@kbd{C-g} means quit.
542@kbd{RET} lets you type more than one mode at a time.
543If @kbd{l} is pressed, @code{erc-set-channel-limit} gets called.
544If @kbd{k} is pressed, @code{erc-set-channel-key} gets called.
545Anything else will be sent to `erc-toggle-channel-mode'.
546
547@item C-c C-p (`erc-part-from-channel')
548Part from the current channel and prompt for a reason.
549
550@item C-c C-q (`erc-quit-server')
551Disconnect from current server after prompting for reason.
552
553@item C-c C-r (`erc-remove-text-properties-region')
554Clears the region (start,end) in object from all colors, etc.
555
556@item C-c C-t (`erc-set-topic')
557Prompt for a topic for the current channel.
558
559@item C-c C-u (`erc-kill-input')
560Kill current input line using `erc-bol' followed by `kill-line'.
561
562@end table
563
564
565@node Modules, Advanced Usage, Keystroke Summary, Top
566@comment node-name, next, previous, up
567@chapter Modules
568@cindex modules
569
570One way to add functionality to ERC is to customize which of its many
571modules are loaded.
572
573There 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}.
576
577The following is a list of available modules.
578
579@table @code
580
581@cindex modules, autoaway
582@item autoaway
583Set away status automatically
584
585@cindex modules, autojoin
586@item autojoin
587Join channels automatically
588
589@cindex modules, bbdb
590@item bbdb
591Integrate with the Big Brother Database
592
593@cindex modules, button
594@item button
595Buttonize URLs, nicknames, and other text
596
597@cindex modules, capab-identify
598@item capab-identify
599Mark unidentified users on freenode and other servers supporting CAPAB.
600
601@cindex modules, completion
602@cindex modules, pcomplete
603@item completion (aka pcomplete)
604Complete nicknames and commands (programmable)
605
606@cindex modules, fill
607@item fill
608Wrap long lines
609
610@cindex modules, hecomplete
611@item hecomplete
612Complete nicknames and commands (old). This is the old module---you
613might prefer the ``completion'' module instead.
614
615@cindex modules, identd
616@item identd
617Launch an identd server on port 8113
618
619@cindex modules, irccontrols
620@item irccontrols
621Highlight or remove IRC control characters
622
623@cindex modules, log
624@item log
625Save buffers in logs
626
627@cindex modules, match
628@item match
629Highlight pals, fools, and other keywords
630
631@cindex modules, menu
632@item menu
633Display a menu in ERC buffers
634
635@cindex modules, netsplit
636@item netsplit
637Detect netsplits
638
639@cindex modules, noncommands
640@item noncommands
641Don't display non-IRC commands after evaluation
642
643@cindex modules, notify
644@item notify
645Notify when the online status of certain users changes
646
647@cindex modules, page
648@item page
649Process CTCP PAGE requests from IRC
650
651@cindex modules, readonly
652@item readonly
653Make displayed lines read-only
654
655@cindex modules, replace
656@item replace
657Replace text in messages
658
659@cindex modules, ring
660@item ring
661Enable an input history
662
663@cindex modules, scrolltobottom
664@item scrolltobottom
665Scroll to the bottom of the buffer
666
667@cindex modules, services
668@item services
669Identify to Nickserv (IRC Services) automatically
670
671@cindex modules, smiley
672@item smiley
673Convert smileys to pretty icons
674
675@cindex modules, sound
676@item sound
677Play sounds when you receive CTCP SOUND requests
678
679@cindex modules, spelling
680@item spelling
681Check spelling of messages
682
683@cindex modules, stamp
684@item stamp
685Add timestamps to messages
686
687@cindex modules, track
688@item track
689Track channel activity in the mode-line
690
691@cindex modules, truncate
692@item truncate
693Truncate buffers to a certain size
694
695@cindex modules, unmorse
696@item unmorse
697Translate morse code in messages
698
699@end table
700
a83df153 701@c PRE5_4: Document every option of every module in its own subnode
4009494e
GM
702
703
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
708
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
714
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
719
720The easiest way to connect to an IRC server is to call @kbd{M-x erc}.
721If you want to assign this function to a keystroke, the following will
722help you figure out its parameters.
723
724@defun erc
725Select connection parameters and run ERC.
726Non-interactively, it takes the following keyword arguments.
727
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
735
736That 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
740parameters.
741
742@example
743(erc :server "irc.freenode.net" :full-name "Harry S Truman")
744@end example
745@end defun
746
747@subheading Server
748
749@defun erc-compute-server &optional server
750Return an IRC server name.
751
752This tries a number of increasingly more default methods until a non-nil
753value is found.
754
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
761
762@end defun
763
764@defopt erc-server nil
765IRC server to use if one is not provided.
766@end defopt
767
768@subheading Port
769
770@defun erc-compute-port &optional port
771Return a port for an IRC server.
772
773This tries a number of increasingly more default methods until a non-nil
774value is found.
775
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
781
782@end defun
783
784@defopt erc-port
785IRC port to use if not specified.
786
787This can be either a string or a number.
788@end defopt
789
790@subheading Nick
791
792@defun erc-compute-nick &optional nick
793Return user's IRC nick.
794
795This tries a number of increasingly more default methods until a
796non-nil value is found.
797
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
804
805@end defun
806
807@defopt erc-nick
808Nickname to use if one is not provided.
809
810This can be either a string, or a list of strings.
811In the latter case, if the first nick in the list is already in use,
812other nicks are tried in the list order.
813@end defopt
814
815@defopt erc-nick-uniquifier
816The string to append to the nick if it is already in use.
817@end defopt
818
819@defopt erc-try-new-nick-p
820If the nickname you chose isn't available, and this option is non-nil,
821ERC should automatically attempt to connect with another nickname.
822
823You can manually set another nickname with the /NICK command.
824@end defopt
825
826@subheading Full name
827
828@defun erc-compute-full-name &optional full-name
829Return user's full name.
830
831This tries a number of increasingly more default methods until a
832non-nil value is found.
833
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
840
841@end defun
842
843@defopt erc-user-full-name
844User full name.
845
846This can be either a string or a function to call.
847@end defopt
848
849@node Sample Configuration, Options, Connecting, Advanced Usage
850@comment node-name, next, previous, up
851@section Sample Configuration
852@cindex configuration, sample
853
854Here is an example of configuration settings for ERC. This can go into
855your Emacs configuration file. Everything after the @code{(require
856'erc)} command can optionally go into @file{~/.emacs.d/.ercrc.el}.
857
858@lisp
859;;; Sample ERC configuration
860
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")
864
865;; Load ERC
866(require 'erc)
867
868;; Load authentication info from an external source. Put sensitive
869;; passwords and the like in here.
870(load "~/.emacs.d/.erc-auth")
871
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
876stuff, 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 "]"))))
889
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")))
895
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")))
904
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)
910
911;;; Options
912
913;; Join the #emacs and #erc channels whenever connecting to Freenode.
914(setq erc-autojoin-channels-alist '(("freenode.net" "#emacs" "#erc")))
915
916;; Interpret mIRC-style color commands in IRC chats
917(setq erc-interpret-mirc-color t)
918
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
928
929@node Options, , Sample Configuration, Advanced Usage
930@comment node-name, next, previous, up
931@section Options
932@cindex options
933
a83df153 934@c PRE5_4: (Node) Document every ERC option (module options go in
4009494e
GM
935@c previous chapter)
936
937This section has not yet been written. For now, the easiest way to
526dc846 938check out the available options for ERC is to do
4009494e
GM
939@kbd{M-x customize-group erc RET}.
940
941
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
947
948After you have read this guide, if you still have questions about ERC,
949or if you have bugs to report, there are several places you can go.
950
951@itemize @bullet
952
953@item
526dc846 954@uref{http://www.emacswiki.org/cgi-bin/wiki/ERC} is the
4009494e
GM
955emacswiki.org page for ERC. Anyone may add tips, hints, or bug
956descriptions to it.
957
958@item
959There are several mailing lists for ERC. To subscribe, visit
960@uref{http://savannah.gnu.org/mail/?group=erc}.
961
962The mailing lists are also available on Gmane.
963(@url{http://gmane.org/}). Gmane provides additional methods for
964accessing the mailing lists, adding content to them, and searching them.
965
966@enumerate
526dc846 967@item gmane.emacs.erc.announce: Announcements
4009494e 968
526dc846 969@item gmane.emacs.erc.discuss: General discussion
4009494e 970
526dc846 971@item gmane.emacs.erc.cvs: Log messages for changes to the ERC source code
4009494e
GM
972
973@end enumerate
974
975@item
976You can visit the IRC Freenode channel @samp{#emacs}. Many of the
977contributors are frequently around and willing to answer your
978questions.
979
980@end itemize
981
982
526dc846 983@node History, Copying, Getting Help and Reporting Bugs, Top
4009494e
GM
984@comment node-name, next, previous, up
985@chapter History
986@cindex history, of ERC
987
988ERC 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
991December 1999. Their last released version was ERC 2.0.
992
993P.S.: If one of the original developers of ERC reads this, we'd like to
994receive additional information for this file and hear comments in
995general.
996
997@itemize
998@item 2001
999
1000In 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}.
1003
1004In reaction to a mail about the new ERC development effort, Sergey
1005Berezin said, ``First of all, I'm glad that my version of ERC is being
1006used out there. The thing is, I do not have free time and enough
1007incentive anymore to work on ERC, so I would be happy if you guys take
1008over the project entirely.''
1009
1010So we happily hacked away on ERC, and soon after (September 2001)
1011released the next "stable" version, 2.1.
1012
1013Most of the development of the new ERC happened on #emacs on
1014irc.openprojects.net. Over time, many people contributed code, ideas,
1015bugfixes, and a lot of alpha/beta/gamma testing.
1016
1017See the @file{CREDITS} file for a list of contributors.
1018
1019@item 2003
1020
1021ERC 3.0 was released.
1022
1023@item 2004
1024
1025ERC 4.0 was released.
1026
1027@item 2005
1028
1029ERC 5.0 was released. Michael Olson @email{mwolson@@gnu.org} became
1030the release manager and eventually the maintainer.
1031
1032After some discussion between him and the Emacs developers, it was
1033decided to include ERC in Emacs.
1034
1035@item 2006
1036
1037ERC 5.1 was released. It was subsequently included in Emacs 22.
1038
1039ERC became an official GNU project, and development moved to
1040@uref{http://sv.gnu.org/projects/erc}. We switched to using GNU Arch as
1041our revision control system. Our mailing list address changed as well.
1042
15db4a13
MO
1043@item 2007
1044
1045We switched to using git for our version control system.
1046
4009494e
GM
1047@end itemize
1048
526dc846
MO
1049@node Copying, GNU Free Documentation License, History, Top
1050@comment node-name, next, previous, up
1051@include gpl.texi
1052
1053@node GNU Free Documentation License, Concept Index, Copying, Top
1054@comment node-name, next, previous, up
4009494e
GM
1055@include doclicense.texi
1056
1057@node Concept Index, , GNU Free Documentation License, Top
1058@comment node-name, next, previous, up
1059@unnumbered Index
1060
1061@printindex cp
1062
1063@bye
1064
1065@ignore
1066 arch-tag: cf9cfaff-fc12-4297-ad15-ec2493002b1e
1067@end ignore