Revision: mange@freemail.hu--2005/emacs-jabber--cvs-head--0--patch-583
[emacs-jabber.git] / jabber.texi
blob82828c56542dc7ecbdadfd3556e9b42688b99e30
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 To hide activity notifications for some contacts, use
1267 @code{jabber-activity-banned} variable - just add boring JIDs (as
1268 regexps) here.
1270 For complete customizability, write a hook function for
1271 @code{jabber-activity-update-hook}.  From that function, you can take
1272 action based on @code{jabber-activity-jids},
1273 @code{jabber-activity-mode-string}, and
1274 @code{jabber-activity-count-string}.
1276 @node Watch buddies, Spell checking, Tracking activity, Useful features
1277 @section Watch buddies
1279 @cindex Watch
1280 @cindex Online notifications
1281 @findex jabber-watch-add
1282 @findex jabber-watch-remove
1284 Sometimes you might be waiting for a certain person to come online,
1285 and you don't want that occasion to get lost in the noise.  To get an
1286 obtrusive message when that happens, type @kbd{M-x jabber-watch-add}
1287 and select the person in question.  You can enter a comment, to
1288 remember why you added the watch.
1290 You will get a message whenever that person goes from offline to
1291 online.  jabber.el will remember this for the rest of your Emacs
1292 session (it's not saved to disk, though), but if you want to get rid
1293 of it, type @kbd{M-x jabber-watch-remove}.
1295 @node Spell checking,  , Watch buddies, Useful features
1296 @section Spell checking
1298 @cindex flyspell
1299 @cindex Spell checking
1301 You can activate spell checking in a chat buffer with @kbd{M-x
1302 flyspell-mode}.  It will check only what you are currently writing, not
1303 what you receive or what you have already sent.  You may want to add
1304 @code{flyspell-mode} to @code{jabber-chat-mode-hook}.
1306 For more information about Emacs spell checking, @pxref{Spelling, ,
1307 Checking and Correcting Spelling, emacs, GNU Emacs Manual}.
1309 @node Message history, Typing notifications, Useful features, Top
1310 @chapter Message history
1312 @cindex History
1313 @cindex Backlog
1314 @findex jabber-truncate-top
1315 @findex jabber-truncate-muc
1316 @findex jabber-truncate-chat
1317 @vindex jabber-history-enabled
1318 @vindex jabber-global-history-filename
1319 @vindex jabber-use-global-history
1320 @vindex jabber-history-dir
1321 @vindex jabber-history-enable-rotation
1322 @vindex jabber-history-size-limit
1323 @vindex jabber-backlog-number
1324 @vindex jabber-backlog-days
1325 @vindex jabber-log-lines-to-keep
1327 If you want a record of messages sent and received, set
1328 @code{jabber-history-enabled} to t.  By default all messages will
1329 be saved to a global history file specified by
1330 @code{jabber-global-history-filename}
1331 (@file{~/.jabber_global_message_log} by default).  If you prefer to
1332 store your chats' history in per-contact files, you can set
1333 @code{jabber-use-global-history} to @code{nil}.  When using
1334 per-contact history, files are named by the contact JID and saved
1335 under the directory specified by the variable
1336 @code{jabber-history-dir} (default is @file{~/.emacs-jabber}).
1338 When you open a new chat buffer and have entries in your history file,
1339 the last few messages you recently exchanged with the contact in
1340 question will be inserted.  You can control how many messages with
1341 @code{jabber-backlog-number} (by default 10), and how old messages
1342 with @code{jabber-backlog-days} (by default 3 days).
1344 @findex jabber-chat-display-more-backlog
1345 If you want to see more messages, use the function
1346 @code{jabber-chat-display-more-backlog}, available in the Chat menu.
1347 This is currently the only way to view the message history, apart from
1348 opening the history files manually.
1350 @cindex Rotation of history files
1351 @cindex History file rotation
1352 If you worry about your history file(s) size, you can enable history
1353 rotation feature by setting the variable
1354 @code{jabber-history-enable-rotation} to @code{t} (default is
1355 @code{nil}).  This feature ``rotates'' your history files according to
1356 the following rule: When @code{jabber-history-size-limit} (in
1357 kilobytes) is reached, the @var{history-file} is renamed to
1358 @file{@var{history-file}-@var{number}}, where @var{number} is 1 or the smallest number
1359 after the last rotation.
1361 For example, suppose you set the
1362 @code{jabber-history-size-limit} variable to 512 and you chat with
1363 your buddy @samp{foo@@jabber.server} using the per-contact strategy to store
1364 history files.  So, when the history file (@file{foo@@jabber-server})
1365 reaches 512K bytes, it will be renamed to @file{foo@@jabber-server-1}
1366 and @file{foo@@jabber-server} will be set empty. Next time
1367 @file{foo@@jabber-server} grows to 512K bytes, it will be saved as
1368 @file{foo@@jabber-server-2} and so on.  Although the example was
1369 presented with the per-contact history file strategy, history rotation
1370 works for both per-contact and global history logging strategies.
1372 @cindex Truncate
1373 @cindex Truncation
1374 If you also want to keep chat and groupchat buffers from growing too
1375 much, you can customize @code{jabber-alert-message-hooks} and
1376 @code{jabber-alert-muc-hooks} by adding truncation upon receiving
1377 message (@code{jabber-truncate-chat} and @code{jabber-truncate-muc}, respectively).
1378 The truncation limit may be set by customizing the variable
1379 @code{jabber-log-lines-to-keep}.
1381 @node Typing notifications, Roster import and export, Message history, Top
1382 @chapter Typing notifications
1384 There are two protocols for ``contact is typing'' notifications in
1385 Jabber.  jabber.el supports both of them, displaying various information
1386 in the header line of chat buffers.
1388 @section Message events
1390 @cindex Composing
1391 @cindex Delivered
1392 @cindex Displayed
1393 @vindex jabber-events-request-these
1394 @vindex jabber-events-confirm-delivered
1395 @vindex jabber-events-confirm-displayed
1396 @vindex jabber-events-confirm-composing
1398 The older protocol is called Message Events (@pxref{XEP-0022}).  Besides
1399 typing notification, it lets you know what happens to the messages you send.
1400 These states are possible:
1402 @itemize @bullet
1403 @item
1404 @samp{In offline storage} (the user will receive it on next logon)
1406 @item
1407 @samp{Delivered} to user's client (but not necessarily displayed)
1409 @item
1410 @samp{Displayed} to user
1412 @item
1413 User is @samp{typing a message}
1415 @end itemize
1417 The first state is only reported by servers; the other three are
1418 reported by clients.  jabber.el can report all three of them, and can
1419 display all four; not all clients support all states, though.
1421 If you don't want jabber.el to send out this information about you, set
1422 the variables @code{jabber-events-confirm-delivered},
1423 @code{jabber-events-confirm-displayed}, and/or
1424 @code{jabber-events-confirm-composing} to nil.  You can make jabber.el
1425 not to request such information by customizing
1426 @code{jabber-events-request-these}.
1428 @section Chat states
1430 @vindex jabber-chatstates-confirm
1432 The newer protocol is called Chat States (@pxref{XEP-0085}).  Rather
1433 than dealing with individual messages, it describes the state of the
1434 chat session between two people.  The following states are possible:
1436 @itemize @bullet
1437 @item
1438 Active (the default state, not displayed)
1440 @item
1441 Inactive
1443 @item
1444 Composing
1446 @item
1447 Paused (i.e., taking a short pause in composing)
1449 @item
1450 Gone
1452 @end itemize
1454 jabber.el can display all five states, but only ever sends ``active''
1455 and ``composing'' itself.
1457 To customize sending of chat states, customize the variable
1458 @code{jabber-chatstates-confirm}.
1461 @node Roster import and export, XMPP URIs, Typing notifications, Top
1462 @chapter Roster import and export
1464 @findex jabber-export-roster
1465 @findex jabber-import-roster
1466 @cindex Export roster
1467 @cindex Import roster
1469 Your roster is saved on the Jabber server, and usually not in the
1470 client.  However, you might want to save the roster to a file anyway.
1471 The most common reason for this is probably to copy it to another
1472 account.
1474 To export your roster to a file, type @kbd{M-x jabber-export-roster}.
1475 A buffer will appear in which you can edit the data to be exported.
1476 Changes done in that buffer will not affect your real roster.
1478 To import your roster from a file, type @kbd{M-x jabber-import-roster}.
1479 You will be able to edit the data before importing it.  Items not in the
1480 roster will be added; items in the roster will be modified to match
1481 imported data.  Subscriptions will be updated.
1483 The format of the roster files is the XML used by roster pushes in the
1484 XMPP protocol, in UTF-8 encoding.
1486 @node XMPP URIs, Customization, Roster import and export, Top
1487 @chapter XMPP URIs
1489 @cindex URIs
1490 @cindex URLs
1491 @cindex links
1492 @cindex xmpp: links
1493 @cindex Mozilla integration
1494 @cindex web browser integration
1495 @cindex browser integration
1496 @findex jabber-handle-uri
1498 Many web page authors use links starting with @samp{xmpp:} for JIDs.
1499 Your web browser could be made to pass such links to jabber.el, so that
1500 such links are actually useful and not just decoration.  How to do that
1501 depends on your operating system and web browser.
1503 @section Mozilla and Unix
1505 If you use a Mozilla-based web browser on a Unix-like operating system,
1506 follow these steps.
1508 @enumerate
1509 @item
1510 Make sure you are running the Emacs server.  @xref{Emacs Server, , Using
1511 Emacs as a Server, emacs, GNU Emacs Manual}.
1513 @item
1514 Note the path of the @file{xmppuri.sh} file in the jabber.el
1515 distribution, and make sure it is executable.
1517 @item
1518 Set the Mozilla preference @samp{network.protocol-handler.app.xmpp} to
1519 the path of @file{xmppuri.sh}.  There are two ways to do this:
1521 @itemize
1522 @item
1523 Go to the URL @samp{about:config}, right-click in the list, choose ``New
1524 string'', and enter @samp{network.protocol-handler.app.xmpp} and the
1525 path in the following dialogs.
1527 @item
1528 Open or create the file @file{user.js} in your Mozilla profile directory
1529 (in the same directory as @file{prefs.js}), and add the following line:
1531 @example
1532 user_pref("network.protocol-handler.app.xmpp",
1533   "@var{/path/to}/xmppuri.sh");
1534 @end example
1536 Restart Mozilla for this change to take effect.
1537 @end itemize
1538 @end enumerate
1540 @section Other systems
1542 If you know how to pass an XMPP URI from your browser to the function
1543 @code{jabber-handle-uri}, your contribution for this section would be
1544 appreciated.
1546 @node Customization, Hacking and extending, XMPP URIs, Top
1547 @chapter Customization
1549 @findex jabber-customize
1550 @cindex Customization
1552 jabber.el is intended to be customizable for many tastes.  After all,
1553 this is Emacs.  To open a customization buffer for jabber.el, type
1554 @kbd{M-x jabber-customize}.
1556 @menu
1557 * Account settings::            
1558 * Menu::                        
1559 * Customizing the roster buffer::  
1560 * Customizing the chat buffer::  
1561 * Customizing alerts::          
1562 * Hooks::                       
1563 * Debug options::               
1564 @end menu
1566 @node Account settings, Menu, Customization, Customization
1567 @section Account settings
1569 @cindex Username
1570 @cindex Resource
1571 @cindex Password
1572 @cindex JID
1573 @cindex Network server
1575 All account settings reside in the variable @code{jabber-account-list}.
1576 Usually you only need to set the JID, in the form
1577 @samp{username@@server} (or @samp{username@@server/resource} to use a
1578 specific resource name).  These are the other account options:
1580 @table @asis
1581 @item Disabled
1582 If the account is disabled, @code{jabber-connect-all} will not attempt
1583 to connect it.  You can still connect it manually with
1584 @code{jabber-connect}.
1586 @item Password
1587 You can set the password of the account, so you don't have to enter it
1588 when you connect.  Note that it will be stored unencrypted in your
1589 customization file.
1591 @item Network server
1592 If the JID of the Jabber server is not also its DNS name, you may have
1593 to enter the real DNS name or IP address of the server here.
1595 @item Connection type
1596 This option specifies whether to use an encrypted connection to the
1597 server.  Usually you want ``STARTTLS'' (@code{starttls}), which means
1598 that encryption is activated if the server supports it.  The other
1599 possibilities are ``unencrypted'' (@code{network}), which means just
1600 that, and ``legacy SSL/TLS'' (@code{ssl}), which means that encryption
1601 is activated on connection.
1603 @item Port
1604 If the Jabber server uses a nonstandard port, specify it here.  The
1605 default is 5222 for STARTTLS and unencrypted connections, and 5223 for
1606 legacy SSL connections.
1607 @end table
1609 @subsection For Google Talk
1611 @cindex Google Talk
1613 If you have a very new version of @file{dns.el},@footnote{Specifically,
1614 you need Emacs 23, or No Gnus 0.3.} you can connect to
1615 Google Talk just by specifying your Gmail address as JID.  Otherwise,
1616 you also need to set
1617 ``network server'' to @kbd{talk.google.com} and ``connection type'' to
1618 ``legacy SSL''.
1620 @subsection Upgrade note
1622 Previous versions of jabber.el had the variables @code{jabber-username},
1623 @code{jabber-server}, @code{jabber-resource} and
1624 @code{jabber-password}.  These are now obsolete and not used.
1626 @node Menu, Customizing the roster buffer, Account settings, Customization
1627 @section Menu
1629 @findex jabber-menu
1630 @cindex Menus
1632 If you want a Jabber menu on the menu bar with some common commands,
1633 type @kbd{M-x jabber-menu}.  You can remove it again with @kbd{C-u M-x
1634 jabber-menu}.  Unfortunately, this cannot be changed through Customize
1635 settings, so you need to add @code{(jabber-menu)} to your @file{.emacs}
1636 to enable it permanently.
1638 @node Customizing the roster buffer, Customizing the chat buffer, Menu, Customization
1639 @section Customizing the roster buffer
1641 @cindex Roster buffer, customizing
1643 @cindex Sorting the roster
1644 @vindex jabber-roster-sort-functions
1645 @code{jabber-roster-sort-functions} controls how roster items are
1646 sorted.  By default, contacts are sorted first by presence, and then
1647 alphabetically by displayed name.
1649 @vindex jabber-sort-order
1650 @code{jabber-sort-order} controls how roster items are sorted by
1651 presence.  It is a list containing strings corresponding to show
1652 status (@pxref{Presence}) or @code{nil}, which represents offline.
1654 @vindex jabber-show-resources
1655 @code{jabber-show-resources} controls when your contacts' resources
1656 are shown in the roster buffer.  The default is to show resources when
1657 a contact has more than one connected resource.
1659 @vindex jabber-roster-line-format
1660 @code{jabber-roster-line-format} specifies how the entry for each
1661 contact looks.  It is a string where some characters are special if
1662 preceded by a percent sign:
1664 @table @code
1665 @item %a
1666 Avatar of contact, if any
1667 @item %c
1668 @samp{*} if the contact is connected, or @samp{ } if not
1669 @item %u
1670 Subscription state---see below
1671 @item %n
1672 Nickname of contact, or JID if no nickname
1673 @item %j
1674 Bare JID of contact (without resource)
1675 @item %r
1676 Highest-priority resource of contact
1677 @item %s
1678 Availability of contact as a string ("Online", "Away" etc)
1679 @item %S
1680 Status string specified by contact
1681 @end table
1683 @code{%u} is replaced by one of the strings given by
1684 `jabber-roster-subscription-display'.
1686 @vindex jabber-resource-line-format
1687 @code{jabber-resource-line-format} is nearly identical, except that
1688 the values correspond to the values of the resource in question, and
1689 that the @code{%p} escape is available, which inserts the priority of
1690 the resource.
1692 @vindex jabber-roster-buffer
1693 @code{jabber-roster-buffer} specifies the name of the roster buffer.
1694 If you change this, the new name will be used the next time the roster
1695 is redisplayed.
1697 @vindex jabber-roster-show-bindings
1698 @code{jabber-roster-show-bindings} controls whether to show a list of
1699 keybindings at the top of the roster buffer.  You need to run @kbd{M-x
1700 jabber-display-roster} after changing this variable to update the display.
1702 @node Customizing the chat buffer, Customizing alerts, Customizing the roster buffer, Customization
1703 @section Customizing the chat buffer
1705 @cindex Chat buffer
1706 @cindex Timestamps
1707 @cindex Faces, chat buffer
1709 You can customize the look of the prompts in the chat buffer.  There
1710 are separate settings for local text (i.e. what you write) and foreign text
1711 (i.e. what other people write).
1713 @vindex jabber-chat-text-local
1714 @vindex jabber-chat-text-foreign
1715 @code{jabber-chat-text-local} and @code{jabber-chat-text-foreign}
1716 determine the faces used for chat messages.
1718 @vindex jabber-chat-prompt-local
1719 @vindex jabber-chat-prompt-foreign
1720 @code{jabber-chat-prompt-local} and @code{jabber-chat-prompt-foreign}
1721 determine the faces used for the prompts.
1723 @vindex jabber-chat-local-prompt-format
1724 @vindex jabber-chat-foreign-prompt-format
1725 @code{jabber-chat-local-prompt-format} and
1726 @code{jabber-chat-foreign-prompt-format} determine what text is
1727 displayed in the prompts.  They are format strings, with the following
1728 special sequences defined:
1730 @table @code
1731 @item %t
1732 The time when the message was sent or received
1733 @item %n
1734 The nickname of the user.  For the foreign prompt, this is the name of
1735 the contact in the roster, or the JID if no name set.  For the local
1736 prompt, this is the username part of your JID.
1737 @item %u
1738 The username of the user (i.e. the first part of the JID).
1739 @item %r
1740 The resource.
1741 @item %j
1742 The bare JID of the user
1743 @end table
1745 @cindex Timestamp format
1746 @vindex jabber-chat-time-format
1747 @code{jabber-chat-time-format} defines how @code{%t} shows time.  Its
1748 format is identical to that passed to @code{format-time-string}.
1749 @xref{Time Conversion, , Time Conversion, elisp, GNU Emacs Lisp
1750 Reference Manual}.
1752 @vindex jabber-chat-delayed-time-format
1753 @code{jabber-chat-delayed-time-format} is used instead of
1754 @code{jabber-chat-time-format} for delayed messages (messages sent while
1755 you were offline, or fetched from history).  This way you can have short
1756 timestamps everywhere except where you need long ones.  You can always
1757 see the complete timestamp in a tooltip by hovering over the prompt with
1758 the mouse.
1760 @cindex Rare timestamps
1761 @vindex jabber-print-rare-time
1762 @vindex jabber-rare-time-format
1763 @vindex jabber-chat-text-local
1764 By default, timestamps are printed in the chat buffer every hour (at
1765 ``rare'' times).  This can be toggled with
1766 @code{jabber-print-rare-time}.  You can customize the displayed time by
1767 setting @code{jabber-rare-time-format}.  Rare timestamps will be printed
1768 whenever time formatted by that format string would change.
1770 @cindex Header line of chat buffers
1771 @vindex jabber-chat-header-line-format
1772 @vindex jabber-muc-header-line-format
1773 You can also customize the header line of chat buffers, by modifying
1774 the variable @code{jabber-chat-header-line-format}.  The format of
1775 that variable is the same as that of @code{mode-line-format} and
1776 @code{header-line-format}.  @xref{Mode Line Format, , Mode-Line
1777 Format, elisp, GNU Emacs Lisp Reference Manual}.  For MUC buffers,
1778 @code{jabber-muc-header-line-format} is used instead.
1780 @vindex jabber-chat-fill-long-lines
1781 @cindex Filling long lines in chat buffer
1782 The variable @code{jabber-chat-fill-long-lines} controls whether long
1783 lines in the chat buffer are wrapped.
1785 @node Customizing alerts, Hooks, Customizing the chat buffer, Customization
1786 @section Customizing alerts
1788 @cindex Alert hooks
1789 @findex define-jabber-alert
1791 When an event happens (currently including presence changes, incoming
1792 messages, and completed queries) you will usually want to be
1793 notified.  Since tastes in this area vary wildly, these alerts are
1794 implemented as hooks, so you can choose which ones you want, or write
1795 your own if none fit.
1797 Actually, if you don't want to write your own, stop reading this
1798 section and just read @ref{Standard alerts}.
1800 Many kinds of alerts consist in displaying a text message through a
1801 certain mechanism.  This text message is provided by a function which
1802 you can rewrite or replace.  If this function returns @code{nil}, no
1803 message is displayed, and non-textual alerts refrain from action.
1805 If you want to write alert hooks that do nothing except displaying the
1806 supplied message in some way, use the macro
1807 @code{define-jabber-alert}.  For example, if @var{foo} is a function
1808 that takes a string as an argument, write
1809 @example
1810 (define-jabber-alert foo
1811   "Display a message in a fooish way"
1812   'foo)
1813 @end example
1814 @noindent
1815 and all details will be taken care of for you.
1817 The hooks take different arguments depending on category.  However,
1818 they all have in common that the last argument is the result of the
1819 message function.  The message function for each category takes the
1820 same arguments as the corresponding hooks, except for that last
1821 argument.
1823 Alert hook contributions are very welcome.  You can send them to the
1824 mailing list, or to the Sourceforge patch tracker.
1826 Alert hooks are meant for optional UI things, that are subject to
1827 varying user tastes, and that can be toggled by simply adding or
1828 removing the function to and from the hook.  For other purposes, there
1829 are corresponding general hooks, that are defvars instead of
1830 defcustoms, and that are meant to be managed by Lisp code.  They have the
1831 same name as the alert hooks minus the @code{-alert} part,
1832 e.g. @code{jabber-message-hooks} vs @code{jabber-alert-message-hooks},
1833 etc.
1835 @menu
1836 * Standard alerts::             
1837 * Presence alerts::             
1838 * Message alerts::              
1839 * MUC alerts::                  
1840 * Info alerts::                 
1841 @end menu
1843 @node Standard alerts, Presence alerts, Customizing alerts, Customizing alerts
1844 @subsection Standard alerts
1846 @cindex Alerts
1847 @cindex Scroll
1849 Thirteen alerts are already written for all four alert categories.  These
1850 all obey the result from the corresponding message function.
1852 The @code{beep} alerts simply sound the terminal bell by calling
1853 @code{ding}.  They are disabled by default.
1855 The @code{echo} alerts display a message in the echo area by calling
1856 @code{message}.  They are enabled by default.
1858 The @code{switch} alerts switch to the buffer where the event occurred
1859 (chat buffer for incoming messages, roster buffer for presence
1860 changes, browse buffer for completed queries).  They are disabled by
1861 default.  Take care when using them, as they may interrupt your
1862 editing.
1864 The @code{display} alerts display but do not select the buffer in
1865 question, using the function @code{display-buffer}.  @xref{Choosing
1866 Window, , Choosing a Window for Display, elisp, GNU Emacs Lisp
1867 Reference Manual}, for information about customizing its behaviour.
1868 This is enabled by default for info requests.
1870 @cindex Sound effects
1871 The @code{wave} alerts play a sound file by calling
1872 @code{play-sound-file}.  No sound files are provided.  To use this,
1873 enter the names of the sound files in
1874 @code{jabber-alert-message-wave}, @code{jabber-alert-presence-wave}
1875 and @code{jabber-alert-info-wave}, respectively.  You can specify
1876 specific sound files for contacts matching a regexp in the variables
1877 @code{jabber-alert-message-wave-alist} and
1878 @code{jabber-alert-presence-wave-alist}.
1880 @cindex Screen terminal manager
1881 The @code{screen} alerts send a message through the Screen terminal
1882 manager@footnote{See @uref{http://www.gnu.org/software/screen/}.}.  They do no
1883 harm if called when you don't use Screen.
1885 @cindex Ratpoison window manager
1886 @cindex Window manager, Ratpoison
1887 The @code{ratpoison} alerts send a message through the Ratpoison
1888 window manager@footnote{See @uref{http://ratpoison.sourceforge.net/}.}.  They
1889 do no harm if used when you're not running X, but if you are running X
1890 with another window manager, the ratpoison processes will never exit.
1891 Emacs doesn't hold on to them, though.
1893 @cindex Sawfish window manager
1894 @cindex Window manager, Sawfish
1895 The @code{sawfish} alerts send a message through the Sawfish window
1896 manager.
1898 @cindex wmii window manager
1899 @cindex Window manager, wmii
1900 The @code{wmii} alerts display a message through the wmii window
1901 manager.
1903 @cindex xmessage
1904 @vindex jabber-xmessage-timeout
1905 The @code{xmessage} alerts send a message through the standard
1906 @code{xmessage} tool.  The variable @code{jabber-xmessage-timeout}
1907 controls how long the alert appears.
1909 @cindex OSD
1910 The @code{osd} alerts send a message onto your screen using
1911 XOSD.@footnote{XOSD can be found at
1912 @uref{http://www.ignavus.net/software.html}.  You also need
1913 @file{osd.el} from @uref{http://www.brockman.se/software/osd.el}.}
1915 @cindex libnotify
1916 @cindex notification-daemon
1917 The @code{libnotify} alerts send a message onto your screen using
1918 @code{notification-daemon}.
1920 @cindex Festival speech synthesis
1921 @cindex Speech synthesis, Festival
1922 The @code{festival} alerts speak the message using the Emacs interface
1923 of the Festival speech synthesis system@footnote{See
1924 @uref{http://www.cstr.ed.ac.uk/projects/festival/}.}.
1926 @cindex Autoanswerer
1927 The @code{autoanswer} alert is kind of special: it will not show you
1928 message/muc alert, but instead will automaticaly answer to sender. See
1929 variable `jabber-autoanswer-alist' description for details.
1931 @cindex Scroll chat buffers
1932 Additionally, for one-to-one and MUC messages, there are @code{scroll}
1933 alerts (enabled by default), that aim to do the right thing with chat
1934 buffers that are visible but not active.  Sometimes you want point to
1935 scroll down, and sometimes not.  These functions should do what you
1936 mean; if they don't, it's a bug.
1938 Also, in MUC you can use a family of so-called ``personal'' alerts.
1939 They are like other MUC alerts, but fire only on incoming messages
1940 addresed directly to you (also known as ``private messages'').  One
1941 example of such an alert is @code{jabber-muc-echo-personal}, which shows
1942 a note for an MUC message only if it was addressed to you.
1944 Some of these functions are in the @file{jabber-alert.el} file, and the
1945 others are in their own files.  You can use them as templates or
1946 inspiration for your own alerts.
1948 @node Presence alerts, Message alerts, Standard alerts, Customizing alerts
1949 @subsection Presence alerts
1951 @vindex jabber-alert-presence-message-function
1952 @findex jabber-presence-default-message
1954 Set @code{jabber-alert-presence-message-function} to your desired
1955 function.  This function should look like:
1957 @example
1958 (defun @var{function} (@var{who} @var{oldstatus} @var{newstatus} @var{statustext})
1959    ...
1960    )
1961 @end example
1963 @var{who} is the JID symbol (@pxref{JID symbols}),
1964 @var{oldstatus} and @var{newstatus} are the previous and current
1965 stati, respectively, and @var{statustext} is the status message if
1966 provided, otherwise nil.
1968 @var{oldstatus} and @var{newstatus} can be one of @code{""}
1969 (i.e. online), @code{"away"}, @code{"xa"}, @code{"dnd"}, @code{"chat"},
1970 @code{"error"} and @code{nil} (i.e. offline).
1972 @var{newstatus} can also be one of @code{"subscribe"},
1973 @code{"subscribed"}, @code{"unsubscribe"} and @code{"unsubscribed"}.
1975 The default function, @code{jabber-presence-default-message}, returns
1976 @code{nil} if @var{oldstatus} and @var{newstatus} are the same, and in
1977 other cases constructs a message from the given data.
1979 All presence alert hooks take the same arguments plus the additional
1980 @var{proposed-alert}, which is the result of the specified message
1981 function.  This last argument is usually the only one they use.
1983 @node Message alerts, MUC alerts, Presence alerts, Customizing alerts
1984 @subsection Message alerts
1986 @vindex jabber-alert-message-function
1987 @findex jabber-message-default-message
1989 Set @code{jabber-alert-message-function} to your desired
1990 function.@footnote{Logically it should be
1991 @code{jabber-alert-message-message-function}, but that would be
1992 really ugly.}  This function should look like:
1994 @example
1995 (defun @var{function} (@var{from} @var{buffer} @var{text})
1996    ...
1997    )
1998 @end example
2000 @var{from} is the JID symbol (@pxref{JID symbols}), @var{buffer}
2001 is the buffer where the message is displayed, and @var{text} is the
2002 text of the message.
2004 The default function, @code{jabber-message-default-message}, returns
2005 ``Message from @var{person}'', where @var{person} is the name of the
2006 person if specified in the roster, otherwise the JID.
2008 All message alert hooks take the same arguments plus the additional
2009 @var{proposed-alert}, which is the result of the specified message
2010 function.
2012 @vindex jabber-message-alert-same-buffer
2013 If you don't want message alerts when the chat buffer in question is
2014 already the current buffer, set @code{jabber-message-alert-same-buffer}
2015 to nil.  This affects the behaviour of the default message function, so
2016 you'll have to reimplement this functionality if you write your own
2017 message function.
2019 @node MUC alerts, Info alerts, Message alerts, Customizing alerts
2020 @subsection MUC alerts
2022 @vindex jabber-alert-muc-function
2023 @vindex jabber-muc-alert-self
2024 @findex jabber-muc-default-message
2026 Set @code{jabber-alert-muc-function} to your desired
2027 function.  This function should look like:
2029 @example
2030 (defun @var{function} (@var{nick} @var{group} @var{buffer} @var{text})
2031    ...
2032    )
2033 @end example
2035 @var{nick} is the nickname, @var{group} is the JID of the group,
2036 @var{buffer} is the buffer where the message is displayed, and
2037 @var{text} is the text of the message.
2039 The default function, @code{jabber-muc-default-message}, returns
2040 ``Message from @var{nick} in @var{group}'' or ``Message in
2041 @var{group}'', the latter for messages from the room itself.
2043 All MUC alert hooks take the same arguments plus the additional
2044 @var{proposed-alert}, which is the result of the specified message
2045 function.
2047 By default, no alert is made for messages from yourself.  To change
2048 that, customize the variable @code{jabber-muc-alert-self}.
2050 @node Info alerts,  , MUC alerts, Customizing alerts
2051 @subsection Info alerts
2053 @vindex jabber-alert-info-message-function
2054 @findex jabber-info-default-message
2056 Info alerts are sadly underdeveloped.  The message function,
2057 @code{jabber-alert-info-message-function}, takes two arguments,
2058 @var{infotype} and @var{buffer}.  @var{buffer} is the buffer where
2059 something happened, and @var{infotype} is either @code{'roster} for
2060 roster updates, or @code{'browse} for anything that uses the browse
2061 buffer (basically anything except chatting).
2063 The info alert hooks take an extra argument, as could be expected.
2065 @node Hooks, Debug options, Customizing alerts, Customization
2066 @section Hooks
2068 jabber.el provides various hooks that you can use for whatever
2069 purpose.
2071 @table @code
2072 @vindex jabber-post-connect-hooks
2073 @item jabber-post-connect-hooks
2074 This hook is called after successful connection and authentication.
2075 By default it contains @code{jabber-send-current-presence}
2076 (@pxref{Presence}).  The hook functions get the connection object as
2077 argument.
2079 @vindex jabber-lost-connection-hooks
2080 @item jabber-lost-connection-hooks
2081 This hook is called when you have been disconnected for unknown
2082 reasons.  Usually this isn't noticed for quite a long time.
2084 The hook is called with one argument: the connection object.
2086 @vindex jabber-pre-disconnect-hook
2087 @item jabber-pre-disconnect-hook
2088 This hook is called just before voluntary disconnection, i.e. in
2089 @code{jabber-disconnect}, the command to disconnect all accounts.  There
2090 is currently no hook for disconnection of a single account.
2092 @vindex jabber-post-disconnect-hook
2093 @item jabber-post-disconnect-hook
2094 This hook is called after disconnection of any kind, possibly just
2095 after @code{jabber-lost-connection-hook}.
2097 @vindex jabber-chat-mode-hook
2098 @item jabber-chat-mode-hook
2099 This hook is called when a new chat buffer is created.
2101 @vindex jabber-browse-mode-hook
2102 @item jabber-browse-mode-hook
2103 This hook is called when a new browse buffer is created.
2105 @vindex jabber-roster-mode-hook
2106 @item jabber-roster-mode-hook
2107 This hook is called when the roster buffer is created.
2109 @end table
2111 @node Debug options,  , Hooks, Customization
2112 @section Debug options
2114 These settings provide a lot of information which is usually not very
2115 interesting, but can be useful for debugging various things.
2117 @vindex jabber-debug-log-xml
2118 @cindex XML log
2119 @code{jabber-debug-log-xml} activates XML logging.  All XML stanzas
2120 sent and received are logged in the buffer @code{*-jabber-xml-log-@var{jid}-*}
2121 in list format.  @xref{XML representation}.
2123 @vindex jabber-debug-keep-process-buffers
2124 Usually, the process buffers for Jabber connections are killed when the
2125 connection is closed, as they would otherwise just fill up memory.
2126 However, they might contain information about why the connection was
2127 lost.  To keep process buffers, set
2128 @code{jabber-debug-keep-process-buffers} to @code{t}.
2130 @node Hacking and extending, Protocol support, Customization, Top
2131 @chapter Hacking and extending
2133 This part of the manual is an attempt to explain parts of the source
2134 code.  It is not meant to discourage you from reading the code
2135 yourself and trying to figure it out, but as a guide on where to
2136 look.  Knowledge of Jabber protocols is assumed.
2138 @menu
2139 * Connection object::           
2140 * XML representation::          
2141 * JID symbols::                 
2142 * Listening for new requests::  
2143 * Sending new requests::        
2144 * Extending service discovery::  
2145 * Chat printers::               
2146 * Stanza chains::               
2147 @end menu
2149 @node Connection object, XML representation, Hacking and extending, Hacking and extending
2150 @section Connection object
2151 @cindex connection object
2152 @cindex account object
2153 @cindex FSM
2155 Each Jabber connection is represented by a ``connection object''.  This
2156 object has the form of a finite state machine, and is realized by the
2157 library @code{fsm}.@footnote{So far, this library is only distributed
2158 with jabber.el.  The author hopes that it could be useful for other
2159 projects, too.}
2161 The various states of this object are defined in @file{jabber-core.el}.
2162 They describe the way of the connection through the establishing of a
2163 network connection and authentication, and finally comes to the
2164 @code{:session-established} state where ordinary traffic takes place.
2166 These details are normally opaque to an extension author.  As will be
2167 noted, many functions expect to receive a connection object, and
2168 functions at extension points generally receive such an object in order
2169 to pass it on.  The following functions simply query the internal state
2170 of the connection:
2172 @defun jabber-connection-jid connection
2173 The @code{jabber-connection-jid} function returns the full JID of
2174 @var{connection}, i.e. a string of the form
2175 @code{"username@@server/resource"}.
2176 @end defun
2178 @defun jabber-connection-bare-jid connection
2179 The @code{jabber-connection-bare-jid} function returns the bare JID of
2180 @var{connection}, i.e. a string of the form @code{"username@@server"}.
2181 @end defun
2183 @node XML representation, JID symbols, Connection object, Hacking and extending
2184 @section XML representation
2186 @cindex XML representation
2188 The XML representation is the one generated by @file{xml.el} in Emacs,
2189 namely the following.  Each tag is a list.  The first element of the
2190 list is a symbol, the name of which is the name of the tag.  The
2191 second element is an alist of attributes, where the keys are the
2192 attribute names in symbol form, and the values are strings.  The
2193 remaining elements are the tags and data contained within the tag.
2195 For example,
2196 @example
2197 <foo bar='baz'>
2198 <frobozz/>Fnord
2199 </foo>
2200 @end example
2201 is represented as
2202 @example
2203 (foo ((bar . "baz")) (frobozz nil "") "Fnord
2205 @end example
2207 Note the empty string as the third element of the @code{frobozz}
2208 list.  It is not present in newer (post-21.3) versions of
2209 @file{xml.el}, but it's probably best to assume it might be there.
2211 @defun jabber-sexp2xml xml-sexp
2212 This function takes a tag in list representation, and returns its XML
2213 representation as a string.  You will normally not need to use this
2214 function directly, but it can be useful to see how your sexps will look
2215 when sent to the outer, non-Lisp, world.
2216 @end defun
2218 @defun jabber-send-sexp connection sexp
2219 This function sends @var{sexp}, an XMPP stanza in list representation,
2220 and sends it over @var{connection}.
2222 You will normally use the functions @code{jabber-send-presence},
2223 @code{jabber-send-message} and @code{jabber-send-iq} instead of this
2224 function.
2225 @end defun
2227 @node JID symbols, Listening for new requests, XML representation, Hacking and extending
2228 @section JID symbols
2230 @vindex jabber-jid-obarray
2231 JIDs are sometimes represented as symbols.  Its name is the JID, and it is interned
2232 in @code{jabber-jid-obarray}.  A roster entry can have the following
2233 properties:
2235 @table @code
2236 @item xml
2237 The XML tag received from the server on roster update
2239 @item name
2240 The name of the roster item (just like the XML attribute)
2242 @item subscription
2243 The subscription state; a string, one of @code{"none"}, @code{"from"},
2244 @code{"to"} and @code{"both"}
2246 @item ask
2247 The ask state; either @code{nil} or @code{"subscribe"}
2249 @item groups
2250 A list of strings (possibly empty) containing all the groups the
2251 contact is in
2253 @item connected
2254 Boolean, true if any resource is connected
2256 @item show
2257 Presence show value for highest-priority connected resource; a string,
2258 one of @code{""} (i.e. online), @code{"away"}, @code{"xa"},
2259 @code{"dnd"}, @code{"chat"}, @code{"error"} and @code{nil}
2260 (i.e. offline)
2262 @item status
2263 Presence status message for highest-priority connected resource
2265 @item resources
2266 Alist.  Keys are strings (resource names), values are plists with
2267 properties @code{connected}, @code{show}, @code{status} and
2268 @code{priority}.
2270 @end table
2272 Incoming presence information is inserted in @code{resources}, and the
2273 information from the resource with the highest priority is inserted in
2274 @code{show} and @code{status} by the function
2275 @code{jabber-prioritize-resources}.
2277 @node Listening for new requests, Sending new requests, JID symbols, Hacking and extending
2278 @section Listening for new requests
2280 @findex jabber-send-iq
2281 @findex jabber-process-iq
2282 @findex jabber-signal-error
2283 @vindex jabber-iq-get-xmlns-alist
2284 @vindex jabber-iq-set-xmlns-alist
2286 To listen for new IQ requests, add the appropriate entry in
2287 @code{jabber-iq-get-xmlns-alist} or @code{jabber-iq-set-xmlns-alist}.
2288 The key is the namespace of the request, and the value is a function
2289 that takes two arguments, the connection object, and
2290 the entire IQ stanza in list format.
2291 @code{jabber-process-iq} reads these alists to determine which
2292 function to call on incoming packets.
2294 For example, the Ad-Hoc Commands module contains the following:
2296 @example
2297 (add-to-list 'jabber-iq-set-xmlns-alist
2298              (cons "http://jabber.org/protocol/commands"
2299                    'jabber-ahc-process))
2300 @end example
2302 To send a response to an IQ request, use @samp{(jabber-send-iq
2303 @var{connection} @var{sender} "result" @var{query} nil nil nil nil
2304 @var{id})}, where @var{query} is the query in list format.
2305 @code{jabber-send-iq} will encapsulate the query in an IQ packet with
2306 the specified id.
2308 To return an error to the Jabber entity that sent the query, use
2309 @code{jabber-signal-error}.  The signal is caught by
2310 @code{jabber-process-iq}, which takes care of sending the error.
2311 You can also use @code{jabber-send-iq-error}.
2313 @node Sending new requests, Extending service discovery, Listening for new requests, Hacking and extending
2314 @section Sending new requests
2316 @findex jabber-send-iq
2317 @findex jabber-process-iq
2319 To send an IQ request, use @code{jabber-send-iq}.  It will generate an
2320 id, and create a mapping for it for use when the response comes.  The
2321 syntax is:
2323 @example
2324 (jabber-send-iq @var{connection} @var{to} @var{type} @var{query}
2325                 @var{success-callback} @var{success-closure}
2326                 @var{failure-callback} @var{failure-closure})
2327 @end example
2329 @var{success-callback} will be called if the response is of type
2330 @samp{result}, and @var{failure-callback} will be called if the response
2331 is of type @samp{error}.  Both callbacks take three arguments, the
2332 connection object, the IQ stanza of the response, and the corresponding
2333 closure item earlier passed to @code{jabber-send-iq}.
2335 @findex jabber-report-success
2336 @findex jabber-process-data
2337 Two standard callbacks are provided.  @code{jabber-report-success} takes
2338 a string as closure item, and reports success or failure in the echo
2339 area by appending either @samp{succeeded} or @samp{failed} to the
2340 string.  @code{jabber-process-data} prepares a browse buffer.  If its
2341 closure argument is a function, it calls that function with point in
2342 this browse buffer.  If it's a string, it prints that string along with
2343 the error message in the IQ response.  If it's anything else
2344 (e.g. @code{nil}), it just dumps the XML in the browse buffer.
2346 Examples follow.  This is the hypothetical Jabber protocol ``frob'',
2347 for which only success report is needed:
2348 @example
2349 (jabber-send-iq connection
2350                 "someone@@somewhere.org" "set"
2351                 '(query ((xmlns . "frob")))
2352                 'jabber-report-success "Frobbing"
2353                 'jabber-report-success "Frobbing")
2354 @end example
2355 This will print ``Frobbing succeeded'' or ``Frobbing failed: @var{reason}'',
2356 respectively, in the echo area.
2358 The protocol ``investigate'' needs to parse results and show them in a
2359 browse buffer:
2360 @example
2361 (jabber-send-iq connection
2362                 "someone@@somewhere.org" "get"
2363                 '(query ((xmlns . "investigate")))
2364                 'jabber-process-data 'jabber-process-investigate
2365                 'jabber-process-data "Investigation failed")
2366 @end example
2367 Of course, the previous example could have used
2368 @code{jabber-report-success} for the error message.  It's a matter of
2369 UI taste.
2371 @node Extending service discovery, Chat printers, Sending new requests, Hacking and extending
2372 @section Service discovery
2374 @vindex jabber-advertised-features
2375 @vindex jabber-disco-items-nodes
2376 @vindex jabber-disco-info-nodes
2377 @findex jabber-my-jid-p
2379 Your new handlers will likely want to advertise their existence
2380 through service discovery.
2382 To have an additional feature reported in response to disco info
2383 requests, add a string to @code{jabber-advertised-features}.
2385 By default, the service discovery functions reject all requests
2386 containing a node identifier with an ``Item not found'' error.  To
2387 make them respond, add the appropriate entries to
2388 @code{jabber-disco-items-nodes} and @code{jabber-disco-info-nodes}.
2389 Both variables work in the same way.  They are alists, where the keys
2390 are the node names, and the values are lists of two items.
2392 The first item is the data to return --- either a list or a function
2393 taking the entire IQ stanza and returning a list, this list containing
2394 the XML nodes to include in the @code{<query/>} node in the response.
2396 The second item is the access control function.  An access control
2397 function receives the JID as its only argument, and returns non-nil if
2398 access is to be granted.  If nil is specified instead of a function,
2399 access is always granted.  One such function is provided,
2400 @code{jabber-my-jid-p}, which grants access for JIDs where the
2401 username and server (not necessarily resource) are equal to those of
2402 the user.
2404 @node Chat printers, Stanza chains, Extending service discovery, Hacking and extending
2405 @section Chat printers
2407 @vindex jabber-chat-printers
2408 @vindex jabber-muc-printers
2409 @vindex jabber-body-printers
2410 @cindex Chat printers
2411 @cindex Body printers
2413 Chat printers are functions that print a certain aspect of an incoming
2414 message in a chat buffer.  Included are functions for printing subjects
2415 (@code{jabber-chat-print-subject}), bodies
2416 (@code{jabber-chat-print-body}, and @code{jabber:x:oob}-style URLs
2417 (@code{jabber-chat-print-url}).  The functions in
2418 @code{jabber-chat-printers} are called in order, with the entire
2419 @code{<message/>} stanza as argument, and are expected to call
2420 @code{insert} if they have anything to add.
2422 For MUC, the functions in @code{jabber-muc-printers} are prepended to
2423 those in @code{jabber-chat-printers}.
2425 Body printers are a subgroup of chat printers.  They are exclusive; only
2426 one of them applies to any given message.  The idea is that
2427 ``higher-quality'' parts of the message override pieces included for
2428 backwards compatibility.  Included are @code{jabber-muc-print-invite}
2429 and @code{jabber-chat-normal-body}; functions for XHTML-IM and PGP
2430 encrypted messages may be written in the future.  The functions in
2431 @code{jabber-body-printers} are called in order until one of them
2432 returns non-nil.
2434 @node Stanza chains,  , Chat printers, Hacking and extending
2435 @section Stanza chains
2437 @vindex jabber-message-chain
2438 @vindex jabber-iq-chain
2439 @vindex jabber-presence-chain
2441 If you really need to get under the skin of jabber.el, you can add
2442 functions to the lists @code{jabber-message-chain},
2443 @code{jabber-iq-chain} and @code{jabber-presence-chain}.  The functions
2444 in these lists will be called in order when an XML stanza of the
2445 corresponding type arrives, with the entire XML stanza passed as the
2446 only argument.  Earlier functions can modify the stanza to change the
2447 behaviour of downstream functions.
2449 @node Protocol support, Concept index, Hacking and extending, Top
2450 @appendix Protocol support
2452 @cindex Supported protocols
2454 These are the protocols currently supported (in full or partially) by
2455 jabber.el.
2457 @menu
2458 * RFC 3920::                    XMPP-CORE
2459 * RFC 3921::                    XMPP-IM
2460 * XEP-0004::                    Data Forms
2461 * XEP-0012::                    Last Activity
2462 * XEP-0020::                    Feature Negotiation
2463 * XEP-0022::                    Message Events
2464 * XEP-0030::                    Service Discovery
2465 * XEP-0045::                    Multi-User Chat
2466 * XEP-0049::                    Private XML Storage
2467 * XEP-0050::                    Ad-Hoc Commands
2468 * XEP-0054::                    vcard-temp
2469 * XEP-0055::                    Jabber Search
2470 * XEP-0065::                    SOCKS5 Bytestreams
2471 * XEP-0066::                    Out of Band Data
2472 * XEP-0068::                    Field Standardization for Data Forms
2473 * XEP-0077::                    In-Band Registration
2474 * XEP-0078::                    Non-SASL Authentication
2475 * XEP-0082::                    Jabber Date and Time Profiles
2476 * XEP-0085::                    Chat State Notifications
2477 * XEP-0086::                    Error Condition Mappings
2478 * XEP-0090::                    Entity Time
2479 * XEP-0091::                    Delayed Delivery
2480 * XEP-0092::                    Software Version
2481 * XEP-0095::                    Stream Initiation
2482 * XEP-0096::                    File Transfer
2483 * XEP-0146::                    Remote Controlling Clients
2484 * XEP-0153::                    vCard-Based Avatars
2485 @end menu
2487 @node RFC 3920, RFC 3921, Protocol support, Protocol support
2488 @section RFC 3920 (XMPP-CORE)
2490 Most of RFC 3920 is supported, with the following exceptions.
2492 SASL is supported only when an external SASL library from FLIM or Gnus
2493 is present.  As SASL is an essential part to XMPP, jabber.el will send
2494 pre-XMPP stream headers if it is not available.
2496 None of the stringprep profiles are implemented.  jabber.el changes
2497 JIDs to lowercase internally; that's all.
2499 jabber.el doesn't interpret namespace prefixes.
2501 The @code{xml:lang} attribute is neither interpreted nor generated.
2503 SRV records are used if a modern version of @code{dns.el} is installed.
2505 @node RFC 3921, XEP-0004, RFC 3920, Protocol support
2506 @section RFC 3921 (XMPP-IM)
2508 Most of RFC 3921 is supported, with the following exceptions.
2510 Messages of type ``headline'' are not treated in any special way.
2512 The @code{<thread/>} element is not used or generated.
2514 Sending ``directed presence'' is supported; however, presence stanzas
2515 received from contacts not in roster are ignored.
2517 Privacy lists are not supported at all.
2519 jabber.el doesn't support XMPP-E2E or ``im:'' CPIM URIs.
2521 @node XEP-0004, XEP-0012, RFC 3921, Protocol support
2522 @section XEP-0004 (Data Forms)
2524 XEP-0004 support is good enough for many purposes.  Limitations are
2525 the following.
2527 Forms in incoming messages are not interpreted.  See each specific
2528 protocol for whether forms are accepted in that context.
2530 ``Cancel'' messages are probably not consistently generated when they
2531 should be.  This is partly a paradigm clash, as jabber.el doesn't use
2532 modal dialog boxes but buffers which can easily be buried.
2534 @code{<required/>} elements are not enforced.
2536 The field types ``jid-single'', ``jid-multi'' and ``list-multi'' are
2537 not implemented, due to programmer laziness.  Let us know if you need
2538 them.
2540 @node XEP-0012, XEP-0020, XEP-0004, Protocol support
2541 @section XEP-0012 (Last Activity)
2543 jabber.el can generate all three query types described in the protocol.
2544 However, it does not answer to such requests.
2546 @node XEP-0020, XEP-0022, XEP-0012, Protocol support
2547 @section XEP-0020 (Feature Negotiation)
2549 There are no known limitations or bugs in XEP-0020 support.
2551 @node XEP-0022, XEP-0030, XEP-0020, Protocol support
2552 @section XEP-0022 (Message Events)
2554 jabber.el understands all four specified kinds of message events
2555 (offline, delivered, displayed, and composing) and by default requests
2556 all of them.  It also reports those three events that make sense for
2557 clients.
2559 @node XEP-0030, XEP-0045, XEP-0022, Protocol support
2560 @section XEP-0030 (Service Discovery)
2562 Service discovery is supported, both as client and server.  When used in
2563 the code, service discovery results are cached indefinitely.
2565 @node XEP-0045, XEP-0049, XEP-0030, Protocol support
2566 @section XEP-0045 (Multi-User Chat)
2568 jabber.el supports parts of XEP-0045.  Entering, leaving and chatting
2569 work.  So do invitations and private messages.  Room configuration is
2570 supported.  Changing roles of participants (basic moderation) is
2571 implemented, as is changing affiliations, but requesting affiliation
2572 lists is not yet supported.
2574 @node XEP-0049, XEP-0050, XEP-0045, Protocol support
2575 @section XEP-0049 (Private XML Storage)
2577 jabber.el contains an implementation of XEP-0049; however it is not used
2578 for anything right now.
2580 @node XEP-0050, XEP-0054, XEP-0049, Protocol support
2581 @section XEP-0050 (Ad-Hoc Commands)
2583 jabber.el is probably the first implementation of XEP-0050 (see
2584 @uref{http://article.gmane.org/gmane.network.jabber.devel/21413, post
2585 on jdev from 2004-03-10}).  Both the client and server parts are
2586 supported.
2588 @node XEP-0054, XEP-0055, XEP-0050, Protocol support
2589 @section XEP-0054 (vcard-temp)
2591 Both displaying other users' vCards and editing your own vCard are
2592 supported.  The implementation tries to follow the schema in the XEP
2593 accurately.
2595 @node XEP-0055, XEP-0065, XEP-0054, Protocol support
2596 @section XEP-0055 (Jabber Search)
2598 XEP-0055 is supported, both with traditional fields and with Data Forms
2599 (@pxref{XEP-0004}).  As the traditional fields specified by the XEP is a
2600 subset of those allowed in XEP-0077, handling of those two form types
2601 are merged.  @xref{XEP-0077}.
2603 @node XEP-0065, XEP-0066, XEP-0055, Protocol support
2604 @section XEP-0065 (SOCKS5 Bytestreams)
2606 XEP-0065 is supported.  Currently jabber.el cannot act as a server, not
2607 even on on Emacsen that support server sockets (GNU Emacs 22 and up).
2608 Therefore it relies on proxies.  Proxies have to be entered and queried
2609 manually.
2611 Psi's ``fast mode''
2612 (@uref{http://delta.affinix.com/specs/stream.html}), which gives
2613 greater flexibility with regards to NAT, is not implemented.
2615 @node XEP-0066, XEP-0068, XEP-0065, Protocol support
2616 @section XEP-0066 (Out of Band Data)
2618 jabber.el will display URLs sent in message stanzas qualified by
2619 the @code{jabber:x:oob} namespace, as described in this XEP.  Sending
2620 such URLs or doing anything with iq stanzas (using the
2621 @code{jabber:iq:oob} namespace) is not supported.
2623 @node XEP-0068, XEP-0077, XEP-0066, Protocol support
2624 @section XEP-0068 (Field Standardization for Data Forms)
2626 XEP-0068 is only used in the context of creating a new Jabber account,
2627 to prefill the username field of the registration form.
2629 @node XEP-0077, XEP-0078, XEP-0068, Protocol support
2630 @section XEP-0077 (In-Band Registration)
2632 In-band registration is supported for all purposes.  That means
2633 registering a new Jabber account, changing Jabber password, removing a
2634 Jabber account, registering with a service, and cancelling
2635 registration to a service.  Data forms are supported as well.  URL
2636 redirections are not.
2638 jabber.el will not prevent or alert a user trying to change a password
2639 over an unencrypted connection.
2641 @node XEP-0078, XEP-0082, XEP-0077, Protocol support
2642 @section XEP-0078 (Non-SASL Authentication)
2644 Non-SASL authentication is supported, both plaintext and digest.
2645 Digest is preferred, and a warning is displayed to the user if only
2646 plaintext is available.
2648 @node XEP-0082, XEP-0085, XEP-0078, Protocol support
2649 @section XEP-0082 (Jabber Date and Time Profiles)
2651 The DateTime profile of XEP-0082 is supported.  Currently this is only
2652 used for file transfer.
2654 @node XEP-0085, XEP-0086, XEP-0082, Protocol support
2655 @section XEP-0085 (Chat State Notifications)
2657 XEP-0085 is partially supported. Currently only active/composing
2658 notifications are @emph{sent} though all five notifications are handled on
2659 receipt.
2661 @node XEP-0086, XEP-0090, XEP-0085, Protocol support
2662 @section XEP-0086 (Error Condition Mappings)
2664 Legacy errors are interpreted, but never generated.  XMPP style error
2665 messages take precedence when errors are reported to the user.
2667 @node XEP-0090, XEP-0091, XEP-0086, Protocol support
2668 @section XEP-0090 (Entity Time)
2670 jabber.el can query other entities for their time, and return the
2671 current time to those who ask.
2673 @node XEP-0091, XEP-0092, XEP-0090, Protocol support
2674 @section XEP-0091 (Delayed Delivery)
2676 The time specified on delayed incoming messages is interpreted, and
2677 displayed in chat buffers instead of the current time.
2679 @node XEP-0092, XEP-0095, XEP-0091, Protocol support
2680 @section XEP-0092 (Software Version)
2682 The user can request the version of any entity.  jabber.el answers
2683 version requests to anyone, giving ``jabber.el'' as name, and the
2684 Emacs version as OS.
2686 @node XEP-0095, XEP-0096, XEP-0092, Protocol support
2687 @section XEP-0095 (Stream Initiation)
2689 XEP-0095 is supported, both incoming and outgoing, except that jabber.el
2690 doesn't check service discovery results before sending a stream
2691 initiation request.
2693 @node XEP-0096, XEP-0146, XEP-0095, Protocol support
2694 @section XEP-0096 (File Transfer)
2696 Both sending and receiving files is supported.  If a suitable program is
2697 found, MD5 hashes of outgoing files are calculated and sent.  However,
2698 hashes of received files are not checked.  Ranged transfers are not
2699 supported.  In-band bytestreams are not yet supported, even though
2700 XEP-0096 requires them.
2702 @node XEP-0146, XEP-0153, XEP-0096, Protocol support
2703 @section XEP-0146 (Remote Controlling Clients)
2705 The ``set-status'' command in XEP-0146 is supported.
2707 @node XEP-0153,  , XEP-0146, Protocol support
2708 @section XEP-0153 (vCard-Based Avatars)
2710 vCard-based avatars are supported, both publishing and displaying.  The
2711 pixel size limits on avatars are not enforced.
2713 @node Concept index, Function index, Protocol support, Top
2714 @unnumbered Concept index
2716 @printindex cp
2718 @node Function index, Variable index, Concept index, Top
2719 @unnumbered Function index
2721 @printindex fn
2723 @node Variable index,  , Function index, Top
2724 @unnumbered Variable index
2726 @printindex vr
2728 @bye
2730 @ignore
2731    arch-tag: 995bf3da-0e87-4b15-895a-1e85fac139a2
2732 @end ignore