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