-
Notifications
You must be signed in to change notification settings - Fork 31
/
jabber.texi
3020 lines (2390 loc) · 111 KB
/
jabber.texi
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
\input texinfo @c -*-texinfo-*-
@c %**start of header
@setfilename jabber.info
@settitle jabber.el manual 0.8.0
@c %**end of header
@dircategory Emacs
@direntry
* jabber.el: (jabber). Emacs XMPP (Jabber) client
@end direntry
@copying
This manual is for jabber.el, version 0.8.0.
Copyright @copyright{} 2004, 2005, 2006, 2007, 2008, 2009 Magnus Henoch, Tom Berger.
@quotation
Permission is granted to make and distribute verbatim copies or
modified versions of this manual, provided the copyright notice and
this permission notice are preserved on all copies.
@end quotation
@end copying
@titlepage
@title jabber.el
@subtitle instant messaging for XMPP (Jabber)
@author by Magnus Henoch and Tom Berger
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage
@contents
@ifnottex
@node Top, Introduction, (dir), (dir)
@top jabber.el manual
@insertcopying
@end ifnottex
@menu
* Introduction::
* Basic operation::
* Groupchat::
* Composing messages::
* File transfer::
* Services::
* Personal information::
* Avatars::
* Time queries::
* Useful features::
* Message history::
* Typing notifications::
* Roster import and export::
* XMPP URIs::
* Customization::
* Hacking and extending::
* Protocol support::
* Concept index::
* Function index::
* Variable index::
@end menu
@node Introduction, Basic operation, Top, Top
@chapter Introduction
jabber.el is an XMPP (Jabber) client running under Emacs. For more
information on the open instant messaging protocol,
please visit @uref{http://xmpp.org}.
As a XMPP client, jabber.el is mostly just a face in the crowd,
except that it uses buffers where GUI clients have windows. There is
a roster buffer, and to chat with someone you open a chat buffer, and
there are buffers for
interaction with servers and services. Then again, jabber.el delivers
excellent console performance and customizable hooks (if you have
speech synthesizer software, hook it up to your presence alerts).
jabber.el does not yet support PGP encryption, sending and receiving
roster items, and various other things.
@menu
* Contacts::
@end menu
@node Contacts, , , Introduction
@section Contacts
@itemize @bullet
@item
There is a web page at
@uref{http://emacs-jabber.sf.net/}.
@item
There is a Sourceforge
project page at @uref{http://sourceforge.net/projects/emacs-jabber},
with bug and patch trackers.
@item
There is a mailing list:
@email{emacs-jabber-general@@lists.sourceforge.net},
@uref{https://lists.sourceforge.net/lists/listinfo/emacs-jabber-general},
@uref{http://dir.gmane.org/gmane.emacs.jabber.general}
@item
There is a chat room, @code{jabber.el@@conference.jabber.se}. If you
have successfully connected, you can join it by typing @kbd{M-x
jabber-muc-join} and entering the address.
@end itemize
@node Basic operation, Groupchat, Introduction, Top
@chapter Basic operation
This chapter is intended as an introduction to basic usage of
jabber.el. If you have used XMPP before and are familiar with the
terminology, you might find it a bit too basic---in that case, just
skim it, making sure to pick up the commands mentioned.
I'll assume that you have already successfully installed jabber.el; if
not, consult the @file{README} file. Also, make sure you have
@code{(require 'jabber)} or @code{(load "jabber-autoloads")} in your
@file{.emacs}.
There are a handful of global keybindings for common commands. They
start with @kbd{C-x C-j}, and you can get a list of them by typing
@kbd{C-x C-j C-h}.
@menu
* Do you have a Jabber account?::
* Registering an account::
* Connecting::
* Chatting::
* Presence::
* Presence subscription::
* Roster buffer::
@end menu
@node Do you have a Jabber account?, Registering an account, , Basic operation
@section Do you have a Jabber account?
Jabber has become rather popular as an instant messaging technology.
Several sites use it, but often not under the names ``Jabber'' or
``XMPP''. Examples:
@itemize @bullet
@item
Google Talk uses Jabber. If you have a Gmail address, you can use it as
a Jabber ID. @xref{Account settings}, for Google-specific configuration.
@item
LJ Talk (of Livejournal) uses Jabber. Your Jabber ID is
@samp{@var{ljusername}@@livejournal.com}.
@end itemize
@node Registering an account, Connecting, Do you have a Jabber account?, Basic operation
@section Registering an account
@cindex Registering an account
If you do not yet have a Jabber account, you can register one. The
registration processes for various servers differ, but many servers
support so-called ``in-band registration'', which is described in this
section.
To register an account, type @kbd{C-u M-x jabber-connect} and enter your
desired JID in the form @samp{@var{username}@@@var{server}}. You will
be presented with a registration form to fill out and send. There the
username you chose will be prefilled. After registration, you can
connect to the server as usual.
@node Connecting, Chatting, Registering an account, Basic operation
@section Connecting
@findex jabber-connect-all
@findex jabber-connect
@findex jabber-disconnect-one
@findex jabber-disconnect
@cindex Connecting
Now, type @kbd{C-x C-j C-c} and enter your JID and password. If you
successfully connect, jabber.el will download your roster and display it
in a buffer called @code{*-jabber-roster-*}.
By default, you will appear as ``online'' to your contacts. To change
this to e.g. ``away'', type @kbd{M-x jabber-send-presence} or @kbd{C-x
C-j C-p}. @xref{Presence}, for more information.
To disconnect, type @kbd{M-x jabber-disconnect} or @kbd{C-x C-j C-d}.
Use @kbd{M-x jabber-disconnect-one} to disconnect just one account (or just type @kbd{C-u C-x C-j C-d}).
If you don't want to type your JID every time you connect, you can save
it in the variable @code{jabber-account-list}. @xref{Account
settings}. If you configure more than one account, all of them will be
connected when you type @kbd{C-x C-j C-c}, as that key is bound to
@code{jabber-connect-all}. To connect only one account, possibly one
that's not in your list, type @kbd{M-x jabber-connect} or @kbd{C-u C-x
C-j C-c}.
@node Chatting, Presence, Connecting, Basic operation
@section Chatting
@cindex Chatting
@findex jabber-chat-with
There are several ways to open a chat buffer. The shortest way is to
put point over the person you want to chat with in the roster display
and hit RET.
You can also use the function @code{jabber-chat-with}. This function is
bound to @kbd{C-x C-j C-j} in the global keymap. You will be asked to
enter a JID in the minibuffer. You can also enter the roster name of
one of your contacts. All JIDs and names in your roster can be
tab-completed.
You can also use menus to access commands. In the roster display, you
can access several menus through keystrokes or mouse clicks. You can
bring one big menu up by pressing the second mouse button, or you can
bring up the ``chat menu'' by typing @kbd{C-c C-c}. If you do the
latter while point is on a roster entry, that entry will be the
default value when you are asked for whom to chat with.
Now, try opening a chat with someone. A buffer named
@code{*-jabber-chat-:-@var{person}-*} will be created and selected.
Type your message at the end of the buffer, and hit @kbd{RET} to send
it. To include a newline in your message, use @kbd{C-j}.
When you receive a message from someone, you will see a red indicator in
the mode line. You can click this indicator with the mouse, or type
@kbd{C-x C-j C-l} to switch to the relevant buffer. @xref{Tracking
activity}.
@node Presence, Presence subscription, Chatting, Basic operation
@section Presence
@cindex Presence
@cindex Sending presence
@findex jabber-send-presence
@findex jabber-send-default-presence
@vindex jabber-default-show
@vindex jabber-default-status
@vindex jabber-default-priority
@dfn{Presence} is the Jabber term for letting other people know that you
are online, and additionally how ``available'' you are. There are
three elements to presence: availability state (called ``show''),
status message, and priority.
Your show state may either be empty (meaning simply ``online''), or
one of @code{away}, @code{xa}, @code{dnd} and @code{chat}, meaning
``away'', ``extended away'' (i.e. away for an extended period), ``do
not disturb'', and ``free for chat'', respectively. This information
is available to everyone subscribing to your presence, but technically
it does not restrict anyone's actions. You can chat with people even
if you claim to be away.
The status message is a short text complementing your show status,
such as ``at home'', ``working'', ``phone'', ``playing games'' or
whatever you want. It is sent to everyone subscribing to your
presence, but not all clients prominently display it to the user.
The priority is only interesting if you are running more than one Jabber
client at a time accessing the same account. @xref{Resources and
priority}.
To set your presence, use the function @code{jabber-send-presence}
(bound to @kbd{C-x C-j C-p}).
It can be called both interactively and in Lisp code. For the latter
case, use something like @code{(jabber-send-presence "away" "idle for
10 minutes" 10)}. There are a few shortcuts:
@table @kbd
@item C-x C-j C-a
Send ``away'' presence (with prefix argument, specify status text)
@item C-x C-j C-x
Send ``extended away'' presence (with prefix argument, specify status
text)
@item C-x C-j C-o
Send default presence (see below)
@end table
By default, jabber.el sets your presence when you connect. If you
want it not to do that, remove @code{jabber-send-current-presence}
from @code{jabber-post-connect-hooks}. If you want to change the
presence that is sent, change the variables
@code{jabber-default-show}, @code{jabber-default-status} and
@code{jabber-default-priority}.
With jabber.el, you can set your presence remotely. @xref{Ad-Hoc Commands}.
@menu
* Resources and priority::
* Directed presence::
@end menu
@node Resources and priority, Directed presence, , Presence
@subsection Resources and priority
@cindex Resource
@cindex Priority
Every connection to an account has a specific name, a @dfn{resource}.
The account itself has a JID of the form
@samp{@var{username}@@@var{server}} (a @dfn{bare JID}), but the
connections have JIDs of the form
@samp{@var{username}@@@var{server}/@var{resource}} (a @dfn{full JID}).
You can choose the resource name yourself by entering a JID of the
latter form at the connection prompt (@pxref{Connecting}), or by
configuring it in @code{jabber-account-list} (@pxref{Account settings})
Each session has a @dfn{priority}. The priority determines what happens
when a message is sent to the bare JID (i.e. without specifying what
connection should receive message). Such messages are delivered to the
connection with the highest non-negative priority value. If there are
no connections, or if all connections have negative priority, the
message is either stored on the server for later delivery or bounced to
the sender, depending on the server configuration.
If there are several connections with the same priority, the behaviour
depends on the server. Some server implementations deliver the message
to all such connections, while others choose one connection depending on
certain rules.
Note that these rules do not apply when a message is sent to a full
JID. Such messages are sent to the specified resource, if it is still
connected, and otherwise treated as messages to the bare JID. In the
chat buffers of jabber.el, messages are sent to whatever JID the last
message came from (usually a full JID), or to the bare JID if no message
has been received yet. Other clients may have different behaviour.
@node Directed presence, , Resources and priority, Presence
@subsection Directed presence
@cindex directed presence
@cindex send directed presence
@findex jabber-send-directed-presence
You can send ``directed presence'' with @kbd{M-x
jabber-send-directed-presence}. This is mostly useful to manage
transports---sending directed presence is a way to turn them on and
off. You can also send directed presence to an annoying contact to
appear as away or offline to that contact. Note, however, that in both
of these cases, all subscribed entities will get your next global
presence update.
@node Presence subscription, Roster buffer, Presence, Basic operation
@section Presence subscription
@cindex Presence subscription
@cindex Subscribing to someone's presence
@findex jabber-send-subscription-request
Having permission to view the presence status of a person is called
@dfn{subscribing to his presence}. Presence subscription between two
persons can be asymmetric. Subscription state is shown in the roster
display by arrows (@pxref{Customizing the roster buffer}). A
left-pointing arrow means that the contact can see your presence
(``from''). A right-pointing arrow means that you can see the contact's
presence (``to''). The most common case is mutual subscription, a
double-ended arrow (``both'').
When jabber.el receives a presence subscription request, it will present
it to you in a chat buffer, and offer you to choose subscription mode
and send a subscription request back to that person. The ``Mutual''
button accepts the request and sends a reciprocal request.@footnote{If this
request is superfluous, the server will drop it without bothering the
contact.} The ``One-way'' button accepts the request, but doesn't ask
for a subscription in return. The ``Decline'' button declines the
request.
To request subscription to someone, type @kbd{M-x
jabber-send-subscription-request}. You will be prompted for the JID
to send it to. This command can also be accessed through the Roster
menu, by typing @kbd{C-c C-r} in the roster buffer. After that, you
will probably want to give the contact a more readable name. The
command for that is @code{jabber-roster-change}, which is also
available in the Roster menu or by typing @kbd{e} on a person in the
roster buffer.
@node Roster buffer, , Presence subscription, Basic operation
@section The roster buffer
@cindex Roster buffer, basics
@cindex Menus
@cindex Key bindings
The roster buffer is called @code{*-jabber-roster-*}. It simply
contains a list of the contacts on your roster. If you have several
accounts connected, contacts will be grouped by account.
In the roster buffer, any command which requires a JID will default to
the JID under point when called. These commands can be called through
either keyboard menus or mouse menus. To open a menu with the mouse,
simply press the second mouse button over the JID in
question.@footnote{For some reason, mouse menus don't work in XEmacs.
Patches are welcome.} This will bring up a menu with all available
actions. The keyboard menus are split into categories: Chat, Roster,
Information, MUC (Multi-User Chat, or groupchat) and Services, opened
by @kbd{C-c C-c}, @kbd{C-c C-r}, @kbd{C-c C-i}, @kbd{C-c C-m} and
@kbd{C-c C-s}, respectively.
@vindex jabber-roster-show-bindings
A list of keybindings is displayed at the top of the roster buffer.
You can turn it off by setting @code{jabber-roster-show-bindings} to
nil.
@findex jabber-display-roster
You can call @code{jabber-display-roster} (bound to @kbd{g}) to
redisplay your roster according to changed preferences
(@pxref{Customizing the roster buffer}). This will not refetch your
roster from the server. Refetching the roster is usually not needed,
since updates are pushed to clients automatically.
You can choose not to have the roster updated automatically on
presence changes (@pxref{Presence alerts}). In that case, you need to
call @code{jabber-display-roster} manually.
@vindex jabber-show-offline-contacts
@cindex Hiding offline contacts
@cindex Offline contacts, hiding
Please note, that by default offline contacts showed in roster as any
others. To hide them, you can use @kbd{o} in roster buffer. To
permanently hide them, customize @code{jabber-show-offline-contacts}
variable.
@node Groupchat, Composing messages, Basic operation, Top
@chapter Groupchat
@cindex Groupchat
@cindex MUC
@cindex Chatrooms
The groupchat menu can be accessed by typing @kbd{C-c C-m} in the
roster buffer. You can also type the commands directly, as will be
shown here.
@findex jabber-muc-join
@cindex Joining a groupchat
@cindex Changing nickname
@cindex Nickname, changing
To join a groupchat, type @kbd{M-x jabber-muc-join}. You will
be prompted for the groupchat to join, and your nickname in the
groupchat. This nickname doesn't need to have any correlation to your
JID; in fact, groupchats are usually (but not always) configured such
that only moderators can see your JID. You can change your nickname
with @kbd{M-x jabber-muc-nick}. @xref{Configuration}, for setting default
nicknames.
@cindex Query groupchat
@vindex jabber-muc-disable-disco-check
When trying to join a room, jabber.el first sends a service discovery
info request to the room, to find out whether it exists and what
features are enabled (in particular whether the room is
password-protected). However, this can cause problems with some buggy
MUC services (or services that respond in a way that jabber.el doesn't
expect). A workaround for that is to set
@code{jabber-muc-disable-disco-check} to @code{t}; however, the bug should be
unearthed and fixed.
Groupchat messages will be displayed in a buffer called
@code{*-jabber-groupchat-:-@var{groupchat}-*}. By default, the buffer
name is based on the JID of the chat room. If you want a shorter name,
you can add the chat room to your roster and give it a name, using the
command @kbd{M-x jabber-roster-change}. The groupchat buffer works much
like the chat buffer. It has its own class of alerts
(@pxref{Customizing alerts}), and uses activity tracking
(@pxref{Tracking activity}).
@vindex jabber-muc-completion-delimiter
@vindex jabber-muc-looks-personaling-symbols
@cindex Groupchat completion
@cindex Nick completion in groupchat
Also, to save from repeating unnesesary typing you can press @kbd{Tab}
key to complete nick of a groupchat member that you are talking with.
You can customize your form of personal talking in MUC
(@code{jabber-muc-completion-delimiter}) and form of personal talking to
you (@code{jabber-muc-looks-personaling-symbols})---see ``jabber-chat''
customization group. Defaults are sane, so it is unlikely that you would
want to change this, but... it is Emacs!
@cindex Topic, MUC
@findex jabber-muc-set-topic
To change the topic of a groupchat, type @kbd{M-x jabber-muc-set-topic}.
The current topic is shown in the header line.
@findex jabber-muc-leave
To leave a groupchat, type @kbd{M-x jabber-muc-leave}.
@findex jabber-muc-get-config
If you are the owner of a groupchat, you can change its configuration
by typing @kbd{M-x jabber-muc-get-config}. A configuration form
will be rendered in new buffer.
@findex jabber-muc-names
@vindex jabber-muc-print-names-format
To see which people are in a groupchat, type @kbd{M-x
jabber-muc-names}. This gives a list of nicknames,
``affiliations'', and possibly JIDs according @code{jabber-muc-print-names-format}, sorted by ``roles''.
@xref{MUC Administration}, for the meaning of roles and affiliations.
@menu
* Configuration::
* Invitations::
* Private messages::
* MUC Administration::
@end menu
@node Configuration, Invitations, , Groupchat
@section Configuration
@vindex jabber-muc-default-nicknames
@vindex jabber-muc-autojoin
@findex jabber-muc-autojoin
@cindex Default MUC nickname
@cindex Autojoin chat rooms
@cindex Bookmarks, MUC
@findex jabber-edit-bookmarks
You can configure jabber.el to use a certain nickname for a certain
room, or to automatically join a certain room when you connect. You can
do this either by storing bookmarks on the server or by setting Emacs
variables.
Type @kbd{M-x jabber-edit-bookmarks} to add bookmarks. You can specify
the JID of the conference, the name of the conference (not used by
jabber.el), whether to automatically join the room, your desired
nickname (or leave empty), and the room password (or leave empty).
The default nickname for groupchats is the username part of your JID.
If you don't use bookmarks, you can set different nicknames for
different groups by customizing @code{jabber-muc-default-nicknames}.
There you specify the JID of the group, and your preferred nickname.
Automatically joining certain rooms when connecting can be accomplished
by setting @code{jabber-muc-autojoin} to a list containing the JIDs of
the rooms you want to enter. To disable this feature, remove
@code{jabber-muc-autojoin} from @code{jabber-post-connect-hooks}.
Please note, that @code{jabber-muc-default-nicknames} and
@code{jabber-muc-autojoin} are machine-local, but apply to @emph{all}
accounts---if you connect several accounts, both will try to connect to
the same chat rooms, or use the same nickname. This will lead to
confusion.
@node Invitations, Private messages, Configuration, Groupchat
@section Invitations
@cindex Invitations
@findex jabber-muc-invite
You can invite someone to a groupchat with @kbd{M-x jabber-muc-invite}
(also available in the MUC menu). Pay attention to the order of the
arguments---as both users and rooms are just JIDs, it is technically
possible to invite a room to a user, but that's probably not what you
want.
When you receive an invitation, it appears in the chat buffer along
with two buttons, ``Accept'' and ``Decline''. Pressing ``Accept''
enters the room, as you would expect. Pressing ``Decline'' gives you
an opportunity to state the reason why you're not joining.
@node Private messages, MUC Administration, Invitations, Groupchat
@section Private messages
@cindex Private MUC messages
@findex jabber-muc-private
You can open a private chat with a participant in a chat room with
@kbd{M-x jabber-muc-private} (or by using the MUC menu). This creates
a buffer with the name
@code{*-jabber-muc-priv-@var{group}-@var{nickname}-*} (customizable by
@code{jabber-muc-private-buffer-format}), which behaves mostly like an
ordinary chat buffer. This buffer will also be created if someone
sends a private message to you.
Private MUC messages use the same alerts as normal chat messages.
@xref{Message alerts}.
@node MUC Administration, , Private messages, Groupchat
@section Administration
Administration of a MUC room mostly consists of managing roles and
affiliations. Roles are temporary, and apply until the user leaves the
room. Affiliations are permanent, and based on JIDs.
@subsection Roles
@findex jabber-muc-set-role
@cindex Kicking, MUC
@cindex Voice, MUC
@cindex Moderator, MUC
@cindex Roles, MUC
If you have moderator privileges, you can change the role of a
participant with @kbd{M-x jabber-muc-set-role}. Kicking means setting
the role to ``none''. Granting and revoking voice are ``participant''
and ``visitor'', respectively. ``moderator'' gives moderator
privileges, obviously.
The possible roles are:
@table @samp
@item moderator
Has voice, can change other people's roles.
@item participant
Has voice.
@item visitor
Doesn't have voice (can't send messages to everyone, but can send
private messages)
@item none
Not in room.
@end table
@subsection Affiliations
@findex jabber-muc-set-affiliation
@cindex Affiliations, MUC
@cindex Banning, MUC
If you have admin or owner privileges, you can change the affiliation of
a user with @kbd{M-x jabber-muc-set-affiliation}. Affiliation is
persistent, and based on JIDs. Depending of your affiliation and the
MUC implementation, you might not be allowed to perform all kinds of
changes, and maybe not in one step.
Affiliations are:
@table @samp
@item owner
Can destroy room, appoint admins, make people members, ban people.
@item admin
Can make people members or ban people.
@item member
Can enter the room, and has voice by default.
@item none
Rights depend on room configuration. The room might be members-only, or
grant voice only to members.
@item outcast
Banned from the room.
@end table
@node Composing messages, File transfer, Groupchat, Top
@chapter Composing messages
@findex jabber-compose
@cindex composing messages
@cindex message composition
The chat buffer interface can be inconvenient for some purposes. As you
can't use @kbd{RET} to insert a newline (use @kbd{C-j} for that),
writing a longer message can be painful. Also, it is not possible to
include a subject in the message, or send the message to multiple
recipients.
These features are implemented by the message composing tool. Type
@kbd{M-x jabber-compose} to start it. In the buffer that comes up, you
can specify recipients, enter a subject, and type your message.
@node File transfer, Services, Composing messages, Top
@chapter File transfer
@cindex File transfer
@cindex Sending files
jabber.el has limited support for file transfer. The most important
limit is that files sent and received are kept in buffers, so Emacs must
be able to allocate enough memory for the entire file, and the file size
must be smaller than the maximum buffer size.@footnote{The maximum
buffer size depends on in the variable @code{most-positive-fixnum}. On
32-bit systems, this is 128 or 256 megabytes, depending on your
Emacs version.}
jabber.el is able to exchange files with most Jabber clients (and also
some MSN transports), but notably not with the official Google Talk
client. The Google Talk client uses a different file transfer protocol
which, at the time of this release, has not been published.
@menu
* Receiving files::
* Sending files::
@end menu
@node Receiving files, Sending files, , File transfer
@section Receiving files
Receiving files requires no configuration. When someone wants to send a
file to you, you are asked (through @code{yes-or-no-p}) whether you want
to accept the file. If you answer yes, you get to choose where to save
the file.
If the sender's client is correctly configured (this is often not the
case; see below), the file transfer will start. Currently, the only way
to watch the progress is to inspect the buffer of the file being
transfered; @kbd{C-x C-b} is one way of doing that. @xref{List Buffers,
, Listing Existing Buffers, emacs, GNU Emacs Manual}. When the transfer
is done, the message ``@var{file} downloaded'' appears in the echo area,
and the buffer is killed.
@c This truly sucks...
If this doesn't happen, it is most likely the sender's fault. The
sender needs to have a public IP address, either directly, through port
forwarding (in which case the client needs to be configured with the
real public IP address), or through an XEP-0065 proxy. If you have
activated XML logging (@pxref{Debug options}), you can see the IP
address that the other client is asking you to connect to there. Often
you will find that this is an internal IP address (often starts with
@code{192.168}). See the documentation of the sender's client for
setting this up.
@node Sending files, , Receiving files, File transfer
@section Sending files
@cindex proxy, file transfer
@cindex file transfer proxy
@cindex XEP-0065 proxy
To send a file to someone, you need an XEP-0065 proxy.@footnote{This
requirement is not inherent in the protocol, only in the current file
transfer implementation of jabber.el, and in Emacs versions earlier than
22.} If your Jabber server hosts such a proxy, it will be found
automatically, otherwise it needs to be manually configured.
You can check whether your Jabber server has a proxy with @kbd{M-x
jabber-get-disco-items}; see @ref{Service discovery}.
@vindex jabber-socks5-proxies
@findex jabber-socks5-query-all-proxies
To configure a proxy manually, customize the variable
@code{jabber-socks5-proxies}. Putting @code{proxy.jabber.se} there
should work. Type @kbd{M-x jabber-socks5-query-all-proxies} to see if
the proxies answer.
@findex jabber-ft-send
Now, you can type @kbd{M-x jabber-ft-send} to send a file to someone.
You need to enter the correct full JID, including resource, to get this
right. If the contact is logged in with only one client, and you can
see it online, just typing the JID or roster name is enough. If you run
the command from a chat buffer, the JID of the contact is given as
the default value.
If the contact has several clients online, you probably want to send the
file to a particular one. If you run this command from within a chat
buffer, the default target will be the one that last sent a message to
you. If you just type a bare JID or a roster name, the client with the
highest priority will get the file.
If the contact accepts the file, and the contact's client succeeds in
connecting to the proxy, jabber.el will send the file through the
proxy. During this time, your Emacs will be blocked, so you might want
to avoid sending large files over slow connections.
@node Services, Personal information, File transfer, Top
@chapter Services
@cindex Browse buffers
Not every Jabber entity is a physical person. There are many
automatic entities, called servers, services, components, agents,
transports and other names. The use of these is described here.
The functions described in this chapter use @dfn{browse buffers}.
Browse buffers are named @code{*-jabber-browse-:-@var{service}-*},
sometimes with a numerical suffix. The different menus have the same
keybindings as in the roster buffer, and if you call a function
operating on a JID while point is over a JID, that JID will be the
default value, so you don't have to type it or copy it yourself.
You can change the buffer name template by customizing
the variable @code{jabber-browse-buffer-format}.
@menu
* Commands::
* Your home server::
* Transports::
* User directories::
* MUC services::
@end menu
@node Commands, Your home server, , Services
@section Commands
A small number of commands is used for almost all interaction with
Jabber services. Essentially, they are all the same: you request a form
from the server, fill it in, and send it back.
Most of these commands are available under the Service menu, which is
opened by typing @kbd{C-c C-s}. Service discovery is under the Info
menu instead, which is available under @kbd{C-c C-i}.
@menu
* Registration::
* Search::
* Ad-Hoc Commands::
* Service discovery::
* Browsing::
@end menu
@node Registration, Search, , Commands
@subsection Registration
@cindex Registration
@findex jabber-get-register
You can get a registration form for a service by typing @kbd{M-x
jabber-get-register} and entering the JID of the service. On success,
you get a single-stage form to fill in.
There are two buttons at the bottom of the form, ``Submit'' and ``Cancel
registration''. ``Submit'' does what you would expect it to, but
``Cancel registration'' cancels any existing registration with the
service. Whichever of them you choose, you get a message in the echo
area informing whether the operation succeeded.
@node Search, Ad-Hoc Commands, Registration, Commands
@subsection Search
@cindex Search
@findex jabber-get-search
You can get a search form for a service by typing @kbd{M-x
jabber-get-search}. This gives you a single-stage form to fill in.
After you press the ``Submit'' button at the bottom, the search results
will be displayed in the same buffer.
@node Ad-Hoc Commands, Service discovery, Search, Commands
@subsection Ad-Hoc Commands
@cindex Ad-Hoc Commands
@findex jabber-ahc-get-list
@findex jabber-ahc-execute-command
jabber.el supports a subset of XEP-0050, the standard for Ad-Hoc
Commands. As the name implies, this can be used for just about
anything. In particular, it is used not only by services, but also by
clients (e.g. Psi, and jabber.el itself).
To find which commands are available, run ``Request command list''
(@code{jabber-ahc-get-list}).@footnote{This is the same thing as a
disco items request to the node
@code{http://jabber.org/protocol/commands}.}
To run a command from the list, put point over it and run ``Execute
command'' (@code{jabber-ahc-execute-command}), accepting the defaults
for JID and node. (If you already know those, you could of course
enter them yourself.)
What happens next depends on the command and the service. In some
cases, the service just responds that the command has been run. You may
also get a form to fill out. This form may have multiple stages, in
which case there are ``Next'' and ``Previous'' buttons for navigating
between stages. You may also see ``Complete'', which runs the command
skipping any remaining stages of the form, and ``Cancel'', which cancels
the command.
Currently, jabber.el uses ad-hoc commands for setting presence remotely.
If you realize that you forgot to set your client to ``away'' with a low
priority, you can do it remotely from any JID from
@code{jabber-account-list}. So, you can add disabled JIDs in
@code{jabber-account-list} to allow them control your
presence.@footnote{Most Jabber servers also support kicking a client off
the net by logging in with another client with exactly the same
resource.}
@node Service discovery, Browsing, Ad-Hoc Commands, Commands
@subsection Service discovery
@cindex Service discovery
@findex jabber-get-disco-items
@findex jabber-get-disco-info
Service discovery is used to find information about servers, services
and clients. There are two kinds of requests: find @dfn{info} about a
Jabber entity---i.e. its identity and supported features---and find
@dfn{items} related to an entity, where the definition of ``related'' is
left to the entity itself.
The commands to execute such requests are @code{jabber-get-disco-info}
and @code{jabber-get-disco-items}, respectively. These commands can be
accessed from the Info menu, which is opened by typing @kbd{C-c C-i}.
The commands accept a JID and optionally a ``node''.
The result of such a command is displayed in a browse buffer. For an
info request, the result just lists the identities and features of the
entity. For an item request, the related items are listed. The items
may be JIDs, or JIDs with a node. If you put point on one of the items,
its JID and node will be the default value for any Jabber command.
If you think that the interface to service discovery is awkward and
should be replaced with something better, you are completely right.
@node Browsing, , Service discovery, Commands
@subsection Browsing
@cindex Browsing
@findex jabber-get-browse
Before service discovery, browsing was the way to find information about
Jabber entities. Nowadays it is all but superseded, but jabber.el still
supports it. You can use it by typing @kbd{M-x jabber-get-browse}. It
works much like service discovery.
@node Your home server, Transports, Commands, Services
@section Your home server
@cindex Password change
@cindex Changing password
@cindex Account removal
@cindex Removing an account
You can interact with your Jabber server to change your password or
remove your account. Both of these can be accomplished by typing
@kbd{M-x jabber-get-register} and typing the JID of your server;
@pxref{Registration}.
@node Transports, User directories, Your home server, Services
@section Transports to other IM networks
@cindex Gateways
@cindex Transports
@cindex MSN transport
@cindex ICQ transport
@cindex AIM transport
Some Jabber services make it possible to communicate with users on other
instant messaging networks (e.g. MSN, ICQ, AIM), in effect turning your
Jabber client into a multi-protocol client. These are called
@dfn{gateways} or @dfn{transports}. They work by impersonating you on
the legacy network; therefore you need to provide your username and
password through registration.
@subsection Finding a transport
To use such a transport, you first need to find one, obviously.
Sometimes your home server provides the transports you need, but you are
not limited to those; in principle you can use any transport on the
Jabber network. Some transports only accept local users, though.
Transports are generally mentioned on the web page of the Jabber server
in question. You can also find transports from within the client;
@pxref{Service discovery}.
@subsection Registering with a transport
To register with a transport, type @kbd{M-x jabber-get-register} and
enter the JID of the transport. This will open a registration form
where you get to fill in your login information; @pxref{Registration}.
You can later use this same form to change the information or cancel
your registration.
After you have registered, the transport will request presence
subscription. It needs that to know when you are online, and
synchronize your presence on the legacy network.
@subsection Contact list
Once you are registered, the transport will transfer the contact list
from the legacy service. From the Jabber side, it appears as if lots of
people suddenly request presence subscription to you. This is somewhat
inconvenient, but it is currently the only way that the transport can
influence your Jabber contact list, as it is an entity external to your
server.@footnote{Of course, jabber.el could do more to alleviate this
inconvenience.}
When you have accepted these presence subscriptions, the contacts from
legacy networks appear as if they were Jabber contacts.
@subsection Finding users
Some legacy networks have a global database of users, and some
transports support searching that database. In that case, you can
search for other users with @kbd{M-x jabber-get-search};
@pxref{Search}.
@node User directories, MUC services, Transports, Services
@section User directories
There are some Jabber user directories, usually abbreviated JUDs. The
most well-known one is @samp{users.jabber.org}. You can register with
such a directory to let other people find you (@pxref{Registration}),
and you can search the directory (@pxref{Search}).
@node MUC services, , User directories, Services
@section MUC services
MUC services (Multi-User Chat, chat rooms) are usually not operated by
these commands, but by commands specific to the MUC protocol;
@pxref{Groupchat}. However, some MUC services offer nickname
registration through the registration protocol (@pxref{Registration}),
and other commands; @pxref{Ad-Hoc Commands}.