aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEli Zaretskii2006-01-27 18:43:16 +0000
committerEli Zaretskii2006-01-27 18:43:16 +0000
commit97ed0ac33e56158d8da7e7037119fccb0a8ffe3e (patch)
tree7372699e2f91f5d1225db977f67d57e5d421b1cd
parentaf9328f9e9372b8ab667477406930d7a82476689 (diff)
downloademacs-97ed0ac33e56158d8da7e7037119fccb0a8ffe3e.tar.gz
emacs-97ed0ac33e56158d8da7e7037119fccb0a8ffe3e.zip
New file.
-rw-r--r--man/rcirc.texi662
1 files changed, 662 insertions, 0 deletions
diff --git a/man/rcirc.texi b/man/rcirc.texi
new file mode 100644
index 00000000000..cf02a477ab1
--- /dev/null
+++ b/man/rcirc.texi
@@ -0,0 +1,662 @@
1\input texinfo
2@c %**start of header
3@setfilename ../info/rcirc
4@settitle rcirc Manual
5@c %**end of header
6
7@copying
8Copyright (C) 2006 Free Software Foundation, Inc.
9
10@quotation
11Permission is granted to copy, distribute and/or modify this document
12under the terms of the GNU Free Documentation License, Version 1.2 or
13any later version published by the Free Software Foundation; with no
14Invariant Sections, with the Front-Cover texts being ``A GNU Manual'',
15and with the Back-Cover Texts as in (a) below. A copy of the license is
16included in the section entitled ``GNU Free Documentation License'' in
17the Emacs manual.
18
19(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
20this GNU Manual, like GNU software. Copies published by the Free
21Software Foundation raise funds for GNU development.''
22
23This document is part of a collection distributed under the GNU Free
24Documentation License. If you want to distribute this document
25separately from the collection, you can do so by adding a copy of the
26license to the document, as described in section 6 of the license.
27@end quotation
28@end copying
29
30@dircategory Emacs
31@direntry
32* rcirc: (rcirc). Internet Relay Chat (IRC) client.
33@end direntry
34
35@titlepage
36@title rcirc Manual
37@page
38@vskip 0pt plus 1filll
39@insertcopying
40@end titlepage
41
42@ifnottex
43@node Top, Basics, (dir), (dir)
44@top rcirc Manual
45@end ifnottex
46
47@code{rcirc} is an Emacs IRC client.
48
49IRC (Internet Relay Chat) is a multi-user chat protocol. Users
50communicate with each other in real-time. Communication occurs both in
51topic channels which are collections of many users, or privately, with
52just one other user.
53
54@menu
55* Basics::
56* Reference::
57* Hacking and Tweaking::
58* Key Index::
59* Variable Index::
60* Index::
61
62@detailmenu
63 --- The Detailed Node Listing ---
64
65Basics
66
67* Internet Relay Chat::
68* Getting started with rcirc::
69
70Reference
71
72* rcirc commands::
73* Useful IRC commands::
74* Configuration::
75
76Hacking and Tweaking
77
78* Skipping /away messages using handlers::
79* Using fly spell mode::
80* Scrolling conservatively::
81* Changing the time stamp format::
82* Defining a new command::
83* Reconnecting after you have lost the connection::
84
85@end detailmenu
86@end menu
87
88@node Basics, Reference, Top, Top
89@chapter Basics
90@cindex basic usage
91
92This chapter contains a brief introduction to IRC (Internet Relay Chat),
93and a quick tutorial on @code{rcirc}.
94
95@menu
96* Internet Relay Chat::
97* Getting started with rcirc::
98@end menu
99
100@node Internet Relay Chat, Getting started with rcirc, Basics, Basics
101@section Internet Relay Chat
102@cindex internet relay chat
103@cindex irc
104
105@cindex channel
106@dfn{Internet Relay Chat} (IRC) is a form of instant communication over the
107Internet. It is mainly designed for group (many-to-many) communication
108in discussion forums called channels, but also allows one-to-one
109communication.
110
111@cindex instant messaging, comparison
112@cindex server
113@cindex network
114Contrary to most Instant Messenger (IM) systems, users usually don't
115connect to a central server. Instead, users connect to a random server
116in a network, and the servers share information between them.
117
118Here's a typical example:
119
120@cindex redirection to random servers
121When you connect to the Freenode network
122(@indicateurl{http://freenode.net/}), you point your IRC client at the
123server @code{irc.freenode.net}. That server will redirect your client
124to a random server on the network, such as @code{zelazny.freenode.net}.
125
126@cindex channel names
127@cindex # starts a channel name
128Once you're connected, you can send messages to all other users
129connected to the same network, and you can join all channels on the same
130network. You might join the @code{#emacs} and the @code{#rcirc}
131channels, for example. (Typically, channel names begin with a hash
132character.)
133
134Once you have joined a channel, anything you type will be broadcast to
135all the other users on the same channel.
136
137@cindex addressing other people
138@cindex other people, addressing them
139@cindex talk to other people
140If you want to address someone specifically, for example as an answer
141to a question, it is custom to prefix the message with the nick
142followed by a colon, like this:
143
144@example
145deego: fsbot rules!
146@end example
147
148@cindex nick completion
149@cindex completion of nicks
150@kindex TAB
151Since this is so common, you can use @key{TAB} to do nick completion.
152
153@node Getting started with rcirc, , Internet Relay Chat, Basics
154@section Getting started with rcirc
155@cindex getting started
156@cindex connecting to a server
157
158@cindex irc command
159Use the command @kbd{M-x irc} to connect to a server. You will be asked
160for four things:
161
162@table @asis
163@cindex server, connecting
164@cindex Freenode network
165@item IRC server
166What server do you want to connect to? All the servers in a particular
167network are equivalent. Some networks use a round-robin system where a
168single server redirects new connections to a random server in the
169network. @code{irc.freenode.net} is such a server for the Freenode
170network. Freenode provides the network ``for the Free and Open Source
171Software communities, for not-for-profit organisations and for related
172communities and organizations.''
173
174@cindex port, connecting
175@cindex 6667, default IRC port
176@item IRC port
177All network connections require a port. Just as web servers and clients
178use port 80 per default, IRC uses port 6667 per default. You rarely
179have to use a different port.
180
181@cindex nick, connecting
182@cindex changing nick
183@cindex name changes
184@item IRC nick
185@vindex user-login-name
186Every users needs a handle on-line. You will automatically be assigned
187a slightly different nick if your chosen nick is already in use. If
188your @code{user-login-name} is @code{"alex"}, and this nick is already
189in use, you might for example get assigned the nick @code{alex`}.
190
191@cindex channels, connecting
192@cindex initial channels
193@cindex startup channels
194@item Channels
195A space separated list of channels you want to join when connecting.
196You don't need to join any channels, if you just want to have one-to-one
197conversations with friends on the same network. If you're new to the
198Freenode network, join @code{#emacs}, the about all things Emacs.
199@end table
200
201@cindex server buffer
202When you have answered these questions, @code{rcirc} will create a server
203buffer, which will be named something like @code{*irc.freenode.net*},
204and a channel buffer for each of the channels you wanted to join.
205
206@kindex RET
207@cindex talking
208@cindex communicating
209To talk in a channel, just type in what you want to say in a channel
210buffer, and press @kbd{RET}.
211
212@kindex C-c C-c
213@cindex multiline messages
214@cindex messages, multiple lines
215@cindex pasting multiple lines
216@cindex edit message before sending
217If you want to paste multiple lines, such as source code, you can use
218@kbd{C-c C-c} to edit your message in a separate buffer. Use @kbd{C-c
219C-c} to finish editing. You still need to press @kbd{RET} to send it,
220though. Generally, IRC users don't like people pasting more than around
221four lines of code, so use with care.
222
223@kindex C-c C-SPC
224@cindex switching channels
225@cindex tracking activity
226@cindex active channel
227@cindex abbreviated channel names
228@cindex modeline tracks activity
229You will note that when other people say things in buffers that are
230currently buried (no window is showing them), the mode line will show
231you the abbreviated channel or nick name. Use @kbd{C-c C-SPC} to switch
232to these buffers.
233
234@node Reference, Hacking and Tweaking, Basics, Top
235@chapter Reference
236@cindex reference
237
238This is the reference section of the manual. It is not complete. For
239complete listings of @code{rcirc} features, use Emacs built-in
240documentation.
241
242@menu
243* rcirc commands::
244* Useful IRC commands::
245* Configuration::
246@end menu
247
248@node rcirc commands, Useful IRC commands, Reference, Reference
249@section rcirc commands
250@cindex commands
251
252@kindex C-h m
253This is a list of commands that you may use in @code{rcirc}. It is not
254complete. For a complete listing, press @kbd{C-h m} in an @code{rcirc}
255buffer.
256
257In addition to using regular Emacs key bindings, you can call them by
258typing them into an @code{rcirc} buffer.
259
260@cindex call commands
261@cindex typing commands
262@cindex commands
263For instance, instead of using the command @kbd{C-c C-j} to join a new
264channel, you may type this in an @code{rcirc} buffer, and press @kbd{RET}:
265
266@example
267/join #emacs
268@end example
269
270@cindex / starts a command
271@cindex messages starting with a slash disappear
272@cindex disappearing messages if starting with a slash
273@cindex slash hides message
274This is why you cannot start a message with a slash. You will have to
275precede the command with a space, or rewrite your message in order to
276send it to a channel.
277
278@cindex multiple words as parameters
279@cindex string delimiters
280@cindex quotes
281@cindex double-quotes
282Many commands take parameters. IRC commands usually ignore string
283delimiters. Neither quote nor double-quote have special meanings in
284IRC.
285
286@example
287/nick "alex schroeder"
288@end example
289
290This will try to change your nick to @code{"alex}. Usually this will
291fail because the double quote character is not a legal character for
292nicks.
293
294@cindex case insensitive commands
295These commands are case insensitive.
296
297@cindex new command
298@cindex unknown command
299@cindex command unknown
300If a command isn't known by @code{rcirc}, it will simply be sent along to the
301server. There is a list of some useful commands like that in the next
302section.
303
304@table @kbd
305@item C-c C-j
306@kindex C-c C-j
307@cindex /join
308@cindex join channels
309@cindex other channels
310@cindex rooms, joining
311@cindex discussion, joining
312This joins a channel such as @code{#rcirc} or @code{#emacs}. On most
313networks, anybody can create new channels. If you want to talk with
314some friends, for example, all you have to do is agree on a valid
315channel name and join that channel. (Also @code{/join #emacs}.)
316
317@item C-c C-p
318@kindex C-c C-p
319@cindex /part
320@cindex part a channel
321@cindex leave a channel
322@cindex disconnect from a channel
323@cindex stop talking on a channel
324@cindex kill channel buffer
325This leaves the current channel. You can optionally provide a reason
326for parting. When you kill a channel buffer, you automatically part the
327corresponding channel. (Also @code{/part you are too weird!}.)
328
329@item C-c C-r
330@kindex C-c C-r
331@cindex /nick
332@cindex change name
333@cindex nick changing
334@cindex rename yourself
335@cindex other name
336This changes your nick to some other name. Your nick must be unique
337across the network. Most networks don't allow too many nick changes in
338quick succession, and have restrictions on the valid characters in nick
339names. (Also @code{/nick alex-test})
340
341@item C-c C-w
342@kindex C-c C-w
343@cindex /whois
344@cindex who are these people
345@cindex identifying people
346@cindex channels other people are on
347@cindex what channels people are on
348Gives you some basic information about a nick. This often includes what
349other channels people are on. (Also @code{/whois fsbot}.)
350
351@item C-c C-q
352@kindex C-c C-q
353@cindex /query
354@cindex starting a private conversation
355@cindex one-to-one conversation
356@cindex talk privately
357@cindex private conversation
358@cindex contact one person only
359@cindex query a person
360Starts a one-to-one conversation with another person on the same
361network. A new buffer will be created for this conversation. It works
362like a channel with only two members. (Also @code{/query fsbot}.)
363
364@item C-c RET
365@kindex C-c RET
366@cindex /msg
367@cindex single message
368@cindex message sending
369This sends a single message to a nick. Like with @kbd{C-c C-q}, a new
370buffer is created, where the response from the other party will show
371up. (Also @code{/msg nickserv identify secret}.)
372
373@item C-c C-x
374@kindex C-c C-x
375@cindex /quit
376@cindex quit
377@cindex disconnect
378@cindex kill connection
379@cindex connection end
380@cindex part all channels
381@cindex end connection
382@cindex server buffer killing
383@cindex reason for quitting
384This disconnects from the server and parts all channels. You can
385optionally provide a reason for quitting. When you kill the server
386buffer, you automatically quit the server and part all channels. (Also
387@code{/quit ZZZzzz...}.)
388@end table
389
390Some commands may not have a key binding, but only be available as typed
391commands, such as:
392
393@table @code
394@item /ignore
395@cindex /ignore
396@cindex ignoring other people
397@cindex trolls, ignoring
398@cindex hide some posts
399@cindex idiots online
400This command toggles the ignore status of a nick, if you provide one.
401If you don't provide a nick, the command lists all the nicks you are
402ignoring. All messages by ignored nicks are -- you guessed it --
403ignored. Since only ``operators'' can kick people from channels, the
404ignore command is often the only way to deal with some of the more
405obnoxious fellows online. Example: @code{/ignore xah}.
406@end table
407
408@node Useful IRC commands, Configuration, rcirc commands, Reference
409@section Useful IRC commands
410@cindex irc commands
411@cindex commands
412
413As mentioned, if a command isn't known by @code{rcirc}, it will simply be sent
414along to the server. Some such commands are available on nearly all IRC
415servers, such as:
416
417@table @code
418@item /away
419@cindex /away
420@cindex away status
421@cindex pause status
422@cindex unavailable status
423@cindex set away status
424This sets your status as ``being away'' if you provide a reason, or sets
425your status as ``being back'' if you do not. People can use the
426@kbd{C-c C-w} command to check your status. Example: @code{/away food}.
427@end table
428
429@cindex irc resources
430@cindex help about irc
431Typical IRC servers implement many more commands. You can read more
432about the fantastic world of IRC online at
433@indicateurl{http://www.irchelp.org/}, the Internet Relay Chat (IRC)
434help archive.
435
436@node Configuration, , Useful IRC commands, Reference
437@section Configuration
438@cindex configuration
439
440These are some variables you can change to configure @code{rcirc} to your
441liking.
442
443@table @code
444@item rcirc-server
445@vindex rcirc-server
446the default server to connect to.
447
448@item rcirc-port
449@vindex rcirc-port
450the default port to connect to.
451
452@item rcirc-nick
453@vindex rcirc-nick
454the default nick to use.
455@end table
456
457@example
458(setq rcirc-server "irc.mozilla.org"
459 rcirc-port 6666
460 rcirc-nick "alx")
461@end example
462
463@vindex rcirc-user-full-name
464@cindex full name
465@cindex real name
466@cindex surname
467@code{rcirc-user-full-name} is used to set your ``real name'' on IRC.
468It defaults to @code{user-full-name}. If you want to hide your full
469name, you might want to set it to some pseudonym.
470
471@example
472(setq rcirc-user-full-name "Curious Minds Want To Know")
473@end example
474
475@vindex rcirc-startup-channels-alist
476@cindex channels, configuration
477@cindex initial channels, configuration
478@cindex startup channels, configuration
479@code{rcirc-startup-channels-alist} is the alist of channels to join
480when connecting to a particular network. An alist is a list of lists.
481Each sublist starts with a regular expression that is compared to the
482server address you're connecting to. The remaining sublist items are
483the channels to join.
484
485@example
486(setq rcirc-startup-channels-alist
487 '(("\\.freenode\\.net$" "#emacs" "#rcirc" "#wiki")))
488@end example
489
490Note the subtle problem, here --- IRC clients connect to servers, and
491there is no way of knowing which servers belong to a particular network.
492In the example above we're exploiting a naming convention used by within
493the Freenode network --- all servers within the network have a host in
494the @code{freenode.net} domain.
495
496@node Hacking and Tweaking, Key Index, Reference, Top
497@chapter Hacking and Tweaking
498@cindex hacking and tweaking
499
500Here are some examples of stuff you can do to configure @code{rcirc}.
501
502@menu
503* Skipping /away messages using handlers::
504* Using fly spell mode::
505* Scrolling conservatively::
506* Changing the time stamp format::
507* Defining a new command::
508* Reconnecting after you have lost the connection::
509@end menu
510
511@node Skipping /away messages using handlers, Using fly spell mode, Hacking and Tweaking, Hacking and Tweaking
512@section Skipping @code{/away} messages using handlers
513@cindex /away messages
514
515@cindex handlers
516@cindex status codes
517The IRC protocol specifies how certain events are signalled from server
518to client. These events have numbers and are dealt with using so-called
519handlers. You can override existing handlers by exploiting the naming
520convention adopted for @code{rcirc}.
521
522Here's how to stop @code{rcirc} from printing @code{/away} messages.
523Since @code{rcirc} doesn't define a 301 handler, you don't need to
524require @code{rcirc} before defining the handler:
525
526@example
527(defun rcirc-handler-301 (process cmd sender args)
528 "/away message handler.")
529@end example
530
531@node Using fly spell mode, Scrolling conservatively, Skipping /away messages using handlers, Hacking and Tweaking
532@section Using fly spell mode
533@cindex fly spell
534@cindex spelling
535@cindex spell-checking as you type
536@cindex automatic spelling
537@vindex rcirc-mode-hook
538
539The following code activates Fly Spell Mode
540for @code{rcirc} buffers:
541
542@example
543(add-hook 'rcirc-mode-hook (lambda ()
544 (flyspell-mode 1)))
545@end example
546
547@xref{Spelling, , Flyspell mode, emacs, The GNU Emacs Manual},
548for details.
549
550@node Scrolling conservatively, Changing the time stamp format, Using fly spell mode, Hacking and Tweaking
551@section Scrolling conservatively
552@cindex input line
553@cindex scrolling
554@vindex scroll-conservatively
555@vindex rcirc-mode-hook
556
557IRC buffers are constantly growing. If you want to see as much as
558possible at all times, you would want the prompt at the bottom of the
559window when possible. The following snippet uses a local value for
560@code{scroll-conservatively} to achieve this:
561
562@example
563(add-hook 'rcirc-mode-hook
564 (lambda ()
565 (set (make-local-variable 'scroll-conservatively)
566 8192)))
567@end example
568
569@xref{Scrolling, , Scrolling convervatively, emacs, The GNU Emacs
570Manual}, for details.
571
572@node Changing the time stamp format, Defining a new command, Scrolling conservatively, Hacking and Tweaking
573@section Changing the time stamp format
574@cindex time stamp
575@cindex date time
576@cindex format time stamp
577@vindex rcirc-time-format
578
579@code{rcirc-time-format} is the format used for the time stamp. Here's
580how to include the date in the time stamp:
581
582@example
583(setq rcirc-time-format "%Y-%m-%d %H:%M ")
584@end example
585
586@node Defining a new command, Reconnecting after you have lost the connection, Changing the time stamp format, Hacking and Tweaking
587@section Defining a new command
588@cindex defining commands
589@cindex commands, defining
590@cindex new commands, defining
591
592Here's a simple new command, @code{/sv}. With it, you can boast about
593your IRC client. It shows how you can use @code{defun-rcirc-command} to
594define new commands.
595
596We're waiting for the definition of this command until @code{rcirc} is loaded
597because @code{defun-rcirc-command} is not yet available, and without
598@code{rcirc} loaded, the command wouldn't do us much good anyway.
599
600@smallexample
601(eval-after-load 'rcirc
602 '(defun-rcirc-command sv (arg)
603 "Boast about rcirc."
604 (interactive "i")
605 (rcirc-send-message process target
606 (concat "I use " rcirc-id-string))))
607@end smallexample
608
609@node Reconnecting after you have lost the connection, , Defining a new command, Hacking and Tweaking
610@section Reconnecting after you have lost the connection
611@cindex reconnecting
612@cindex disconnecting servers, reconnecting
613
614If you're chatting from a laptop, then you might be familiar with this
615problem: When your laptop falls asleep and wakes up later, your IRC
616client doesn't realise that it has been disconnected. It takes several
617minutes until the client decides that the connection has in fact been
618lost. The simple solution is to use @kbd{M-x rcirc}. The problem is
619that this opens an @emph{additional} connection, so you'll have two
620copies of every channel buffer --- one dead and one live.
621
622The real answer, therefore, is a @code{/reconnect} command:
623
624@smallexample
625(eval-after-load 'rcirc
626 '(defun-rcirc-command reconnect (arg)
627 "Reconnect the server process."
628 (interactive "i")
629 (unless process
630 (error "There's no process for this target"))
631 (let* ((server (car (process-contact process)))
632 (port (process-contact process :service))
633 (nick (with-rcirc-process-buffer process rcirc-nick))
634 channels query-buffers)
635 (dolist (buf (buffer-list))
636 (with-current-buffer buf
637 (when (eq process rcirc-process)
638 (if (rcirc-channel-p rcirc-target)
639 (setq channels (cons rcirc-target channels))
640 (setq query-buffers (cons buf query-buffers))))))
641 (delete-process process)
642 (let ((new-process (rcirc-connect server port nick
643 rcirc-user-name user-full-name
644 channels)))
645 (dolist (buf query-buffers)
646 (with-current-buffer buf
647 (setq rcirc-process new-process)))))))
648@end smallexample
649
650@node Key Index, Variable Index, Hacking and Tweaking, Top
651@unnumbered Key Index
652@printindex ky
653
654@node Variable Index, Index, Key Index, Top
655@unnumbered Variable Index
656@printindex vr
657
658@node Index, , Variable Index, Top
659@unnumbered Index
660@printindex cp
661
662@bye