Revision: mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-556
[emacs-jabber.git] / jabber.texi
blob7fdb134f514365073c1ab8addf7c8343f6c37cca
1 \input texinfo          @c -*-texinfo-*-
2 @c %**start of header
3 @setfilename jabber.info
4 @settitle jabber.el manual 0.8
5 @c %**end of header
7 @dircategory Emacs
8 @direntry
9 * jabber.el: (jabber).             Emacs Jabber client
10 @end direntry
12 @copying
13 This manual is for jabber.el, version 0.8.
15 Copyright @copyright{} 2004, 2005, 2006, 2007, 2008 Magnus Henoch, Tom Berger.
17 @quotation
18 Permission is granted to make and distribute verbatim copies or
19 modified versions of this manual, provided the copyright notice and
20 this permission notice are preserved on all copies.
21 @end quotation
22 @end copying
24 @titlepage
25 @title jabber.el
26 @subtitle instant messaging for Jabber
27 @author by Magnus Henoch and Tom Berger
29 @page
30 @vskip 0pt plus 1filll
31 @insertcopying
32 @end titlepage
34 @contents
36 @ifnottex
37 @node Top, Introduction, (dir), (dir)
38 @top jabber.el manual
40 @insertcopying
42 @end ifnottex
44 @menu
45 * Introduction::                
46 * Basic operation::             
47 * Groupchat::                   
48 * Composing messages::          
49 * File transfer::               
50 * Services::                    
51 * Personal information::        
52 * Avatars::                     
53 * Time queries::                
54 * Useful features::             
55 * Message history::             
56 * Typing notifications::        
57 * Roster import and export::    
58 * XMPP URIs::                   
59 * Customization::               
60 * Hacking and extending::       
61 * Protocol support::            
62 * Concept index::               
63 * Function index::              
64 * Variable index::              
65 @end menu
68 @node Introduction, Basic operation, Top, Top
69 @chapter Introduction
71 jabber.el is a Jabber client running under Emacs.  For more
72 information on the open-protocol instant messaging network Jabber,
73 please visit @uref{http://www.jabber.org}.
75 As a Jabber client, jabber.el is mostly just a face in the crowd,
76 except that it uses buffers where GUI clients have windows.  There is
77 a roster buffer, and to chat with someone you open a chat buffer, and
78 there are buffers for
79 interaction with servers and services.  Then again, jabber.el delivers
80 excellent console performance and customizable hooks (if you have
81 speech synthesizer software, hook it up to your presence alerts).
83 jabber.el does not yet support PGP encryption, sending and receiving
84 roster items, and various other things.
86 @menu
87 * Contact::                     
88 @end menu
90 @node Contact,  , Introduction, Introduction
91 @section Contact
93 @itemize @bullet
94 @item
95 There is a web page at
96 @uref{http://emacs-jabber.sf.net/}.
98 @item
99 There is a Sourceforge
100 project page at @uref{http://sourceforge.net/projects/emacs-jabber},
101 with bug and patch trackers.
103 @item
104 There is a mailing list:
105 @email{emacs-jabber-general@@lists.sourceforge.net},
106 @uref{https://lists.sourceforge.net/lists/listinfo/emacs-jabber-general},
107 @uref{http://dir.gmane.org/gmane.emacs.jabber.general}
109 @item
110 There is a chat room, @code{jabber.el@@conference.jabber.se}.  If you
111 have successfully connected, you can join it by typing @kbd{M-x
112 jabber-groupchat-join} and entering the address.
114 @end itemize
116 @node Basic operation, Groupchat, Introduction, Top
117 @chapter Basic operation
119 This chapter is intended as an introduction to basic usage of
120 jabber.el.  If you have used Jabber before and are familiar with the
121 terminology, you might find it a bit too basic---in that case, just
122 skim it, making sure to pick up the commands mentioned.
124 I'll assume that you have already successfully installed jabber.el; if
125 not, consult the @file{README} file.  Also, make sure you have
126 @code{(require 'jabber)} or @code{(load "jabber-autoloads")} in your
127 @file{.emacs}.
129 There are a handful of global keybindings for common commands.  They
130 start with @kbd{C-x C-j}, and you can get a list of them by typing
131 @kbd{C-x C-j C-h}.
133 @menu
134 * Do you have a Jabber account?::  
135 * Registering an account::      
136 * Connecting::                  
137 * Chatting::                    
138 * Presence::                    
139 * Presence subscription::       
140 * Roster buffer::               
141 @end menu
143 @node Do you have a Jabber account?, Registering an account, Basic operation, Basic operation
144 @section Do you have a Jabber account?
146 Jabber has become rather popular as an instant messaging technology.
147 Several sites use it, but often not under the names ``Jabber'' or
148 ``XMPP''.  Examples:
150 @itemize @bullet
151 @item
152 Google Talk uses Jabber.  If you have a Gmail address, you can use it as
153 a Jabber ID.  @xref{Account settings}, for Google-specific configuration.
155 @item
156 LJ Talk (of Livejournal) uses Jabber.  Your Jabber ID is
157 @samp{@var{ljusername}@@livejournal.com}.
158 @end itemize
160 @node Registering an account, Connecting, Do you have a Jabber account?, Basic operation
161 @section Registering an account
163 @cindex Registering an account
165 If you do not yet have a Jabber account, you can register one.  The
166 registration processes for various servers differ, but many servers
167 support so-called ``in-band registration'', which is described in this
168 section.
170 To register an account, type @kbd{C-u M-x jabber-connect} and enter your
171 desired JID in the form @samp{@var{username}@@@var{server}}.  You will
172 be presented with a registration form to fill out and send.  There the
173 username you chose will be prefilled.  After registration, you can
174 connect to the server as usual.
176 @node Connecting, Chatting, Registering an account, Basic operation
177 @section Connecting
179 @findex jabber-connect-all
180 @findex jabber-connect
181 @findex jabber-disconnect-one
182 @findex jabber-disconnect
184 @cindex Connecting
186 Now, type @kbd{C-x C-j C-c} and enter your JID and password.  If you
187 successfully connect, jabber.el will download your roster and display it
188 in a buffer called @code{*-jabber-*}.
190 By default, you will appear as ``online'' to your contacts.  To change
191 this to e.g. ``away'', type @kbd{M-x jabber-send-presence} or @kbd{C-x
192 C-j C-p}.  @xref{Presence}, for more information.
194 To disconnect, type @kbd{M-x jabber-disconnect} or @kbd{C-x C-j C-d}.
195 Use @kbd{M-x jabber-disconnect-one} to disconnect just one account (or just type @kbd{C-u C-x C-j C-d}).
197 If you don't want to type your JID every time you connect, you can save
198 it in the variable @code{jabber-account-list}.  @xref{Account
199 settings}.  If you configure more than one account, all of them will be
200 connected when you type @kbd{C-x C-j C-c}, as that key is bound to
201 @code{jabber-connect-all}.  To connect only one account, possibly one
202 that's not in your list, type @kbd{M-x jabber-connect} or @kbd{C-u C-x
203 C-j C-c}.
205 @node Chatting, Presence, Connecting, Basic operation
206 @section Chatting
208 @cindex Chatting
209 @findex jabber-chat-with
211 There are several ways to open a chat buffer.  The shortest way is to
212 put point over the person you want to chat with in the roster display
213 and hit RET.
215 You can also use the function @code{jabber-chat-with}.  This function is
216 bound to @kbd{C-x C-j C-j} in the global keymap.  You will be asked to
217 enter a JID in the minibuffer.  You can also enter the roster name of
218 one of your contacts.  All JIDs and names in your roster can be
219 tab-completed.
221 You can also use menus to access commands.  In the roster display, you
222 can access several menus through keystrokes or mouse clicks.  You can
223 bring one big menu up by pressing the second mouse button, or you can
224 bring up the ``chat menu'' by typing @kbd{C-c C-c}.  If you do the
225 latter while point is on a roster entry, that entry will be the
226 default value when you are asked for whom to chat with.
228 Now, try opening a chat with someone.  A buffer named
229 @code{*-jabber-chat-:-@var{person}-*} will be created and selected.
230 Type your message at the end of the buffer, and hit @kbd{RET} to send
231 it.  To include a newline in your message, use @kbd{C-j}.
233 When you receive a message from someone, you will see a red indicator in
234 the mode line.  You can click this indicator with the mouse, or type
235 @kbd{C-x C-j C-l} to switch to the relevant buffer.  @xref{Tracking
236 activity}.
238 @node Presence, Presence subscription, Chatting, Basic operation
239 @section Presence
241 @cindex Presence
242 @cindex Sending presence
243 @findex jabber-send-presence
244 @findex jabber-send-default-presence
245 @vindex jabber-default-show
246 @vindex jabber-default-status
247 @vindex jabber-default-priority
249 @dfn{Presence} is the Jabber term for letting other people know that you
250 are online, and additionally how ``available'' you are.  There are
251 three elements to presence: availability state (called ``show''),
252 status message, and priority.
254 Your show state may either be empty (meaning simply ``online''), or
255 one of @code{away}, @code{xa}, @code{dnd} and @code{chat}, meaning
256 ``away'', ``extended away'' (i.e. away for an extended period), ``do
257 not disturb'', and ``free for chat'', respectively.  This information
258 is available to everyone subscribing to your presence, but technically
259 it does not restrict anyone's actions.  You can chat with people even
260 if you claim to be away.
262 The status message is a short text complementing your show status,
263 such as ``at home'', ``working'', ``phone'', ``playing games'' or
264 whatever you want.  It is sent to everyone subscribing to your
265 presence, but not all clients prominently display it to the user.
267 The priority is only interesting if you are running more than one Jabber
268 client at a time accessing the same account.  @xref{Resources and
269 priority}.
271 To set your presence, use the function @code{jabber-send-presence}
272 (bound to @kbd{C-x C-j C-p}).
273 It can be called both interactively and in Lisp code.  For the latter
274 case, use something like @code{(jabber-send-presence "away" "idle for
275 10 minutes" 10)}.  There are a few shortcuts:
276 @table @kbd
277 @item C-x C-j C-a
278 Send ``away'' presence (with prefix argument, specify status text)
279 @item C-x C-j C-x
280 Send ``extended away'' presence (with prefix argument, specify status
281 text)
282 @item C-x C-j C-o
283 Send default presence (see below)
284 @end table
286 By default, jabber.el sets your presence when you connect.  If you
287 want it not to do that, remove @code{jabber-send-current-presence}
288 from @code{jabber-post-connect-hooks}.  If you want to change the
289 presence that is sent, change the variables
290 @code{jabber-default-show}, @code{jabber-default-status} and
291 @code{jabber-default-priority}.
293 With jabber.el, you can set your presence remotely.  @xref{Ad-Hoc Commands}.
295 @menu
296 * Resources and priority::      
297 * Directed presence::           
298 @end menu
300 @node Resources and priority, Directed presence, Presence, Presence
301 @subsection Resources and priority
303 @cindex Resource
304 @cindex Priority
306 Every connection to an account has a specific name, a @dfn{resource}.
307 The account itself has a JID of the form
308 @samp{@var{username}@@@var{server}} (a @dfn{bare JID}), but the
309 connections have JIDs of the form
310 @samp{@var{username}@@@var{server}/@var{resource}} (a @dfn{full JID}).
311 You can choose the resource name yourself by entering a JID of the
312 latter form at the connection prompt (@pxref{Connecting}), or by
313 configuring it in @code{jabber-account-list} (@pxref{Account settings})
315 Each session has a @dfn{priority}.  The priority determines what happens
316 when a message is sent to the bare JID (i.e. without specifying what
317 connection should receive message).  Such messages are delivered to the
318 connection with the highest non-negative priority value.  If there are
319 no connections, or if all connections have negative priority, the
320 message is either stored on the server for later delivery or bounced to
321 the sender, depending on the server configuration.
323 If there are several connections with the same priority, the behaviour
324 depends on the server.  Some server implementations deliver the message
325 to all such connections, while others choose one connection depending on
326 certain rules.
328 Note that these rules do not apply when a message is sent to a full
329 JID.  Such messages are sent to the specified resource, if it is still
330 connected, and otherwise treated as messages to the bare JID.  In the
331 chat buffers of jabber.el, messages are sent to whatever JID the last
332 message came from (usually a full JID), or to the bare JID if no message
333 has been received yet.  Other clients may have different behaviour.
335 @node Directed presence,  , Resources and priority, Presence
336 @subsection Directed presence
338 @cindex directed presence
339 @cindex send directed presence
340 @findex jabber-send-directed-presence
341 You can send ``directed presence'' with @kbd{M-x
342 jabber-send-directed-presence}.  This is mostly useful to manage
343 transports---sending directed presence is a way to turn them on and
344 off.  You can also send directed presence to an annoying contact to
345 appear as away or offline to that contact.  Note, however, that in both
346 of these cases, all subscribed entities will get your next global
347 presence update.
349 @node Presence subscription, Roster buffer, Presence, Basic operation
350 @section Presence subscription
352 @cindex Presence subscription
353 @cindex Subscribing to someone's presence
354 @findex jabber-send-subscription-request
356 Having permission to view the presence status of a person is called
357 @dfn{subscribing to his presence}.  Presence subscription between two
358 persons can be asymmetric.  Subscription state is shown in the roster
359 display by arrows (@pxref{Customizing the roster buffer}).  A
360 left-pointing arrow means that the contact can see your presence
361 (``from'').  A right-pointing arrow means that you can see the contact's
362 presence (``to'').  The most common case is mutual subscription, a
363 double-ended arrow (``both'').
365 When jabber.el receives a presence subscription request, it will present
366 it to you in a chat buffer, and offer you to choose subscription mode
367 and send a subscription request back to that person.  The ``Mutual''
368 button accepts the request and sends a reciprocal request.@footnote{If this
369 request is superfluous, the server will drop it without bothering the
370 contact.}  The ``One-way'' button accepts the request, but doesn't ask
371 for a subscription in return.  The ``Decline'' button declines the
372 request.
374 To request subscription to someone, type @kbd{M-x
375 jabber-send-subscription-request}.  You will be prompted for the JID
376 to send it to.  This command can also be accessed through the Roster
377 menu, by typing @kbd{C-c C-r} in the roster buffer.  After that, you
378 will probably want to give the contact a more readable name.  The
379 command for that is @code{jabber-roster-change}, which is also
380 available in the Roster menu or by typing @kbd{e} on a person in the
381 roster buffer.
383 @node Roster buffer,  , Presence subscription, Basic operation
384 @section The roster buffer
386 @cindex Roster buffer, basics
387 @cindex Menus
388 @cindex Key bindings
390 The roster buffer is called @code{*-jabber-*}.  It simply contains a
391 list of the contacts on your roster.  If you have several accounts
392 connected, contacts will be grouped by account.
394 In the roster buffer, any command which requires a JID will default to
395 the JID under point when called.  These commands can be called through
396 either keyboard menus or mouse menus.  To open a menu with the mouse,
397 simply press the second mouse button over the JID in
398 question.@footnote{For some reason, mouse menus don't work in XEmacs.
399 Patches are welcome.}  This will bring up a menu with all available
400 actions.  The keyboard menus are split into categories: Chat, Roster,
401 Information, MUC (Multi-User Chat, or groupchat) and Services, opened
402 by @kbd{C-c C-c}, @kbd{C-c C-r}, @kbd{C-c C-i}, @kbd{C-c C-m} and
403 @kbd{C-c C-s}, respectively.
405 @vindex jabber-roster-show-bindings
406 A list of keybindings is displayed at the top of the roster buffer.
407 You can turn it off by setting @code{jabber-roster-show-bindings} to
408 nil.
410 @findex jabber-display-roster
411 You can call @code{jabber-display-roster} (bound to @kbd{g}) to
412 redisplay your roster according to changed preferences
413 (@pxref{Customizing the roster buffer}).  This will not refetch your
414 roster from the server.  Refetching the roster is usually not needed,
415 since updates are pushed to clients automatically.
417 You can choose not to have the roster updated automatically on
418 presence changes (@pxref{Presence alerts}).  In that case, you need to
419 call @code{jabber-display-roster} manually.
421 @vindex jabber-show-offline-contacts
422 @cindex Hiding offline contacts
423 @cindex Offline contacts, hiding
424 Please note, that by default offline contacts showed in roster as any
425 others. To hide them, you can use @kbd{o} in roster buffer. To
426 permanently hide them, customize @code{jabber-show-offline-contacts}
427 variable.
429 @node Groupchat, Composing messages, Basic operation, Top
430 @chapter Groupchat
432 @cindex Groupchat
433 @cindex MUC
434 @cindex Chatrooms
436 The groupchat menu can be accessed by typing @kbd{C-c C-m} in the
437 roster buffer.  You can also type the commands directly, as will be
438 shown here.
440 @findex jabber-groupchat-join
441 @cindex Joining a groupchat
442 @cindex Changing nickname
443 @cindex Nickname, changing 
444 To join a groupchat, type @kbd{M-x jabber-groupchat-join}.  You will
445 be prompted for the groupchat to join, and your nickname in the
446 groupchat.  This nickname doesn't need to have any correlation to your
447 JID; in fact, groupchats are usually (but not always) configured such
448 that only moderators can see your JID.  You can change your nickname
449 with @kbd{M-x jabber-muc-nick}.  @xref{Configuration}, for setting default 
450 nicknames.
452 @cindex Query groupchat
453 @vindex jabber-muc-disable-disco-check
454 When trying to join a room, jabber.el first sends a service discovery
455 info request to the room, to find out whether it exists and what
456 features are enabled (in particular whether the room is
457 password-protected).  However, this can cause problems with some buggy
458 MUC services (or services that respond in a way that jabber.el doesn't
459 expect).  A workaround for that is to set
460 @code{jabber-muc-disable-disco-check} to @code{t}; however, the bug should be
461 unearthed and fixed.
463 Groupchat messages will be displayed in a buffer called
464 @code{*-jabber-groupchat-:-@var{groupchat}-*}.  By default, the buffer
465 name is based on the JID of the chat room.  If you want a shorter name,
466 you can add the chat room to your roster and give it a name, using the
467 command @kbd{M-x jabber-roster-change}.  The groupchat buffer works much
468 like the chat buffer.  It has its own class of alerts
469 (@pxref{Customizing alerts}), and uses activity tracking
470 (@pxref{Tracking activity}).
472 @vindex jabber-muc-completion-delimiter
473 @vindex jabber-muc-looks-personaling-symbols
474 @cindex Groupchat completion
475 @cindex Nick completion in groupchat
476 Also, to save from repeating unnesesary typing you can press @kbd{Tab}
477 key to complete nick of a groupchat member that you are talking with.
478 You can customize your form of personal talking in MUC
479 (@code{jabber-muc-completion-delimiter}) and form of personal talking to
480 you (@code{jabber-muc-looks-personaling-symbols})---see ``jabber-chat''
481 customization group. Defaults are sane, so it is unlikely that you would
482 want to change this, but... it is Emacs!
484 @cindex Topic, MUC
485 @findex jabber-muc-set-topic
486 To change the topic of a groupchat, type @kbd{M-x jabber-muc-set-topic}.
487 The current topic is shown in the header line.
489 @findex jabber-groupchat-leave
490 To leave a groupchat, type @kbd{M-x jabber-groupchat-leave}.
492 @findex jabber-groupchat-get-config
493 If you are the owner of a groupchat, you can change its configuration
494 by typing @kbd{M-x jabber-groupchat-get-config}.  A configuration form
495 will be rendered in new buffer.
497 @findex jabber-muc-names
498 To see which people are in a groupchat, type @kbd{M-x
499 jabber-muc-names}.  This gives a list of nicknames, ``roles'',
500 ``affiliations'', and possibly JIDs.  @xref{MUC Administration}, for
501 the meaning of roles and affiliations.
504 @menu
505 * Configuration::               
506 * Invitations::                 
507 * Private messages::            
508 * MUC Administration::          
509 @end menu
511 @node Configuration, Invitations, Groupchat, Groupchat
512 @section Configuration
514 @vindex jabber-muc-default-nicknames
515 @vindex jabber-muc-autojoin
516 @findex jabber-muc-autojoin
517 @cindex Default MUC nickname
518 @cindex Autojoin chat rooms
519 @cindex Bookmarks, MUC
520 @findex jabber-edit-bookmarks
522 You can configure jabber.el to use a certain nickname for a certain
523 room, or to automatically join a certain room when you connect.  You can
524 do this either by storing bookmarks on the server or by setting Emacs
525 variables.
527 Type @kbd{M-x jabber-edit-bookmarks} to add bookmarks.  You can specify
528 the JID of the conference, the name of the conference (not used by
529 jabber.el), whether to automatically join the room, your desired
530 nickname (or leave empty), and the room password (or leave empty).
532 The default nickname for groupchats is the username part of your JID.
533 If you don't use bookmarks, you can set different nicknames for
534 different groups by customizing @code{jabber-muc-default-nicknames}.
535 There you specify the JID of the group, and your preferred nickname.
537 Automatically joining certain rooms when connecting can be accomplished
538 by setting @code{jabber-muc-autojoin} to a list containing the JIDs of
539 the rooms you want to enter.  To disable this feature, remove
540 @code{jabber-muc-autojoin} from @code{jabber-post-connect-hooks}.
542 Please note, that @code{jabber-muc-default-nicknames} and
543 @code{jabber-muc-autojoin} are machine-local, but apply to @emph{all}
544 accounts---if you connect several accounts, both will try to connect to
545 the same chat rooms, or use the same nickname.  This will lead to
546 confusion.
548 @node Invitations, Private messages, Configuration, Groupchat
549 @section Invitations
551 @cindex Invitations
552 @findex jabber-muc-invite
554 You can invite someone to a groupchat with @kbd{M-x jabber-muc-invite}
555 (also available in the MUC menu).  Pay attention to the order of the
556 arguments---as both users and rooms are just JIDs, it is technically
557 possible to invite a room to a user, but that's probably not what you
558 want.
560 When you receive an invitation, it appears in the chat buffer along
561 with two buttons, ``Accept'' and ``Decline''.  Pressing ``Accept''
562 enters the room, as you would expect.  Pressing ``Decline'' gives you
563 an opportunity to state the reason why you're not joining.
565 @node Private messages, MUC Administration, Invitations, Groupchat
566 @section Private messages
568 @cindex Private MUC messages
569 @findex jabber-muc-private
571 You can open a private chat with a participant in a chat room with
572 @kbd{M-x jabber-muc-private} (or by using the MUC menu).  This creates
573 a buffer with the name
574 @code{*-jabber-muc-priv-@var{group}-@var{nickname}-*} (customizable by
575 @code{jabber-muc-private-buffer-format}), which behaves mostly like an
576 ordinary chat buffer.  This buffer will also be created if someone
577 sends a private message to you.
579 Private MUC messages use the same alerts as normal chat messages.
580 @xref{Message alerts}.
582 @node MUC Administration,  , Private messages, Groupchat
583 @section Administration
585 Administration of a MUC room mostly consists of managing roles and
586 affiliations.  Roles are temporary, and apply until the user leaves the
587 room.  Affiliations are permanent, and based on JIDs.
589 @subsection Roles
591 @findex jabber-muc-set-role
592 @cindex Kicking, MUC
593 @cindex Voice, MUC
594 @cindex Moderator, MUC
595 @cindex Roles, MUC
596 If you have moderator privileges, you can change the role of a
597 participant with @kbd{M-x jabber-muc-set-role}.  Kicking means setting
598 the role to ``none''.  Granting and revoking voice are ``participant''
599 and ``visitor'', respectively.  ``moderator'' gives moderator
600 privileges, obviously.
602 The possible roles are:
604 @table @samp
605 @item moderator
606 Has voice, can change other people's roles.
608 @item participant
609 Has voice.
611 @item visitor
612 Doesn't have voice (can't send messages to everyone, but can send
613 private messages)
615 @item none
616 Not in room.
617 @end table
619 @subsection Affiliations
621 @findex jabber-muc-set-affiliation
622 @cindex Affiliations, MUC
623 @cindex Banning, MUC
624 If you have admin or owner privileges, you can change the affiliation of
625 a user with @kbd{M-x jabber-muc-set-affiliation}.  Affiliation is
626 persistent, and based on JIDs.  Depending of your affiliation and the
627 MUC implementation, you might not be allowed to perform all kinds of
628 changes, and maybe not in one step.
630 Affiliations are:
632 @table @samp
633 @item owner
634 Can destroy room, appoint admins, make people members, ban people.
636 @item admin
637 Can make people members or ban people.
639 @item member
640 Can enter the room, and has voice by default.
642 @item none
643 Rights depend on room configuration.  The room might be members-only, or
644 grant voice only to members.
646 @item outcast
647 Banned from the room.
648 @end table
651 @node Composing messages, File transfer, Groupchat, Top
652 @chapter Composing messages
654 @findex jabber-compose
655 @cindex composing messages
656 @cindex message composition
658 The chat buffer interface can be inconvenient for some purposes.  As you
659 can't use @kbd{RET} to insert a newline (use @kbd{C-j} for that),
660 writing a longer message can be painful.  Also, it is not possible to
661 include a subject in the message, or send the message to multiple
662 recipients.
664 These features are implemented by the message composing tool.  Type
665 @kbd{M-x jabber-compose} to start it.  In the buffer that comes up, you
666 can specify recipients, enter a subject, and type your message.
668 @node File transfer, Services, Composing messages, Top
669 @chapter File transfer
671 @cindex File transfer
672 @cindex Sending files
674 jabber.el has limited support for file transfer.  The most important
675 limit is that files sent and received are kept in buffers, so Emacs must
676 be able to allocate enough memory for the entire file, and the file size
677 must be smaller than the maximum buffer size.@footnote{The maximum
678 buffer size depends on in the variable @code{most-positive-fixnum}.  On
679 32-bit systems, this is 128 or 256 megabytes, depending on your
680 Emacs version.}
682 jabber.el is able to exchange files with most Jabber clients (and also
683 some MSN transports), but notably not with the official Google Talk
684 client.  The Google Talk client uses a different file transfer protocol
685 which, at the time of this release, has not been published.
687 @menu
688 * Receiving files::             
689 * Sending files::               
690 @end menu
692 @node Receiving files, Sending files, File transfer, File transfer
693 @section Receiving files
695 Receiving files requires no configuration.  When someone wants to send a
696 file to you, you are asked (through @code{yes-or-no-p}) whether you want
697 to accept the file.  If you answer yes, you get to choose where to save
698 the file.
700 If the sender's client is correctly configured (this is often not the
701 case; see below), the file transfer will start.  Currently, the only way
702 to watch the progress is to inspect the buffer of the file being
703 transfered; @kbd{C-x C-b} is one way of doing that.  @xref{List Buffers,
704 , Listing Existing Buffers, emacs, GNU Emacs Manual}.  When the transfer
705 is done, the message ``@var{file} downloaded'' appears in the echo area,
706 and the buffer is killed.
708 @c This truly sucks...
709 If this doesn't happen, it is most likely the sender's fault.  The
710 sender needs to have a public IP address, either directly, through port
711 forwarding (in which case the client needs to be configured with the
712 real public IP address), or through an XEP-0065 proxy.  If you have
713 activated XML logging (@pxref{Debug options}), you can see the IP
714 address that the other client is asking you to connect to there.  Often
715 you will find that this is an internal IP address (often starts with
716 @code{192.168}).  See the documentation of the sender's client for
717 setting this up.
719 @node Sending files,  , Receiving files, File transfer
720 @section Sending files
722 @cindex proxy, file transfer
723 @cindex file transfer proxy
724 @cindex XEP-0065 proxy
726 To send a file to someone, you need an XEP-0065 proxy.@footnote{This
727 requirement is not inherent in the protocol, only in the current file
728 transfer implementation of jabber.el, and in Emacs versions earlier than
729 22.}  If your Jabber server hosts such a proxy, it will be found
730 automatically, otherwise it needs to be manually configured.
732 You can check whether your Jabber server has a proxy with @kbd{M-x
733 jabber-get-disco-items}; see @ref{Service discovery}.
735 @vindex jabber-socks5-proxies
736 @findex jabber-socks5-query-all-proxies
737 To configure a proxy manually, customize the variable
738 @code{jabber-socks5-proxies}.  Putting @code{proxy.jabber.se} there
739 should work.  Type @kbd{M-x jabber-socks5-query-all-proxies} to see if
740 the proxies answer.
742 @findex jabber-ft-send
743 Now, you can type @kbd{M-x jabber-ft-send} to send a file to someone.
744 You need to enter the correct full JID, including resource, to get this
745 right.  If the contact is logged in with only one client, and you can
746 see it online, just typing the JID or roster name is enough.  If you run
747 the command from a chat buffer, the JID of the contact is given as
748 the default value.
750 If the contact has several clients online, you probably want to send the
751 file to a particular one.  If you run this command from within a chat
752 buffer, the default target will be the one that last sent a message to
753 you.  If you just type a bare JID or a roster name, the client with the
754 highest priority will get the file.
756 If the contact accepts the file, and the contact's client succeeds in
757 connecting to the proxy, jabber.el will send the file through the
758 proxy.  During this time, your Emacs will be blocked, so you might want
759 to avoid sending large files over slow connections.
761 @node Services, Personal information, File transfer, Top
762 @chapter Services
764 @cindex Browse buffers
766 Not every Jabber entity is a physical person.  There are many
767 automatic entities, called servers, services, components, agents,
768 transports and other names.  The use of these is described here.
770 The functions described in this chapter use @dfn{browse buffers}.
771 Browse buffers are named @code{*-jabber-browse-:-@var{service}-*},
772 sometimes with a numerical suffix.  The different menus have the same
773 keybindings as in the roster buffer, and if you call a function
774 operating on a JID while point is over a JID, that JID will be the
775 default value, so you don't have to type it or copy it yourself.
777 You can change the buffer name template by customizing
778 the variable @code{jabber-browse-buffer-format}.
780 @menu
781 * Commands::                    
782 * Your home server::            
783 * Transports::                  
784 * User directories::            
785 * MUC services::                
786 @end menu
788 @node Commands, Your home server, Services, Services
789 @section Commands
791 A small number of commands is used for almost all interaction with
792 Jabber services.  Essentially, they are all the same: you request a form
793 from the server, fill it in, and send it back.
795 Most of these commands are available under the Service menu, which is
796 opened by typing @kbd{C-c C-s}.  Service discovery is under the Info
797 menu instead, which is available under @kbd{C-c C-i}.
799 @menu
800 * Registration::                
801 * Search::                      
802 * Ad-Hoc Commands::             
803 * Service discovery::           
804 * Browsing::                    
805 @end menu
807 @node Registration, Search, Commands, Commands
808 @subsection Registration
810 @cindex Registration
811 @findex jabber-get-register
813 You can get a registration form for a service by typing @kbd{M-x
814 jabber-get-register} and entering the JID of the service.  On success,
815 you get a single-stage form to fill in.
817 There are two buttons at the bottom of the form, ``Submit'' and ``Cancel
818 registration''.  ``Submit'' does what you would expect it to, but
819 ``Cancel registration'' cancels any existing registration with the
820 service.  Whichever of them you choose, you get a message in the echo
821 area informing whether the operation succeeded.
823 @node Search, Ad-Hoc Commands, Registration, Commands
824 @subsection Search
826 @cindex Search
827 @findex jabber-get-search
829 You can get a search form for a service by typing @kbd{M-x
830 jabber-get-search}.  This gives you a single-stage form to fill in.
831 After you press the ``Submit'' button at the bottom, the search results
832 will be displayed in the same buffer.
834 @menu
835 * Ad-Hoc Commands::             
836 @end menu
838 @node Ad-Hoc Commands, Service discovery, Search, Commands
839 @subsection Ad-Hoc Commands
841 @cindex Ad-Hoc Commands
842 @findex jabber-ahc-get-list
843 @findex jabber-ahc-execute-command
845 jabber.el supports a subset of XEP-0050, the standard for Ad-Hoc
846 Commands.  As the name implies, this can be used for just about
847 anything.  In particular, it is used not only by services, but also by
848 clients (e.g. Psi, and jabber.el itself).
850 To find which commands are available, run ``Request command list''
851 (@code{jabber-ahc-get-list}).@footnote{This is the same thing as a
852 disco items request to the node
853 @code{http://jabber.org/protocol/commands}.}
855 To run a command from the list, put point over it and run ``Execute
856 command'' (@code{jabber-ahc-execute-command}), accepting the defaults
857 for JID and node.  (If you already know those, you could of course
858 enter them yourself.)
860 What happens next depends on the command and the service.  In some
861 cases, the service just responds that the command has been run.  You may
862 also get a form to fill out.  This form may have multiple stages, in
863 which case there are ``Next'' and ``Previous'' buttons for navigating
864 between stages.  You may also see ``Complete'', which runs the command
865 skipping any remaining stages of the form, and ``Cancel'', which cancels
866 the command.
868 Currently, jabber.el uses ad-hoc commands for setting presence remotely.
869 If you realize that you forgot to set your client to ``away'' with a low
870 priority, you can do it remotely from any JID from
871 @code{jabber-account-list}. So, you can add disabled JIDs in
872 @code{jabber-account-list} to allow them control your
873 presence.@footnote{Most Jabber servers also support kicking a client off
874 the net by logging in with another client with exactly the same
875 resource.}
877 @node Service discovery, Browsing, Ad-Hoc Commands, Commands
878 @subsection Service discovery
880 @cindex Service discovery
881 @findex jabber-get-disco-items
882 @findex jabber-get-disco-info
884 Service discovery is used to find information about servers, services
885 and clients.  There are two kinds of requests: find @dfn{info} about a
886 Jabber entity---i.e. its identity and supported features---and find
887 @dfn{items} related to an entity, where the definition of ``related'' is
888 left to the entity itself.
890 The commands to execute such requests are @code{jabber-get-disco-info}
891 and @code{jabber-get-disco-items}, respectively.  These commands can be
892 accessed from the Info menu, which is opened by typing @kbd{C-c C-i}.
893 The commands accept a JID and optionally a ``node''.
895 The result of such a command is displayed in a browse buffer.  For an
896 info request, the result just lists the identities and features of the
897 entity.  For an item request, the related items are listed.  The items
898 may be JIDs, or JIDs with a node.  If you put point on one of the items,
899 its JID and node will be the default value for any Jabber command.
901 If you think that the interface to service discovery is awkward and
902 should be replaced with something better, you are completely right.
904 @node Browsing,  , Service discovery, Commands
905 @subsection Browsing
907 @cindex Browsing
908 @findex jabber-get-browse
910 Before service discovery, browsing was the way to find information about
911 Jabber entities.  Nowadays it is all but superseded, but jabber.el still
912 supports it.  You can use it by typing @kbd{M-x jabber-get-browse}.  It
913 works much like service discovery.
915 @node Your home server, Transports, Commands, Services
916 @section Your home server
918 @cindex Password change
919 @cindex Changing password
920 @cindex Account removal
921 @cindex Removing an account
923 You can interact with your Jabber server to change your password or
924 remove your account.  Both of these can be accomplished by typing
925 @kbd{M-x jabber-get-register} and typing the JID of your server;
926 @pxref{Registration}.
929 @node Transports, User directories, Your home server, Services
930 @section Transports to other IM networks
932 @cindex Gateways
933 @cindex Transports
934 @cindex MSN transport
935 @cindex ICQ transport
936 @cindex AIM transport
938 Some Jabber services make it possible to communicate with users on other
939 instant messaging networks (e.g. MSN, ICQ, AIM), in effect turning your
940 Jabber client into a multi-protocol client.  These are called
941 @dfn{gateways} or @dfn{transports}.  They work by impersonating you on
942 the legacy network; therefore you need to provide your username and
943 password through registration.
945 @subsection Finding a transport
947 To use such a transport, you first need to find one, obviously.
948 Sometimes your home server provides the transports you need, but you are
949 not limited to those; in principle you can use any transport on the
950 Jabber network.  Some transports only accept local users, though.
952 Transports are generally mentioned on the web page of the Jabber server
953 in question.  You can also find transports from within the client;
954 @pxref{Service discovery}.
956 @subsection Registering with a transport
958 To register with a transport, type @kbd{M-x jabber-get-register} and
959 enter the JID of the transport.  This will open a registration form
960 where you get to fill in your login information; @pxref{Registration}.
961 You can later use this same form to change the information or cancel
962 your registration.
964 After you have registered, the transport will request presence
965 subscription.  It needs that to know when you are online, and
966 synchronize your presence on the legacy network.
968 @subsection Contact list
970 Once you are registered, the transport will transfer the contact list
971 from the legacy service.  From the Jabber side, it appears as if lots of
972 people suddenly request presence subscription to you.  This is somewhat
973 inconvenient, but it is currently the only way that the transport can
974 influence your Jabber contact list, as it is an entity external to your
975 server.@footnote{Of course, jabber.el could do more to alleviate this
976 inconvenience.}
978 When you have accepted these presence subscriptions, the contacts from
979 legacy networks appear as if they were Jabber contacts.
981 @subsection Finding users
983 Some legacy networks have a global database of users, and some
984 transports support searching that database.  In that case, you can
985 search for other users with @kbd{M-x jabber-get-search};
986 @pxref{Search}.
988 @node User directories, MUC services, Transports, Services
989 @section User directories
991 There are some Jabber user directories, usually abbreviated JUDs.  The
992 most well-known one is @samp{users.jabber.org}.  You can register with
993 such a directory to let other people find you (@pxref{Registration}),
994 and you can search the directory (@pxref{Search}).
996 @node MUC services,  , User directories, Services
997 @section MUC services
999 MUC services (Multi-User Chat, chat rooms) are usually not operated by
1000 these commands, but by commands specific to the MUC protocol;
1001 @pxref{Groupchat}.  However, some MUC services offer nickname
1002 registration through the registration protocol (@pxref{Registration}),
1003 and other commands; @pxref{Ad-Hoc Commands}.
1005 @node Personal information, Avatars, Services, Top
1006 @chapter Personal information
1008 @cindex vCard
1009 @cindex Personal information
1010 @findex jabber-vcard-get
1011 @findex jabber-vcard-edit
1013 The Jabber way of handling personal information (name, addresses, phone
1014 numbers, etc) is ``vCards'' encoded in XML.@footnote{@xref{XEP-0054}.}
1015 You can get information about a user by running @kbd{M-x
1016 jabber-vcard-get}, and you can edit your own information by running
1017 @kbd{M-x jabber-vcard-edit}.
1019 The form for editing your information can be slightly confusing---you
1020 are allowed to enter any number of addresses, phone numbers and e-mail
1021 addresses, each of which has a set of orthogonal properties.  You can
1022 add and remove items with the @samp{[INS]} and @samp{[DEL]} buttons,
1023 respectively.
1025 This is also where you set your avatar (@pxref{Avatars}).  The size of
1026 your avatar file is limited to 8 kilobytes.
1028 @node Avatars, Time queries, Personal information, Top
1029 @chapter Avatars
1031 @cindex avatars
1032 @vindex jabber-vcard-avatars-retrieve
1033 @vindex jabber-vcard-avatars-publish
1034 @vindex jabber-avatar-cache-directory
1035 @vindex jabber-chat-buffer-show-avatar
1037 jabber.el supports viewing and publishing avatars according to XEP-0153,
1038 vCard-Based Avatars.  By default, if you have an avatar in your vCard
1039 (@pxref{Personal information}), it will be published for others to see,
1040 and if other people publish their avatars, they will be displayed in the
1041 roster buffer and in the header line of chat buffers, if your Emacs can
1042 display images.  Otherwise, jabber.el will not fetch avatars at all.
1044 To disable retrieval of other people's avatars, set
1045 @code{jabber-vcard-avatars-retrieve} to nil.  To disable publishing of
1046 your own avatar, set @code{jabber-vcard-avatars-publish} to nil.  To
1047 disable avatars in chat buffer header lines, set
1048 @code{jabber-chat-buffer-show-avatar} to nil.
1050 There are a number of restrictions on avatar images in the
1051 specification.  Most of them are not enforced by jabber.el.
1052 @itemize @bullet
1053 @item
1054 The image should be smaller than 8 kilobytes; this is enforced by
1055 jabber.el.
1056 @item
1057 The image height and width should be between 32 and 96 pixels; the
1058 recommended size is 64 by 64 pixels.
1059 @item
1060 The image should be square.
1061 @item
1062 The image should be in either PNG, GIF, or JPEG format.  (jabber.el will
1063 behave incorrectly if the image is not in a format supported by Emacs.)
1064 @end itemize
1066 Avatars are cached in the directory specified by
1067 @code{jabber-avatar-cache-directory}, by default
1068 @file{~/.jabber-avatars/}.  The cache is never cleaned, so you might
1069 want to do that yourself from time to time.
1071 @node Time queries, Useful features, Avatars, Top
1072 @chapter Time queries
1074 @cindex time query
1075 @findex jabber-get-time
1076 With @kbd{M-x jabber-get-time}, you can ask what time an entity (client,
1077 server or component) thinks it is, and what time zone it thinks it is
1080 @cindex last online
1081 @findex jabber-get-last-online
1082 You can query a server about when a certain user was last seen online.
1083 Use @kbd{M-x jabber-get-last-online} for that.
1085 @cindex uptime, query
1086 @cindex idle time, query
1087 @findex jabber-get-idle-time
1088 You can also ask a client about how long a user has been idle with
1089 @kbd{M-x jabber-get-idle-time}.  Not all clients answer such queries,
1090 e.g. jabber.el doesn't.  This command can also tell the uptime of a
1091 server or component.
1093 The first of these commands uses the old Entity Time protocol
1094 (@pxref{XEP-0090}).  It has been superseded by XEP-0202, but jabber.el
1095 doesn't implement the newer protocol yet.  The latter two commands use
1096 the Last Activity protocol (@pxref{XEP-0012}).
1098 @node Useful features, Message history, Time queries, Top
1099 @chapter Useful features
1101 jabber.el includes a number of features meant to improve the user
1102 interface and do other useful things.
1104 @menu
1105 * Autoaway::                    
1106 * Modeline status::             
1107 * Keepalive::                   
1108 * Reconnecting::                
1109 * Tracking activity::           
1110 * Watch buddies::               
1111 * Spell checking::              
1112 @end menu
1114 @node Autoaway, Modeline status, Useful features, Useful features
1115 @section Autoaway
1117 @cindex autoaway
1118 @cindex idle
1119 @cindex xprintidle
1120 @vindex jabber-autoaway-method
1122 It is possible to automatically set your status to ``away'' when you
1123 haven't used your computer for a while.  This lets your contacts know
1124 that you might not answer immediately.
1126 To activate this feature, add @code{jabber-autoaway-start} to
1127 @code{jabber-post-connect-hooks}, e.g:
1128 @example
1129 (add-hook 'jabber-post-connect-hooks 'jabber-autoaway-start)
1130 @end example
1132 There are different methods to find how long you have been ``idle''.
1133 The method to use is specified by @code{jabber-autoaway-method}.  The
1134 value of this variable should be a function that returns the number of
1135 seconds you have been idle.  Three functions are provided.
1137 If your Emacs has the @code{current-idle-time} function (which was
1138 introduced in Emacs 22), it is used by default.  Note that this method
1139 only measures the time since you last interacted with Emacs, and thus
1140 disregards activity in other programs.
1142 If you are using the X Window System, you can use the xprintidle
1143 program.@footnote{@uref{http://www.dtek.chalmers.se/~henoch/text/xprintidle.html}}
1144 Make sure that @code{jabber-xprintidle-program} is set to the correct
1145 file name.  This uses the same method as
1146 @uref{http://www.jwz.org/xscreensaver,XScreensaver} to find your idle
1147 time.
1149 If you use the xscreensaver program, you can use
1150 the @file{xscreensaver-emacs-jabber} Perl script to synchronize xscreensaver
1151 and jabber.el status. It is a simple Perl daemon that watches for
1152 xscreensaver status and sets jabber.el's presence when needed.  I.e.:
1153 it sets XA presence when the screen is blanked or locked (by hands or by
1154 idle timeout) and default presence when it's unlocked/unblanked. To use
1155 it, just run @file{xscreensaver-emacs-jabber} after xscreensaver and make
1156 sure that your Emacs run in server mode (that you run @code{(server-start)}
1157 in init files; @pxref{Emacs Server, , Using Emacs as a Server, emacs,
1158 GNU Emacs Manual}.  Alternatively, you can turn on and off server-mode
1159 by jabber.el's hooks).
1161 If you are using Emacs on a GNU/Linux terminal, the function
1162 @code{jabber-termatime-get-idle-time} is used by default.  It uses the
1163 access time of the terminal device as a measure of idle time.
1165 @node Modeline status, Keepalive, Autoaway, Useful features
1166 @section Modeline status
1168 @cindex Modeline
1169 @findex jabber-mode-line-mode
1170 @vindex jabber-mode-line-mode
1171 @vindex jabber-mode-line-compact
1173 By typing @kbd{M-x jabber-mode-line-mode} you toggle display of some
1174 status in mode lines.  The information is your own presence status,
1175 and some numbers showing the status of your roster contacts.  By
1176 default, there are three numbers, for ``online'' (chatty and online),
1177 ``away'' (away, extended away and do not disturb) and offline
1178 contacts.
1180 If you set @code{jabber-mode-line-compact} to nil, you get a complete
1181 breakdown of presence status.  That gives you six numbers indicating
1182 the number of chatty, online, away, extended away, dnd, and offline
1183 contacts, respectively.
1185 @node Keepalive, Reconnecting, Modeline status, Useful features
1186 @section Keepalive
1188 @cindex Keepalive
1189 @cindex Detecting lost connections
1190 @findex jabber-keepalive-start
1191 @findex jabber-keepalive-stop
1192 @vindex jabber-keepalive-interval
1193 @vindex jabber-keepalive-timeout
1195 Sometimes network connections are lost without you noticing.  This is
1196 especially true with Jabber, as it is quite reasonable to keep the
1197 connection open for a long time without either sending or receiving
1198 any data.
1200 If you want to detect a lost connection earlier, you can use the
1201 keepalive functions.  Type @kbd{M-x jabber-keepalive-start} to start
1202 it, and @kbd{M-x jabber-keepalive-stop} to stop it.
1204 These functions work by asking your server for the time once in a
1205 while (by default every ten minutes), and considering the connection
1206 lost if the server doesn't answer within reasonable time (by default
1207 20 seconds).
1209 You can customize the interval and the timeout with the variables
1210 @code{jabber-keepalive-interval} and @code{jabber-keepalive-timeout},
1211 respectively.
1213 @node Reconnecting, Tracking activity, Keepalive, Useful features
1214 @section Reconnecting
1216 @cindex Reconnect
1217 @cindex Automatic reconnection
1218 @vindex jabber-auto-reconnect
1220 jabber.el supports automatic reconnection to Jabber server(s) upon lost
1221 connection.  By default it is off.  To turn on, customize
1222 the @code{jabber-auto-reconnect} variable.  
1224 This is of limited use if you have to type your password every time
1225 jabber.el reconnects.  There are two ways to save your password: you can
1226 set it in @code{jabber-account-alist} (@pxref{Account settings}), and
1227 you can use @file{password-cache.el}, which is available in
1228 recent versions of Gnus and in Emacs 23.  Note that you probably want to
1229 customize @code{password-cache-expiry} if you use the latter.
1231 @node Tracking activity, Watch buddies, Reconnecting, Useful features
1232 @section Tracking activity
1234 @cindex Activity
1235 @findex jabber-activity-mode
1236 @vindex jabber-activity-make-strings
1237 @vindex jabber-activity-query-unread
1238 @vindex jabber-activity-count-in-title
1239 @vindex jabber-activity-count-in-title-format
1241 When you're working on something important you might want to delay
1242 responding to incoming messages.  However, when you're done working,
1243 will you remember them?  If you're anything like me, you'll have a lot
1244 of buffers in your Emacs session, and a Jabber chat buffer can easily
1245 get lost.
1247 When @code{jabber-activity-mode} is enabled (by default, it is), Emacs keeps
1248 track of the buddies which have messaged you since last you visited
1249 their buffer, and will display them in mode line.  As soon as you
1250 visit their buffer they disappear from the mode line, indicating that
1251 you've read their message.
1253 If your mode line fills over because of these notifications, you can
1254 customize @code{jabber-activity-make-strings} to shorten them to the
1255 shortest possibly unambiguous form.
1257 If you try to exit Emacs while you still have unread messages, you
1258 will be notified and asked about this.  If you don't like that, set
1259 @code{jabber-activity-query-unread} to nil.
1261 If you want to display the number of unread buffers in the frame title,
1262 set @code{jabber-activity-count-in-title} to t.  The format of the
1263 number can be changed through
1264 @code{jabber-activity-count-in-title-format}.
1266 For complete customizability, write a hook function for
1267 @code{jabber-activity-update-hook}.  From that function, you can take
1268 action based on @code{jabber-activity-jids},
1269 @code{jabber-activity-mode-string}, and
1270 @code{jabber-activity-count-string}.
1272 @node Watch buddies, Spell checking, Tracking activity, Useful features
1273 @section Watch buddies
1275 @cindex Watch
1276 @cindex Online notifications
1277 @findex jabber-watch-add
1278 @findex jabber-watch-remove
1280 Sometimes you might be waiting for a certain person to come online,
1281 and you don't want that occasion to get lost in the noise.  To get an
1282 obtrusive message when that happens, type @kbd{M-x jabber-watch-add}
1283 and select the person in question.  You can enter a comment, to
1284 remember why you added the watch.
1286 You will get a message whenever that person goes from offline to
1287 online.  jabber.el will remember this for the rest of your Emacs
1288 session (it's not saved to disk, though), but if you want to get rid
1289 of it, type @kbd{M-x jabber-watch-remove}.
1291 @node Spell checking,  , Watch buddies, Useful features
1292 @section Spell checking
1294 @cindex flyspell
1295 @cindex Spell checking
1297 You can activate spell checking in a chat buffer with @kbd{M-x
1298 flyspell-mode}.  It will check only what you are currently writing, not
1299 what you receive or what you have already sent.  You may want to add
1300 @code{flyspell-mode} to @code{jabber-chat-mode-hook}.
1302 For more information about Emacs spell checking, @pxref{Spelling, ,
1303 Checking and Correcting Spelling, emacs, GNU Emacs Manual}.
1305 @node Message history, Typing notifications, Useful features, Top
1306 @chapter Message history
1308 @cindex History
1309 @cindex Backlog
1310 @findex jabber-truncate-top
1311 @findex jabber-truncate-muc
1312 @findex jabber-truncate-chat
1313 @vindex jabber-history-enabled
1314 @vindex jabber-global-history-filename
1315 @vindex jabber-use-global-history
1316 @vindex jabber-history-dir
1317 @vindex jabber-history-enable-rotation
1318 @vindex jabber-history-size-limit
1319 @vindex jabber-backlog-number
1320 @vindex jabber-backlog-days
1321 @vindex jabber-log-lines-to-keep
1323 If you want a record of messages sent and received, set
1324 @code{jabber-history-enabled} to t.  By default all messages will
1325 be saved to a global history file specified by
1326 @code{jabber-global-history-filename}
1327 (@file{~/.jabber_global_message_log} by default).  If you prefer to
1328 store your chats' history in per-contact files, you can set
1329 @code{jabber-use-global-history} to @code{nil}.  When using
1330 per-contact history, files are named by the contact JID and saved
1331 under the directory specified by the variable
1332 @code{jabber-history-dir} (default is @file{~/.emacs-jabber}).
1334 When you open a new chat buffer and have entries in your history file,
1335 the last few messages you recently exchanged with the contact in
1336 question will be inserted.  You can control how many messages with
1337 @code{jabber-backlog-number} (by default 10), and how old messages
1338 with @code{jabber-backlog-days} (by default 3 days).
1340 @findex jabber-chat-display-more-backlog
1341 If you want to see more messages, use the function
1342 @code{jabber-chat-display-more-backlog}, available in the Chat menu.
1343 This is currently the only way to view the message history, apart from
1344 opening the history files manually.
1346 @cindex Rotation of history files
1347 @cindex History file rotation
1348 If you worry about your history file(s) size, you can enable history
1349 rotation feature by setting the variable
1350 @code{jabber-history-enable-rotation} to @code{t} (default is
1351 @code{nil}).  This feature ``rotates'' your history files according to
1352 the following rule: When @code{jabber-history-size-limit} (in
1353 kilobytes) is reached, the @var{history-file} is renamed to
1354 @file{@var{history-file}-@var{number}}, where @var{number} is 1 or the smallest number
1355 after the last rotation.
1357 For example, suppose you set the
1358 @code{jabber-history-size-limit} variable to 512 and you chat with
1359 your buddy @samp{foo@@jabber.server} using the per-contact strategy to store
1360 history files.  So, when the history file (@file{foo@@jabber-server})
1361 reaches 512K bytes, it will be renamed to @file{foo@@jabber-server-1}
1362 and @file{foo@@jabber-server} will be set empty. Next time
1363 @file{foo@@jabber-server} grows to 512K bytes, it will be saved as
1364 @file{foo@@jabber-server-2} and so on.  Although the example was
1365 presented with the per-contact history file strategy, history rotation
1366 works for both per-contact and global history logging strategies.
1368 @cindex Truncate
1369 @cindex Truncation
1370 If you also want to keep chat and groupchat buffers from growing too
1371 much, you can customize @code{jabber-alert-message-hooks} and
1372 @code{jabber-alert-muc-hooks} by adding truncation upon receiving
1373 message (@code{jabber-truncate-chat} and @code{jabber-truncate-muc}, respectively).
1374 The truncation limit may be set by customizing the variable
1375 @code{jabber-log-lines-to-keep}.
1377 @node Typing notifications, Roster import and export, Message history, Top
1378 @chapter Typing notifications
1380 There are two protocols for ``contact is typing'' notifications in
1381 Jabber.  jabber.el supports both of them, displaying various information
1382 in the header line of chat buffers.
1384 @section Message events
1386 @cindex Composing
1387 @cindex Delivered
1388 @cindex Displayed
1389 @vindex jabber-events-request-these
1390 @vindex jabber-events-confirm-delivered
1391 @vindex jabber-events-confirm-displayed
1392 @vindex jabber-events-confirm-composing
1394 The older protocol is called Message Events (@pxref{XEP-0022}).  Besides
1395 typing notification, it lets you know what happens to the messages you send.
1396 These states are possible:
1398 @itemize @bullet
1399 @item
1400 @samp{In offline storage} (the user will receive it on next logon)
1402 @item
1403 @samp{Delivered} to user's client (but not necessarily displayed)
1405 @item
1406 @samp{Displayed} to user
1408 @item
1409 User is @samp{typing a message}
1411 @end itemize
1413 The first state is only reported by servers; the other three are
1414 reported by clients.  jabber.el can report all three of them, and can
1415 display all four; not all clients support all states, though.
1417 If you don't want jabber.el to send out this information about you, set
1418 the variables @code{jabber-events-confirm-delivered},
1419 @code{jabber-events-confirm-displayed}, and/or
1420 @code{jabber-events-confirm-composing} to nil.  You can make jabber.el
1421 not to request such information by customizing
1422 @code{jabber-events-request-these}.
1424 @section Chat states
1426 @vindex jabber-chatstates-confirm
1428 The newer protocol is called Chat States (@pxref{XEP-0085}).  Rather
1429 than dealing with individual messages, it describes the state of the
1430 chat session between two people.  The following states are possible:
1432 @itemize @bullet
1433 @item
1434 Active (the default state, not displayed)
1436 @item
1437 Inactive
1439 @item
1440 Composing
1442 @item
1443 Paused (i.e., taking a short pause in composing)
1445 @item
1446 Gone
1448 @end itemize
1450 jabber.el can display all five states, but only ever sends ``active''
1451 and ``composing'' itself.
1453 To customize sending of chat states, customize the variable
1454 @code{jabber-chatstates-confirm}.
1457 @node Roster import and export, XMPP URIs, Typing notifications, Top
1458 @chapter Roster import and export
1460 @findex jabber-export-roster
1461 @findex jabber-import-roster
1462 @cindex Export roster
1463 @cindex Import roster
1465 Your roster is saved on the Jabber server, and usually not in the
1466 client.  However, you might want to save the roster to a file anyway.
1467 The most common reason for this is probably to copy it to another
1468 account.
1470 To export your roster to a file, type @kbd{M-x jabber-export-roster}.
1471 A buffer will appear in which you can edit the data to be exported.
1472 Changes done in that buffer will not affect your real roster.
1474 To import your roster from a file, type @kbd{M-x jabber-import-roster}.
1475 You will be able to edit the data before importing it.  Items not in the
1476 roster will be added; items in the roster will be modified to match
1477 imported data.  Subscriptions will be updated.
1479 The format of the roster files is the XML used by roster pushes in the
1480 XMPP protocol, in UTF-8 encoding.
1482 @node XMPP URIs, Customization, Roster import and export, Top
1483 @chapter XMPP URIs
1485 @cindex URIs
1486 @cindex URLs
1487 @cindex links
1488 @cindex xmpp: links
1489 @cindex Mozilla integration
1490 @cindex web browser integration
1491 @cindex browser integration
1492 @findex jabber-handle-uri
1494 Many web page authors use links starting with @samp{xmpp:} for JIDs.
1495 Your web browser could be made to pass such links to jabber.el, so that
1496 such links are actually useful and not just decoration.  How to do that
1497 depends on your operating system and web browser.
1499 @section Mozilla and Unix
1501 If you use a Mozilla-based web browser on a Unix-like operating system,
1502 follow these steps.
1504 @enumerate
1505 @item
1506 Make sure you are running the Emacs server.  @xref{Emacs Server, , Using
1507 Emacs as a Server, emacs, GNU Emacs Manual}.
1509 @item
1510 Note the path of the @file{xmppuri.sh} file in the jabber.el
1511 distribution, and make sure it is executable.
1513 @item
1514 Set the Mozilla preference @samp{network.protocol-handler.app.xmpp} to
1515 the path of @file{xmppuri.sh}.  There are two ways to do this:
1517 @itemize
1518 @item
1519 Go to the URL @samp{about:config}, right-click in the list, choose ``New
1520 string'', and enter @samp{network.protocol-handler.app.xmpp} and the
1521 path in the following dialogs.
1523 @item
1524 Open or create the file @file{user.js} in your Mozilla profile directory
1525 (in the same directory as @file{prefs.js}), and add the following line:
1527 @example
1528 user_pref("network.protocol-handler.app.xmpp", "@var{/path/to}/xmppuri.sh");
1529 @end example
1531 Restart Mozilla for this change to take effect.
1532 @end itemize
1533 @end enumerate
1535 @section Other systems
1537 If you know how to pass an XMPP URI from your browser to the function
1538 @code{jabber-handle-uri}, your contribution for this section would be
1539 appreciated.
1541 @node Customization, Hacking and extending, XMPP URIs, Top
1542 @chapter Customization
1544 @findex jabber-customize
1545 @cindex Customization
1547 jabber.el is intended to be customizable for many tastes.  After all,
1548 this is Emacs.  To open a customization buffer for jabber.el, type
1549 @kbd{M-x jabber-customize}.
1551 @menu
1552 * Account settings::            
1553 * Miscellaneous settings::      
1554 * Customizing the roster buffer::  
1555 * Customizing the chat buffer::  
1556 * Customizing alerts::          
1557 * Hooks::                       
1558 * Debug options::               
1559 @end menu
1561 @node Account settings, Miscellaneous settings, Customization, Customization
1562 @section Account settings
1564 @cindex Username
1565 @cindex Resource
1566 @cindex Password
1567 @cindex JID
1568 @cindex Network server
1570 All account settings reside in @code{jabber-account-list} variable.
1571 Usually you only need to set the JID, in the form
1572 @samp{username@@server} (or @samp{username@@server/resource} to use a
1573 specific resource name).  These are the other account options:
1575 @table @asis
1576 @item Disabled
1577 If the account is disabled, @code{jabber-connect-all} will not attempt
1578 to connect it.  You can still connect it manually with
1579 @code{jabber-connect}.
1581 @item Password
1582 You can set the password of the account, so you don't have to enter it
1583 when you connect.  Note that it will be stored unencrypted in your
1584 customization file.
1586 @item Network server
1587 If the JID of the Jabber server is not also its DNS name, you may have
1588 to enter the real DNS name or IP address of the server here.
1590 @item Connection type
1591 This option specifies whether to use an encrypted connection to the
1592 server.  Usually you want ``STARTTLS'' (@code{starttls}), which means
1593 that encryption is activated if the server supports it.  The other
1594 possibilities are ``unencrypted'' (@code{network}), which means just
1595 that, and ``legacy SSL/TLS'' (@code{ssl}), which means that encryption
1596 is activated on connection.
1598 @item Port
1599 If the Jabber server uses a nonstandard port, specify it here.  The
1600 default is 5222 for STARTTLS and unencrypted connections, and 5223 for
1601 legacy SSL connections.
1602 @end table
1604 @subsection For Google Talk
1606 @cindex Google Talk
1608 If you have a very new version of @file{dns.el}, you can connect to
1609 Google Talk just by specifying your Gmail address.  If not, set
1610 ``network server'' to @kbd{talk.google.com} and ``connection type'' to
1611 ``legacy SSL''.
1613 @subsection Upgrade note
1615 Previous versions of jabber.el had the variables @code{jabber-username},
1616 @code{jabber-server}, @code{jabber-resource} and
1617 @code{jabber-password}.  These are now obsolete and not used.
1619 @node Miscellaneous settings, Customizing the roster buffer, Account settings, Customization
1620 @section Miscellaneous settings
1622 @findex jabber-menu
1623 @cindex Menus
1625 If you want a Jabber menu on the menu bar with some common commands,
1626 type @kbd{M-x jabber-menu}.  You can remove it again with @kbd{C-u M-x
1627 jabber-menu}.  Unfortunately, this cannot be changed through Customize
1628 settings, so you need to add @code{(jabber-menu)} to your @file{.emacs}
1629 to enable it permanently.
1631 @node Customizing the roster buffer, Customizing the chat buffer, Miscellaneous settings, Customization
1632 @section Customizing the roster buffer
1634 @vindex jabber-roster-sort-functions
1635 @vindex jabber-sort-order
1636 @vindex jabber-show-resources
1637 @vindex jabber-roster-line-format
1638 @vindex jabber-resource-line-format
1639 @vindex jabber-roster-buffer
1640 @vindex jabber-roster-show-bindings
1641 @cindex Roster buffer, customizing
1643 @cindex Sorting the roster
1644 @code{jabber-roster-sort-functions} controls how roster items are
1645 sorted.  By default, contacts are sorted first by presence, and then
1646 alphabetically by displayed name.
1648 @code{jabber-sort-order} controls how roster items are sorted by
1649 presence.  It is a list containing strings corresponding to show
1650 status (@pxref{Presence}) or @code{nil}, which represents offline.
1652 @code{jabber-show-resources} controls when your contacts' resources
1653 are shown in the roster buffer.  The default is to show resources when
1654 a contact has more than one connected resource.
1656 @code{jabber-roster-line-format} specifies how the entry for each
1657 contact looks.  It is a string where some characters are special if
1658 preceded by a percent sign:
1660 @table @code
1661 @item %a
1662 Avatar of contact, if any
1663 @item %c
1664 "*" if the contact is connected, or " " if not
1665 @item %u
1666 Subscription state - see below
1667 @item %n
1668 Nickname of contact, or JID if no nickname
1669 @item %j
1670 Bare JID of contact (without resource)
1671 @item %r
1672 Highest-priority resource of contact
1673 @item %s
1674 Availability of contact as string ("Online", "Away" etc)
1675 @item %S
1676 Status string specified by contact
1677 @end table
1679 @code{jabber-resource-line-format} is nearly identical, except that
1680 the values correspond to the values of the resource in question, and
1681 that the @code{%p} escape is available, which inserts the priority of
1682 the resource.
1684 @code{jabber-roster-buffer} specifies the name of the roster buffer.
1685 If you change this, the new name will be used the next time you
1686 connect.
1688 @code{jabber-roster-show-bindings} controls whether to show a list of
1689 keybindings at the top of the roster buffer.  You need to run @kbd{M-x
1690 jabber-display-roster} after changing this variable to update the display.
1692 @code{%u} is replaced by one of the strings given by
1693 `jabber-roster-subscription-display'.
1695 @node Customizing the chat buffer, Customizing alerts, Customizing the roster buffer, Customization
1696 @section Customizing the chat buffer
1698 @cindex Chat buffer
1699 @cindex Timestamps
1700 @cindex Faces, chat buffer
1702 You can customize the look of the prompts in the chat buffer.  There
1703 are separate settings for local (i.e. your own messages) and foreign
1704 prompts.
1706 @vindex jabber-chat-text-local
1707 @vindex jabber-chat-text-foreign
1708 @code{jabber-chat-text-local} and @code{jabber-chat-text-foreign}
1709 determine the faces used for chat messages.
1711 @vindex jabber-chat-prompt-local
1712 @vindex jabber-chat-prompt-foreign
1713 @code{jabber-chat-prompt-local} and @code{jabber-chat-prompt-foreign}
1714 determine the faces used for the prompts.
1716 @vindex jabber-chat-local-prompt-format
1717 @vindex jabber-chat-foreign-prompt-format
1718 @code{jabber-chat-local-prompt-format} and
1719 @code{jabber-chat-foreign-prompt-format} determine what text is
1720 displayed in the prompts.  They are format strings, with the following
1721 special sequences defined:
1723 @table @code
1724 @item %t
1725 The time when the message was sent or received
1726 @item %n
1727 The nickname of the user.  For the foreign prompt, this is the name of
1728 the contact in the roster, or the JID if no name set.  For the local
1729 prompt, this is the username part of your JID.
1730 @item %u
1731 The username of the user.
1732 @item %r
1733 The resource.
1734 @item %j
1735 The bare JID of the user
1736 @end table
1738 @vindex jabber-chat-time-format
1739 @code{jabber-chat-time-format} defines how @code{%t} shows time.  Its
1740 format is identical to that passed to @code{format-time-string}.
1741 @xref{Time Conversion, , Time Conversion, elisp, GNU Emacs Lisp
1742 Reference Manual}.
1744 @vindex jabber-chat-delayed-time-format
1745 @code{jabber-chat-delayed-time-format} is used instead of
1746 @code{jabber-chat-time-format} for delayed messages (messages sent while
1747 you were offline, or fetched from history).  This way you can have short
1748 timestamps everywhere except where you need long ones.  You can always
1749 see the complete timestamp in a tooltip by hovering over the prompt with
1750 the mouse.
1752 @vindex jabber-print-rare-time
1753 @vindex jabber-rare-time-format
1754 @vindex jabber-chat-text-local
1755 By default, timestamps are printed in the chat buffer every hour (at
1756 ``rare'' times).  This can be toggled with
1757 @code{jabber-print-rare-time}.  You can customize the displayed time by
1758 setting @code{jabber-rare-time-format}.  Rare timestamps will be printed
1759 whenever time formatted by that format string would change.
1761 @vindex jabber-chat-header-line-format
1762 @vindex jabber-muc-header-line-format
1763 You can also customize the header line of chat buffers, by modifying
1764 the variable @code{jabber-chat-header-line-format}.  The format of
1765 that variable is the same as that of @code{mode-line-format} and
1766 @code{header-line-format}.  @xref{Mode Line Format, , Mode-Line
1767 Format, elisp, GNU Emacs Lisp Reference Manual}.  For MUC buffers,
1768 @code{jabber-muc-header-line-format} is used instead.
1770 @vindex jabber-chat-fill-long-lines
1771 @cindex Filling long lines in chat buffer
1772 The variable @code{jabber-chat-fill-long-lines} controls whether long
1773 lines in the chat buffer are filled.
1775 @node Customizing alerts, Hooks, Customizing the chat buffer, Customization
1776 @section Customizing alerts
1778 @cindex Alert hooks
1779 @findex define-jabber-alert
1781 When an event happens (currently including presence changes, incoming
1782 messages, and completed queries) you will usually want to be
1783 notified.  Since tastes in this area vary wildly, these alerts are
1784 implemented as hooks, so you can choose which ones you want, or write
1785 your own if none fit.
1787 Actually, if you don't want to write your own, stop reading this
1788 section and just read @ref{Standard alerts}.
1790 Many kinds of alerts consist in displaying a text message through a
1791 certain mechanism.  This text message is provided by a function which
1792 you can rewrite or replace.  If this function returns @code{nil}, no
1793 message is displayed, and non-textual alerts refrain from action.
1795 If you want to write alert hooks that do nothing except displaying the
1796 supplied message in some way, use the macro
1797 @code{define-jabber-alert}.  For example, if @var{foo} is a function
1798 that takes a string as an argument, write
1799 @example
1800 (define-jabber-alert foo
1801   "Display a message in a fooish way"
1802   'foo)
1803 @end example
1804 and all details will be taken care of for you.
1806 The hooks take different arguments depending on category.  However,
1807 they all have in common that the last argument is the result of the
1808 message function.  The message function for each category takes the
1809 same arguments as the corresponding hooks, except for that last
1810 argument.
1812 Alert hook contributions are very welcome.  You can send them to the
1813 mailing list, or to the Sourceforge patch tracker.
1815 Alert hooks are meant for optional UI things, that are subject to
1816 varying user tastes, and that can be toggled by simply adding or
1817 removing the function to and from the hook.  For other things, there
1818 are corresponding general hooks, that are defvars instead of
1819 defcustoms, and that are to be managed by Lisp code.  They have the
1820 same name as the alert hooks minus the @code{-alert} part,
1821 i.e. @code{jabber-message-hooks} vs @code{jabber-alert-message-hooks},
1822 etc.
1824 @menu
1825 * Standard alerts::             
1826 * Presence alerts::             
1827 * Message alerts::              
1828 * MUC alerts::                  
1829 * Info alerts::                 
1830 @end menu
1832 @node Standard alerts, Presence alerts, Customizing alerts, Customizing alerts
1833 @subsection Standard alerts
1835 @cindex Alerts
1836 @cindex Scroll
1838 Eight alerts are already written for all four alert categories.  These
1839 all obey the result from the corresponding message function.
1841 The @code{beep} alerts simply sound the terminal bell by calling
1842 @code{ding}.  They are disabled by default.
1844 The @code{echo} alerts display a message in the echo area by calling
1845 @code{message}.  They are enabled by default.
1847 The @code{switch} alerts switch to the buffer where the event occurred
1848 (chat buffer for incoming messages, roster buffer for presence
1849 changes, browse buffer for completed queries).  They are disabled by
1850 default.  Take care when using them, as they may interrupt your
1851 editing.
1853 The @code{display} alerts display but do not select the buffer in
1854 question, using the function @code{display-buffer}.  @xref{Choosing
1855 Window, , Choosing a Window for Display, elisp, GNU Emacs Lisp
1856 Reference Manual}, for information about customizing its behaviour.
1857 This is enabled by default for info requests.
1859 The @code{wave} alerts play a sound file by calling
1860 @code{play-sound-file}.  No sound files are provided.  To use this,
1861 enter the names of the sound files in
1862 @code{jabber-alert-message-wave}, @code{jabber-alert-presence-wave}
1863 and @code{jabber-alert-info-wave}, respectively.  You can specify
1864 specific sound files for contacts matching a regexp in the variables
1865 @code{jabber-alert-message-wave-alist} and
1866 @code{jabber-alert-presence-wave-alist}.
1868 The @code{screen} alerts send a message through the Screen terminal
1869 manager (see @uref{http://www.gnu.org/software/screen/}).  They do no
1870 harm if called when you don't use Screen.
1872 The @code{ratpoison} alerts send a message through the Ratpoison
1873 window manager (see @uref{http://ratpoison.sourceforge.net/}).  They
1874 do no harm if used when you're not running X, but if you are running X
1875 with another window manager, the ratpoison processes will never exit.
1876 You can look at them with @code{list-processes}.
1878 The @code{sawfish} alerts send a message through the Sawfish window
1879 manager.
1881 The @code{festival} alerts speak the message using the Emacs interface
1882 of the Festival speech synthesis system (see
1883 @uref{http://www.cstr.ed.ac.uk/projects/festival/}).
1885 Additionally, for one-to-one and MUC messages, there are @code{scroll}
1886 alerts (enabled by default), that aim to do the right thing with chat
1887 buffers that are visible but not active.  Sometimes you want point to
1888 scroll down, and sometimes not.  These functions should do what you
1889 mean; if they don't, it's a bug.
1891 Also, in MUC you can use family of so-called ``personal'' alerts.
1892 Their like other MUC alerts, but fires only if incoming message
1893 addresed directly to you. One example of such alert is
1894 @code{jabber-muc-echo-personal}, which show MUC message only if it
1895 addresed to you.
1897 Some of these functions are in the @file{jabber-alert.el} file, and the
1898 others are in their own files.  You can use them as templates or
1899 inspiration for your own alerts.
1901 @node Presence alerts, Message alerts, Standard alerts, Customizing alerts
1902 @subsection Presence alerts
1904 @vindex jabber-alert-presence-message-function
1905 @findex jabber-presence-default-message
1907 Set @code{jabber-alert-presence-message-function} to your desired
1908 function.  This function should look like:
1910 @example
1911 (defun @var{function} (@var{who} @var{oldstatus} @var{newstatus} @var{statustext})
1912    ...
1913    )
1914 @end example
1916 @var{who} is the JID symbol (@pxref{Roster structure}),
1917 @var{oldstatus} and @var{newstatus} are the previous and current
1918 stati, respectively, and @var{statustext} is the status message if
1919 provided, otherwise nil.
1921 @var{newstatus} can also be one of @code{"subscribe"},
1922 @code{"subscribed"}, @code{"unsubscribe"} and @code{"unsubscribed"}.
1924 The default function, @code{jabber-presence-default-message}, returns
1925 @code{nil} if @var{oldstatus} and @var{newstatus} are the same, and in
1926 other cases constructs a message from the given data.
1928 All presence alert hooks take the same arguments plus the additional
1929 @var{proposed-alert}, which is the result of the specified message
1930 function.  This last argument is usually the only one they use.
1932 @node Message alerts, MUC alerts, Presence alerts, Customizing alerts
1933 @subsection Message alerts
1935 @vindex jabber-alert-message-function
1936 @findex jabber-message-default-message
1937 @vindex jabber-message-alert-same-buffer
1939 If you don't want message alerts when the chat buffer in question is
1940 already the current buffer, set @code{jabber-message-alert-same-buffer}
1941 to nil.  This affects the behaviour of the default message function, so
1942 you'll have to reimplement this functionality if you write your own
1943 message function.
1945 Set @code{jabber-alert-message-function} to your desired
1946 function.@footnote{Logically it should be
1947 @code{jabber-alert-message-message-function}, but that would be
1948 really ugly.}  This function should look like:
1950 @example
1951 (defun @var{function} (@var{from} @var{buffer} @var{text})
1952    ...
1953    )
1954 @end example
1956 @var{from} is the JID symbol (@pxref{Roster structure}), @var{buffer}
1957 is the buffer where the message is displayed, and @var{text} is the
1958 text of the message.
1960 The default function, @code{jabber-message-default-message}, returns
1961 ``Message from @var{person}'', where @var{person} is the name of the
1962 person if specified in the roster, otherwise the JID.
1964 All message alert hooks take the same arguments plus the additional
1965 @var{proposed-alert}, which is the result of the specified message
1966 function.
1968 @node MUC alerts, Info alerts, Message alerts, Customizing alerts
1969 @subsection MUC alerts
1971 @vindex jabber-alert-muc-function
1972 @vindex jabber-muc-alert-self
1973 @findex jabber-muc-default-message
1975 Set @code{jabber-alert-muc-function} to your desired
1976 function.  This function should look like:
1978 @example
1979 (defun @var{function} (@var{nick} @var{group} @var{buffer} @var{text})
1980    ...
1981    )
1982 @end example
1984 @var{nick} is the nickname, @var{group} is the JID of the group,
1985 @var{buffer} is the buffer where the message is displayed, and
1986 @var{text} is the text of the message.
1988 The default function, @code{jabber-muc-default-message}, returns
1989 ``Message from @var{nick} in @var{group}'' or ``Message in
1990 @var{group}'', the latter for messages from the room itself.
1992 All MUC alert hooks take the same arguments plus the additional
1993 @var{proposed-alert}, which is the result of the specified message
1994 function.
1996 By default, no alert is made for messages from yourself.  To change
1997 that, customize the variable @code{jabber-muc-alert-self}.
1999 @node Info alerts,  , MUC alerts, Customizing alerts
2000 @subsection Info alerts
2002 @vindex jabber-alert-info-message-function
2003 @findex jabber-info-default-message
2005 Info alerts are sadly underdeveloped.  The message function,
2006 @code{jabber-alert-info-message-function}, takes two arguments,
2007 @var{infotype} and @var{buffer}.  @var{buffer} is the buffer where
2008 something happened, and @var{infotype} is either @code{'roster} for
2009 roster updates, or @code{'browse} for anything that uses the browse
2010 buffer (basically anything except chatting).
2012 The info alert hooks take an extra argument, as could be expected.
2014 @node Hooks, Debug options, Customizing alerts, Customization
2015 @section Hooks
2017 jabber.el provides various hooks that you can use for whatever
2018 purpose.
2020 @table @code
2021 @vindex jabber-post-connect-hooks
2022 @item jabber-post-connect-hooks
2023 This hook is called after successful connection and authentication.
2024 By default it contains @code{jabber-send-default-presence}
2025 (@pxref{Presence}).  The hook functions get the connection object as
2026 argument.
2028 @vindex jabber-lost-connection-hook
2029 @item jabber-lost-connection-hook
2030 This hook is called when you have been disconnected for unknown
2031 reasons.  Usually this isn't noticed for quite a long time.
2033 @vindex jabber-pre-disconnect-hook
2034 @item jabber-pre-disconnect-hook
2035 This hook is called just before voluntary disconnection.  This might
2036 be due to failed authentication, so check
2037 @code{*jabber-authenticated*} if you want to send a stanza.
2039 @vindex jabber-post-disconnect-hook
2040 @item jabber-post-disconnect-hook
2041 This hook is called after disconnection of any kind, possibly just
2042 after @code{jabber-lost-connection-hook}.
2044 @vindex jabber-chat-mode-hook
2045 @item jabber-chat-mode-hook
2046 This hook is called when a new chat buffer is created.
2048 @end table
2050 @node Debug options,  , Hooks, Customization
2051 @section Debug options
2053 @vindex jabber-debug-log-xml
2054 @cindex XML log
2056 These settings provide a lot of information which is usually not very
2057 interesting, but can be useful for debugging various things.
2059 @code{jabber-debug-log-xml} activates XML logging.  All XML stanzas
2060 sent and received are logged in the buffer @code{*-jabber-xml-log-*}
2061 in list format.  @xref{XML representation}.
2063 @node Hacking and extending, Protocol support, Customization, Top
2064 @chapter Hacking and extending
2066 This part of the manual is an attempt to explain parts of the source
2067 code.  It is not meant to discourage you from reading the code
2068 yourself and trying to figure it out, but as a guide on where to
2069 look.  Knowledge of Jabber protocols is assumed.
2071 @menu
2072 * XML representation::          
2073 * Roster structure::            
2074 * Listening for new requests::  
2075 * Sending new requests::        
2076 * Extending service discovery::  
2077 * Chat printers::               
2078 * Stanza chains::               
2079 @end menu
2081 @node XML representation, Roster structure, Hacking and extending, Hacking and extending
2082 @section XML representation
2084 @cindex XML representation
2086 The XML representation is the one generated by @file{xml.el} in Emacs,
2087 namely the following.  Each tag is a list.  The first element of the
2088 list is a symbol, the name of which is the name of the tag.  The
2089 second element is an alist of attributes, where the keys are the
2090 attribute names in symbol form, and the values are strings.  The
2091 remaining elements are the tags and data contained within the tag.
2093 For example,
2094 @example
2095 <foo bar='baz'>
2096 <frobozz/>Fnord
2097 </foo>
2098 @end example
2099 is represented as
2100 @example
2101 (foo ((bar . "baz")) (frobozz nil "") "Fnord
2103 @end example
2105 Note the empty string as the third element of the @code{frobozz}
2106 list.  It is not present in newer (post-21.3) versions of
2107 @file{xml.el}, but it's probably best to assume it might be there.
2109 If you want to see what an XML tag would look like, use
2110 @code{jabber-sexp2xml}, which takes a tag and returns a string.  You
2111 will usually not need it in your code, as you can use
2112 @code{jabber-send-sexp} to send away your tags to the server.
2114 @node Roster structure, Listening for new requests, XML representation, Hacking and extending
2115 @section Roster structure
2117 @vindex *jabber-roster*
2118 @vindex jabber-jid-obarray
2120 Roster entries are contained in the list @code{*jabber-roster*}.
2122 A roster entry is a symbol.  Its name is the JID, and it is interned
2123 in @code{jabber-jid-obarray}.  A roster entry can have the following
2124 properties:
2126 @table @code
2127 @item xml
2128 The XML tag received from the server on roster update
2130 @item name
2131 The name of the roster item (just like the XML attribute)
2133 @item subscription
2134 The subscription state (also copied)
2136 @item ask
2137 The ask state (copied)
2139 @item groups
2140 A list of strings (possibly empty) containing all the groups the
2141 contact is in
2143 @item connected
2144 Boolean, true if any resource is connected
2146 @item show
2147 Presence show status for highest-priority connected resource
2149 @item status
2150 Presence status message for highest-priority connected resource
2152 @item resources
2153 Alist.  Keys are strings (resource names), values are plists with
2154 properties @code{connected}, @code{show}, @code{status} and
2155 @code{priority}.
2157 @end table
2159 Incoming presence information is inserted in @code{resources}, and the
2160 information from the resource with the highest priority is inserted in
2161 @code{show} and @code{status} by the function
2162 @code{jabber-prioritize-resources}.
2164 @node Listening for new requests, Sending new requests, Roster structure, Hacking and extending
2165 @section Listening for new requests
2167 @findex jabber-send-iq
2168 @findex jabber-process-iq
2169 @findex jabber-signal-error
2170 @vindex jabber-iq-get-xmlns-alist
2171 @vindex jabber-iq-set-xmlns-alist
2173 To listen for new IQ requests, add the appropriate entry in
2174 @code{jabber-iq-get-xmlns-alist} or @code{jabber-iq-set-xmlns-alist}.
2175 The key is the namespace of the request, and the value is a function
2176 that takes one argument, the entire IQ stanza in list format.
2177 @code{jabber-process-iq} reads these alists to determine which
2178 function to call on incoming packets.
2180 For example, the Ad-Hoc Commands module contains the following:
2182 @example
2183 (add-to-list 'jabber-iq-set-xmlns-alist
2184              (cons "http://jabber.org/protocol/commands" 'jabber-ahc-process))
2185 @end example
2187 To send a response to an IQ request, use @samp{(jabber-send-iq
2188 @var{sender} "result" @var{query} nil nil nil nil @var{id})}, where
2189 @var{query} is the query in list format.  @code{jabber-send-iq} will
2190 encapsulate the query in an IQ packet with the specified id.
2192 To return an error to the Jabber entity that sent the query, use
2193 @code{jabber-signal-error}.  The signal is caught by
2194 @code{jabber-process-iq}, which takes care of sending the error.
2196 @node Sending new requests, Extending service discovery, Listening for new requests, Hacking and extending
2197 @section Sending new requests
2199 @findex jabber-send-iq
2200 @findex jabber-process-iq
2201 @findex jabber-report-success
2202 @findex jabber-process-data
2204 To send an IQ request, use @code{jabber-send-iq}.  It will generate an
2205 id, and create a mapping for it for use when the response comes.  The
2206 syntax is:
2208 @example
2209 (jabber-send-iq @var{to} @var{type} @var{query}
2210                 @var{success-callback} @var{success-closure}
2211                 @var{failure-callback} @var{failure-closure})
2212 @end example
2214 Both callbacks take two arguments, the IQ stanza returned and the
2215 closure item mentioned here.
2217 Two standard callbacks are provided.  @code{jabber-report-success}
2218 takes a string as closure item, and reports success or failure in the
2219 echo area.  @code{jabber-process-data} prepares a browse buffer.  If
2220 its closure argument is a function, it calls that function with point
2221 in this browse buffer.  If it's a string, it prints that string along
2222 with the error message in the IQ response.  If it's anything else
2223 (e.g. @code{nil}), it just dumps the XML in the browse buffer.
2225 Examples follow.  This is the hypothetical Jabber protocol ``frob'',
2226 for which only success report is needed:
2227 @example
2228 (jabber-send-iq "someone@@somewhere.org" "set"
2229                 '(query ((xmlns . "frob")))
2230                 'jabber-report-success "Frobbing"
2231                 'jabber-report-success "Frobbing")
2232 @end example
2233 This will print ``Frobbing succeeded'' or ``Frobbing failed: reason'',
2234 respectively, in the echo area.
2236 The protocol ``investigate'' needs to parse results and show them in a
2237 browse buffer:
2238 @example
2239 (jabber-send-iq "someone@@somewhere.org" "get"
2240                 '(query ((xmlns . "investigate")))
2241                 'jabber-process-data 'jabber-process-investigate
2242                 'jabber-process-data "Investigation failed")
2243 @end example
2244 Of course, the previous example could have used
2245 @code{jabber-report-success} for the error message.  It's a matter of
2246 UI taste.
2248 @node Extending service discovery, Chat printers, Sending new requests, Hacking and extending
2249 @section Service discovery
2251 @vindex jabber-advertised-features
2252 @vindex jabber-disco-items-nodes
2253 @vindex jabber-disco-info-nodes
2254 @findex jabber-my-jid-p
2256 Your new handlers will likely want to advertise their existence
2257 through service discovery.
2259 To have an additional feature reported in response to disco info
2260 requests, add a string to @code{jabber-advertised-features}.
2262 By default, the service discovery functions reject all requests
2263 containing a node identifier with an ``Item not found'' error.  To
2264 make them respond, add the appropriate entries to
2265 @code{jabber-disco-items-nodes} and @code{jabber-disco-info-nodes}.
2266 Both variables work in the same way.  They are alists, where the keys
2267 are the node names, and the values are lists of two items.
2269 The first item is the data to return --- either a list or a function
2270 taking the entire IQ stanza and returning a list, this list containing
2271 the XML nodes to include in the @code{<query/>} node in the response.
2273 The second item is the access control function.  An access control
2274 function receives the JID as its only argument, and returns non-nil if
2275 access is to be granted.  If nil is specified instead of a function,
2276 access is always granted.  One such function is provided,
2277 @code{jabber-my-jid-p}, which grants access for JIDs where the
2278 username and server (not necessarily resource) are equal to those of
2279 the user.
2281 @node Chat printers, Stanza chains, Extending service discovery, Hacking and extending
2282 @section Chat printers
2284 @vindex jabber-chat-printers
2285 @vindex jabber-muc-printers
2286 @vindex jabber-body-printers
2287 @cindex Chat printers
2288 @cindex Body printers
2290 Chat printers are functions that print a certain aspect of an incoming
2291 message in a chat buffer.  Included are functions for printing subjects
2292 (@code{jabber-chat-print-subject}), bodies
2293 (@code{jabber-chat-print-body}, and @code{jabber:x:oob}-style URLs
2294 (@code{jabber-chat-print-url}).  The functions in
2295 @code{jabber-chat-printers} are called in order, with the entire
2296 @code{<message/>} stanza as argument, and are expected to call
2297 @code{insert} if they have anything to add.
2299 For MUC, the functions in @code{jabber-muc-printers} are prepended to
2300 those in @code{jabber-chat-printers}.
2302 Body printers are a subgroup of chat printers.  They are exclusive; only
2303 one of them applies to any given message.  The idea is that
2304 ``higher-quality'' parts of the message override pieces included for
2305 backwards compatibility.  Included are @code{jabber-muc-print-invite}
2306 and @code{jabber-chat-normal-body}; functions for XHTML-IM and PGP
2307 encrypted messages may be written in the future.  The functions in
2308 @code{jabber-body-printers} are called in order until one of them
2309 returns non-nil.
2311 @node Stanza chains,  , Chat printers, Hacking and extending
2312 @section Stanza chains
2314 @vindex jabber-message-chain
2315 @vindex jabber-iq-chain
2316 @vindex jabber-presence-chain
2318 If you really need to get under the skin of jabber.el, you can add
2319 functions to the lists @code{jabber-message-chain},
2320 @code{jabber-iq-chain} and @code{jabber-presence-chain}.  The functions
2321 in these lists will be called in order when an XML stanza of the
2322 corresponding type arrives, with the entire XML stanza passed as the
2323 only argument.  Earlier functions can modify the stanza to change the
2324 behaviour of downstream functions.
2326 @node Protocol support, Concept index, Hacking and extending, Top
2327 @appendix Protocol support
2329 @cindex Supported protocols
2331 These are the protocols currently supported (in full or partially) by
2332 jabber.el.
2334 @menu
2335 * RFC 3920::                    XMPP-CORE
2336 * RFC 3921::                    XMPP-IM
2337 * XEP-0004::                    Data Forms
2338 * XEP-0012::                    Last Activity
2339 * XEP-0020::                    Feature Negotiation
2340 * XEP-0022::                    Message Events
2341 * XEP-0030::                    Service Discovery
2342 * XEP-0045::                    Multi-User Chat
2343 * XEP-0049::                    Private XML Storage
2344 * XEP-0050::                    Ad-Hoc Commands
2345 * XEP-0054::                    vcard-temp
2346 * XEP-0055::                    Jabber Search
2347 * XEP-0065::                    SOCKS5 Bytestreams
2348 * XEP-0066::                    Out of Band Data
2349 * XEP-0068::                    Field Standardization for Data Forms
2350 * XEP-0077::                    In-Band Registration
2351 * XEP-0078::                    Non-SASL Authentication
2352 * XEP-0082::                    Jabber Date and Time Profiles
2353 * XEP-0085::                    Chat State Notifications
2354 * XEP-0086::                    Error Condition Mappings
2355 * XEP-0090::                    Entity Time
2356 * XEP-0091::                    Delayed Delivery
2357 * XEP-0092::                    Software Version
2358 * XEP-0095::                    Stream Initiation
2359 * XEP-0096::                    File Transfer
2360 * XEP-0146::                    Remote Controlling Clients
2361 * XEP-0153::                    vCard-Based Avatars
2362 @end menu
2364 @node RFC 3920, RFC 3921, Protocol support, Protocol support
2365 @section RFC 3920 (XMPP-CORE)
2367 Most of RFC 3920 is supported, with the following exceptions.
2369 SASL is supported only when an external SASL library from FLIM or Gnus
2370 is present.  As SASL is an essential part to XMPP, jabber.el will send
2371 pre-XMPP stream headers if it is not available.
2373 None of the stringprep profiles are implemented.  jabber.el changes
2374 JIDs to lowercase internally; that's all.
2376 jabber.el doesn't interpret namespace prefixes.
2378 The @code{xml:lang} attribute is neither interpreted nor generated.
2380 SRV records are used if a modern version of @code{dns.el} is installed.
2382 @node RFC 3921, XEP-0004, RFC 3920, Protocol support
2383 @section RFC 3921 (XMPP-IM)
2385 Most of RFC 3921 is supported, with the following exceptions.
2387 Messages of type ``headline'' are not treated in any special way.
2389 The @code{<thread/>} element is not used or generated.
2391 Sending ``directed presence'' is supported; however, presence stanzas
2392 received from contacts not in roster are ignored.
2394 Privacy lists are not supported at all.
2396 jabber.el doesn't support XMPP-E2E or ``im:'' CPIM URIs.
2398 @node XEP-0004, XEP-0012, RFC 3921, Protocol support
2399 @section XEP-0004 (Data Forms)
2401 XEP-0004 support is good enough for many purposes.  Limitations are
2402 the following.
2404 Forms in incoming messages are not interpreted.  See each specific
2405 protocol for whether forms are accepted in that context.
2407 ``Cancel'' messages are probably not consistently generated when they
2408 should be.  This is partly a paradigm clash, as jabber.el doesn't use
2409 modal dialog boxes but buffers which can easily be buried.
2411 @code{<required/>} elements are not enforced.
2413 The field types ``jid-single'', ``jid-multi'' and ``list-multi'' are
2414 not implemented, due to programmer laziness.  Let us know if you need
2415 them.
2417 @node XEP-0012, XEP-0020, XEP-0004, Protocol support
2418 @section XEP-0012 (Last Activity)
2420 jabber.el can generate all three query types described in the protocol.
2421 However, it does not answer to such requests.
2423 @node XEP-0020, XEP-0022, XEP-0012, Protocol support
2424 @section XEP-0020 (Feature Negotiation)
2426 There are no known limitations or bugs in XEP-0020 support.
2428 @node XEP-0022, XEP-0030, XEP-0020, Protocol support
2429 @section XEP-0022 (Message Events)
2431 jabber.el understands all four specified kinds of message events
2432 (offline, delivered, displayed, and composing) and by default requests
2433 all of them.  It also reports those three events that make sense for
2434 clients.
2436 @node XEP-0030, XEP-0045, XEP-0022, Protocol support
2437 @section XEP-0030 (Service Discovery)
2439 Service discovery is supported, both as client and server.  When used in
2440 the code, service discovery results are cached indefinitely.
2442 @node XEP-0045, XEP-0049, XEP-0030, Protocol support
2443 @section XEP-0045 (Multi-User Chat)
2445 jabber.el supports parts of XEP-0045.  Entering, leaving and chatting
2446 work.  So do invitations and private messages.  Room configuration is
2447 supported.  Changing roles of participants (basic moderation) is
2448 implemented, as is changing affiliations, but requesting affiliation
2449 lists is not yet supported.
2451 @node XEP-0049, XEP-0050, XEP-0045, Protocol support
2452 @section XEP-0049 (Private XML Storage)
2454 jabber.el contains an implementation of XEP-0049; however it is not used
2455 for anything right now.
2457 @node XEP-0050, XEP-0054, XEP-0049, Protocol support
2458 @section XEP-0050 (Ad-Hoc Commands)
2460 jabber.el is probably the first implementation of XEP-0050 (see
2461 @uref{http://article.gmane.org/gmane.network.jabber.devel/21413, post
2462 on jdev from 2004-03-10}).  Both the client and server parts are
2463 supported.
2465 @node XEP-0054, XEP-0055, XEP-0050, Protocol support
2466 @section XEP-0054 (vcard-temp)
2468 Both displaying other users' vCards and editing your own vCard are
2469 supported.  The implementation tries to follow the schema in the XEP
2470 accurately.
2472 @node XEP-0055, XEP-0065, XEP-0054, Protocol support
2473 @section XEP-0055 (Jabber Search)
2475 XEP-0055 is supported, both with traditional fields and with Data Forms
2476 (@pxref{XEP-0004}).  As the traditional fields specified by the XEP is a
2477 subset of those allowed in XEP-0077, handling of those two form types
2478 are merged.  @xref{XEP-0077}.
2480 @node XEP-0065, XEP-0066, XEP-0055, Protocol support
2481 @section XEP-0065 (SOCKS5 Bytestreams)
2483 XEP-0065 is supported.  Currently jabber.el cannot act as a server, not
2484 even on on Emacsen that support server sockets (GNU Emacs 22 and up).
2485 Therefore it relies on proxies.  Proxies have to be entered and queried
2486 manually.
2488 Psi's ``fast mode''
2489 (@uref{http://delta.affinix.com/specs/stream.html}), which gives
2490 greater flexibility with regards to NAT, is not implemented.
2492 @node XEP-0066, XEP-0068, XEP-0065, Protocol support
2493 @section XEP-0066 (Out of Band Data)
2495 jabber.el will display URLs sent in message stanzas qualified by
2496 the @code{jabber:x:oob} namespace, as described in this XEP.  Sending
2497 such URLs or doing anything with iq stanzas (using the
2498 @code{jabber:iq:oob} namespace) is not supported.
2500 @node XEP-0068, XEP-0077, XEP-0066, Protocol support
2501 @section XEP-0068 (Field Standardization for Data Forms)
2503 XEP-0068 is only used in the context of creating a new Jabber account,
2504 to prefill the username field of the registration form.
2506 @node XEP-0077, XEP-0078, XEP-0068, Protocol support
2507 @section XEP-0077 (In-Band Registration)
2509 In-band registration is supported for all purposes.  That means
2510 registering a new Jabber account, changing Jabber password, removing a
2511 Jabber account, registering with a service, and cancelling
2512 registration to a service.  Data forms are supported as well.  URL
2513 redirections are not.
2515 jabber.el will not prevent or alert a user trying to change a password
2516 over an unencrypted connection.
2518 @node XEP-0078, XEP-0082, XEP-0077, Protocol support
2519 @section XEP-0078 (Non-SASL Authentication)
2521 Non-SASL authentication is supported, both plaintext and digest.
2522 Digest is preferred, and a warning is displayed to the user if only
2523 plaintext is available.
2525 @node XEP-0082, XEP-0085, XEP-0078, Protocol support
2526 @section XEP-0082 (Jabber Date and Time Profiles)
2528 The DateTime profile of XEP-0082 is supported.  Currently this is only
2529 used for file transfer.
2531 @node XEP-0085, XEP-0086, XEP-0082, Protocol support
2532 @section XEP-0085 (Chat State Notifications)
2534 XEP-0085 is partially supported. Currently only active/composing
2535 notifications are @emph{sent} though all five notifications are handled on
2536 receipt.
2538 @node XEP-0086, XEP-0090, XEP-0085, Protocol support
2539 @section XEP-0086 (Error Condition Mappings)
2541 Legacy errors are interpreted, but never generated.  XMPP style error
2542 messages take precedence when errors are reported to the user.
2544 @node XEP-0090, XEP-0091, XEP-0086, Protocol support
2545 @section XEP-0090 (Entity Time)
2547 jabber.el can query other entities for their time, and return the
2548 current time to those who ask.
2550 @node XEP-0091, XEP-0092, XEP-0090, Protocol support
2551 @section XEP-0091 (Delayed Delivery)
2553 The time specified on delayed incoming messages is interpreted, and
2554 displayed in chat buffers instead of the current time.
2556 @node XEP-0092, XEP-0095, XEP-0091, Protocol support
2557 @section XEP-0092 (Software Version)
2559 The user can request the version of any entity.  jabber.el answers
2560 version requests to anyone, giving ``jabber.el'' as name, and the
2561 Emacs version as OS.
2563 @node XEP-0095, XEP-0096, XEP-0092, Protocol support
2564 @section XEP-0095 (Stream Initiation)
2566 XEP-0095 is supported, both incoming and outgoing, except that jabber.el
2567 doesn't check service discovery results before sending a stream
2568 initiation request.
2570 @node XEP-0096, XEP-0146, XEP-0095, Protocol support
2571 @section XEP-0096 (File Transfer)
2573 Both sending and receiving files is supported.  If a suitable program is
2574 found, MD5 hashes of outgoing files are calculated and sent.  However,
2575 hashes of received files are not checked.  Ranged transfers are not
2576 supported.  In-band bytestreams are not yet supported, even though
2577 XEP-0096 requires them.
2579 @node XEP-0146, XEP-0153, XEP-0096, Protocol support
2580 @section XEP-0146 (Remote Controlling Clients)
2582 The ``set-status'' command in XEP-0146 is supported.
2584 @node XEP-0153,  , XEP-0146, Protocol support
2585 @section XEP-0153 (vCard-Based Avatars)
2587 vCard-based avatars are supported, both publishing and displaying.  The
2588 pixel size limits on avatars are not enforced.
2590 @node Concept index, Function index, Protocol support, Top
2591 @unnumbered Concept index
2593 @printindex cp
2595 @node Function index, Variable index, Concept index, Top
2596 @unnumbered Function index
2598 @printindex fn
2600 @node Variable index,  , Function index, Top
2601 @unnumbered Variable index
2603 @printindex vr
2605 @bye
2607 @ignore
2608    arch-tag: 995bf3da-0e87-4b15-895a-1e85fac139a2
2609 @end ignore