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