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