File: README.org

package info (click to toggle)
emacs-jabber 0.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,224 kB
  • sloc: lisp: 12,524; xml: 362; makefile: 46; sh: 1
file content (409 lines) | stat: -rw-r--r-- 15,322 bytes parent folder | download
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
#+TITLE: jabber.el - an XMPP client for Emacs
#+DESCRIPTION: Documentation
#+startup: inlineimages

* Description
:PROPERTIES:
:CUSTOM_ID: explanation
:END:
jabber.el is an [[http://xmpp.org][XMPP]] client for Emacs.  XMPP (also known as 'Jabber') is an IETF-standard federated instant messaging protocol.

To try it out, see the [[#how-to-install][install instructions]].

** Why XMPP?
:PROPERTIES:
:CUSTOM_ID: why-xmpp
:END:
XMPP is the only instant messaging protocol which simultaneously -
1. has most features you expect from modern chat - offline messages, multi-device support, file transfer, message correction, A/V calls, end-to-end encryption, etc. (Excludes IRC, Tox, Briar, etc.)
2. is federated, rather than centralized. (Excludes WhatsApp, Discord, Telegram, Signal, ...)
3. has highly efficient server implementations. A single XMPP server on a Raspberry Pi can serve thousands of users. (Excludes Matrix.)
4. has a rich ecosystem of FOSS clients and servers. (Excludes WhatsApp, Discord, Telegram, Signal, ...)
5. is an established IETF standard. (Excludes Matrix, Tox, Telegram, Signal, ...)
6. is governed and evolved by an open community of users and developers.
7. has outlasted all competition over 24 years. (Unless IRC counts.)

** Differences from [[https://github.com/legoscia/emacs-jabber][upstream]]
:PROPERTIES:
:CUSTOM_ID: upstream-differences
:END:
1. More features - [[https://xmpp.org/extensions/xep-0363.html][XEP-0363: HTTP File Upload]], [[https://xmpp.org/extensions/xep-0280.html][XEP-0280: Message Carbons]]
2. Support for XEmacs and old Emacs versions has been dropped
3. The external dependency =hexrgb.el= has been replaced with =color.el= (which is part of Emacs)
4. The deprecated =cl= library has been replaced with =cl-lib=
5. Build system has been changed from Autotools to a =Makefile=
6. =lexical-binding= is used in all files
7. Lots of cleanup by addressing =checkdoc= and byte-compiler warnings - addition/improvement of docstrings, function/variable declarations, etc

** Community
:PROPERTIES:
:CUSTOM_ID: community
:END:
New resources
+ [[https://codeberg.org/emacs-jabber/emacs-jabber/][project page]]
+ chat: https://xmpp.link/#emacs@conference.conversations.im?join (general Emacs and jabber.el talk)
+ chat: https://xmpp.link/#jabber-el@conference.hmm.st?join (jabber.el developement)

Old resources
+ [[http://sourceforge.net/projects/emacs-jabber][project page]]
+ [[http://emacs-jabber.sourceforge.net][home page]]
+ [[http://www.emacswiki.org/cgi-bin/wiki/JabberEl][wiki page]]
+ mailing list:
  * http://lists.sourceforge.net/lists/listinfo/emacs-jabber-general
  * http://dir.gmane.org/gmane.emacs.jabber.general
+ chat: jabber.el@conference.jabber.se and emacs@conference.jabber.ru (Russian, English)

** Requirements
:PROPERTIES:
:CUSTOM_ID: requirements
:END:
jabber.el requires GNU Emacs 27.1 or later.

Two required libraries, =fsm.el= and =srv.el=, are present in [[file:lisp/jabber-fallback-lib/][lisp/jabber-fallback-lib/]].

** Encrypted connections
:PROPERTIES:
:CUSTOM_ID: encrypted-connections
:END:
Many Jabber servers require encrypted connections, and even if yours doesn't it may be good idea.  To get an encrypted connection, the most convenient option is to use GNU Emacs 24 with GnuTLS support compiled in.  You can check whether you have that by typing:

: M-: (gnutls-available-p)

If that commands shows =t= in the echo area, then you have working GnuTLS support.  If it shows =nil= or signals an error, then you don't.

Failing that, jabber.el will use the starttls.el library, which requires that the GnuTLS command line tool "gnutls-cli" is installed.

In Debian-based distributions, "gnutls-cli" is in the "gnutls-bin" package.

The above applies to STARTTLS connections, the most common way to encrypt a Jabber connection and the only one specified in the standards.  STARTTLS connections start out unencrypted, but switch to encrypted after negotiation.  jabber.el also supports connections that are encrypted from start.  For this it uses the tls.el library, which requires either "gnutls-cli" or the OpenSSL command line tool "openssl" to be installed.

To use the latter form of encryption, customize =jabber-account-list=.

Note that only the connection from you to the server is encrypted; there is no guarantee of connections from your server to your contacts' server being encrypted.

** Usage
:PROPERTIES:
:CUSTOM_ID: usage
:END:
To connect to a Jabber server, type =C-x C-j C-c= (or equivalently =M-x jabber-connect-all=) and enter your JID.  With prefix argument, register a new account.  You can set your JID permanently with =M-x jabber-customize=.

Your roster is displayed in a buffer called =*-jabber-*=.  To disconnect, type =C-x C-j C-d= or =M-x jabber-disconnect=.

You may want to use the menu bar to execute Jabber commands.  To enable the Jabber menu, type =M-x jabber-menu=.

For a less terse description, read the enclosed manual.

For bug reports, help requests and other feedback, use the trackers and forums at the project page mentioned above.

** Configuration
:PROPERTIES:
:CUSTOM_ID: configuration
:END:
All available configuration options are described in the manual.  This section only serves to point out the most important ones.

To change how you are notified about incoming events, type =M-x customize-group RET jabber-alerts=.

To activate logging of all chats, set =jabber-history-enabled= to =t=.  By default, history will be saved in =~/.jabber_global_message_log=; make sure that this file has appropriate permissions.  Type =M-x customize-group RET jabber-history= for more options.

By default, jabber.el will send a confirmation when messages sent to you are delivered and displayed, and also send "contact is typing" notifications.  To change this, type =M-x customize-group RET jabber-events=, and set the three =jabber-events-confirm-*= variables to nil.

By default, jabber.el logs all MUC presence announcements to the chat buffer.  With the advent of mobile clients that frequently lose and regain network connectivity, the user left/joined messages can flood the chat.  Customize =jabber-muc-decorate-presence-patterns= to hide or deemphasize presence announcements.  See the manual for details [[info:jabber#Presence announcements][(info "(jabber) Presence announcements")]].

** File transfer
:PROPERTIES:
:CUSTOM_ID: file-transfer
:END:
This release of jabber.el contains support for file transfer.  You may need to configure some variables to make it work; see the manual for details.

** XMPP URIs
:PROPERTIES:
:CUSTOM_ID: xmpp-uris
:END:
It is possible to make various web browsers pass links starting with "xmpp:" to jabber.el.  In the ideal case, this works right after running "make install".  Otherwise, see the manual, section "XMPP URIs".

** Design
:PROPERTIES:
:CUSTOM_ID: design
:END:
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).

** Troubleshooting
:PROPERTIES:
:CUSTOM_ID: troubleshooting
:END:

Common connection issues

When a connection fails, there is usually a message in the echo area describing the failure.  If the echo area has already been cleared, check the ~*Messages*~ buffer.

Here are some of the common connection failure modes:

*** No response beyond "Connecting..."
:PROPERTIES:
:CUSTOM_ID: no-response-beyond-connecting
:END:

#+begin_example
Connecting to <server-name>:5222...
#+end_example

This is likely a DNS lookup failure.  Check the XMPP server name in ~jabber-account-list~.

*** STARTTLS negotiation failed

:PROPERTIES:
:CUSTOM_ID: starttls-negotiation failed
:END:

When attempting to connect to, for instance, example.com, one of the following messages:

#+begin_example
user@example.com: connection lost: ‘STARTTLS negotiation failed: GnuTLS error: #<process jabber>, nil’
#+end_example

 = or =

#+begin_example
gnutls.el: (err=[nil] Symbol has no numeric gnutls-code property) boot:  ...
#+end_example

likely indicates the server example.com's SSL certificate has expired.  To confirm this, =M-x set-variable RET gnutls-log-level RET 1 RET=, then try to connect again.  Check the =*Messages*= buffer for messages of the form:

#+begin_example
gnutls.c: [1] (Emacs) verification: certificate has expired
#+end_example

or other verification failed messages.

*** Connection lost
:PROPERTIES:
:CUSTOM_ID: connection-lost
:END:

A message of the form:

#+begin_example
user@example.com: connection lost: ‘connection broken by remote peer’
#+end_example

may arise from connecting to the wrong port, for example attempting a =STARTTLS= connection to a direct =TLS= port (often 5223).

*** Authentication failure
:PROPERTIES:
:CUSTOM_ID: authentication-failure
:END:
#+begin_example
STARTTLS encryption required, but disabled/non-functional at our end
#+end_example
This likely means that the "gnutls" package is not available.  Check
#+begin_src emacs-lisp
(gnutls-available-p)
#+end_src
if that returns ~nil~, consult
#+begin_src emacs-lisp
(info "(emacs-gnutls) Help For Users")
#+end_src
for more details and potential mitigation.

** Further reading
:PROPERTIES:
:CUSTOM_ID: further-reading
:END:
Documentation for developers is present in [[file:DEV.org][DEV.org]].

* How-to guides
:PROPERTIES:
:CUSTOM_ID: how-to-guides
:END:
See also - [[file:DEV.org::#how-to-guides][how-to guides in the developer documentation]].

** How to install jabber.el
:PROPERTIES:
:CUSTOM_ID: how-to-install
:END:
*** from MELPA
:PROPERTIES:
:CUSTOM_ID: from-melpa
:END:
1. Add the MELPA repositories to your Emacs - https://melpa.org/#/getting-started
2. Type =M-x package-install RET jabber RET=

If all goes well, =jabber.el= commands like =jabber-connect= should now be available in the =M-x= menu.

*** from source with package-vc
:PROPERTIES:
:CUSTOM_ID: install-package-vc
:END:

1. Ensure you have =git=, =makeinfo= (part of the =texinfo= package), and
   Emacs 29.1 or newer.

2. Add the following lines to your =init.el= -

#+begin_src emacs-lisp
   (unless (package-installed-p 'jabber)
     (require 'package-vc)
     (package-vc-install '(jabber
                           :url "https://codeberg.org/emacs-jabber/emacs-jabber"
                           :branch "production"
                           :lisp-dir "lisp"
                           :doc "README.org")))
#+end_src

Alternatively, if you have already cloned the =jabber.el= repository,
you can use the following snippet to install from that repository:

#+begin_src emacs-lisp
   (unless (package-installed-p 'jabber)
     (require 'package-vc)
     (add-to-list 'package-vc-selected-packages
                  '(jabber
                    :url "https://codeberg.org/emacs-jabber/emacs-jabber"
                    :branch "production"
                    :lisp-dir "lisp"
                    :doc "README.org"))
     ;; Change the path below to the location of your local jabber.el repository.
     (package-vc-install-from-checkout "~/.local/src/emacs-jabber" "jabber"))
#+end_src

In your =init.el=, type =M-x eval-buffer RET=.

If all goes well, =jabber.el= commands like =jabber-connect= should now be
available in the =M-x= menu. The documentation for =jabber.el= should also
be installed.

*** manually from source
:PROPERTIES:
:CUSTOM_ID: from-source
:END:
1. Ensure you have =git=, and Emacs 27.1 or newer

2. Clone the repository by typing the following into a terminal -
   #+BEGIN_SRC shell
   git clone https://codeberg.org/emacs-jabber/emacs-jabber
   cd ~/emacs-jabber/
   make
   #+END_SRC

3. Add the following lines to your =init.el= -
   #+BEGIN_SRC emacs-lisp
   (add-to-list 'load-path "~/emacs-jabber/lisp/")
   (load "~/emacs-jabber/lisp/jabber-autoloads")
   #+END_SRC
   ...and, while still in your =init.el=, type =M-x eval-buffer RET=.

If all goes well, =jabber.el= commands like =jabber-connect= should now be available in the =M-x= menu.

To install the Info documentation, copy =jabber.info= to =/usr/local/info= and run ="install-info /usr/local/info/jabber.info"=.

** How to register an account
:PROPERTIES:
:CUSTOM_ID: how-to-register
:END:
If you don't have an XMPP account, you need to register one.

1. Set up your own server, or use a public server. Curated lists of public servers may be found at https://compliance.conversations.im/old/ and https://providers.xmpp.net/.

2. If your server supports In-Band Registration, you can register from Emacs -
   1. Press =C-u C-x C-j C-c=, or =C-u M-x jabber-connect=.
   2. Enter your desired JID in the form =username@server.tld=.
   3. Fill out and send the registration form.

3. If your server does not support In-Band Registration, register on the server website.

** How to chat with jabber.el
:PROPERTIES:
:CUSTOM_ID: how-to-chat
:END:
1. Connect to your server by typing =C-x C-j C-c= (or =M-x jabber-connect=). Enter your JID and password.

2. Open a chat buffer in one of the following ways -

   + Place point on a contact in the roster buffer, and hit =RET=.

   + Press =C-x C-j C-j= (=M-x jabber-chat-with=) and enter a JID in the minibuffer.

     - This can also be used to join MUCs.

3. In the chat buffer, type your message and hit =RET= to send it.

   + To insert a newline in your message, press =C-j=.

4. If you wish to disconnect, type =M-x jabber-disconnect= or =C-x C-j C-d=.

   * To disconnect just one account, type =M-x jabber-disconnect-one= or =C-u C-x C-j C-d=.

* Credits
:PROPERTIES:
:CUSTOM_ID: credits
:END:
** Developers
:PROPERTIES:
:CUSTOM_ID: developers
:END:
+ Tom Berger
+ Magnus Henoch
+ Kirill A. Korinskiy
+ Detlev Zundel
  - wmii support
+ Evgenii Terechkov

** Contributors
:PROPERTIES:
:CUSTOM_ID: contributors
:END:
+ Georg Lehner
  - network transport functions
+ Anthony Chaumas-Pellet
+ Jérémy Compostella
+ Mathias Dahl
  - history logging
  - watch functionality
+ Mario Domenech Goulart
  - sawfish support
  - xmessage support
+ Nolan Eakins
+ Ami Fischman
  - Chat State Notifications
+ François Fleuret
+ David Hansen
+ Adam Sjøgren
  - notifications.el support
+ Rodrigo Lazo
  - notifications.el support
  - libnotify.el support
+ Justin Kirby
+ Carl Henrik Lunde
  - network transport functions
  - activity tracking
+ Olivier Ramonat
+ Andrey Slusar
+ Valery V. Vorotyntsev
  - GMail notifications
+ Milan Zamazal
+ Xavier Maillard
+ Vitaly Mayatskikh
+ Alexander Solovyov
+ Demyan Rogozhin
  - XML console mode
+ Michael Cardell Widerkrantz
  - tmux support
+ Case Duckworth (acdw)
  - [[https://codeberg.org/emacs-jabber/emacs-jabber/pulls/2][PR #2]]
+ Hugh Daschbach (hdasch)
  - MUC presence announcements
  - Enable XEP-0280 (message carbons) by default

** Maintainers
:PROPERTIES:
:CUSTOM_ID: maintainers
:END:
+ wgreenhouse
  - 2021 resurrection
+ cngimenez
  - HTTP Upload support
  - documentation for FSM and its use in this project
+ contrapunctus
  - literate Org migration
  - Makefile (shoutout to tomasino of #team@irc.tilde.chat for the Makefile-debugging help)
  - migration back to traditional source files