Compare commits

...

9 Commits

Author SHA1 Message Date
contrapunctus 45137c6f12 Fix spaces between links 2021-03-14 23:24:00 +05:30
contrapunctus c013f8185c Merge branch 'literate' into raphael-rename 2021-03-14 23:21:34 +05:30
contrapunctus 004ed1eb24 Merge branch 'literate' into raphael-rename 2021-03-14 23:01:10 +05:30
contrapunctus a45ea4b4b6 Rename rapha.el (eek) -> Raphael
Some comments which are no longer relevant in our single-file literate
program were removed.
2021-03-14 22:53:11 +05:30
contrapunctus abcb208e10 Merge branch 'literate' into raphael-rename 2021-03-14 22:29:30 +05:30
contrapunctus 05045f6b7f Merge branch 'literate' into raphael-rename 2021-03-14 10:05:50 +05:30
contrapunctus fcb3c49e98 Merge branch 'literate' into raphael-rename 2021-03-14 08:59:48 +05:30
contrapunctus 983c4d2784 Move jabber-private code to jabber.org 2021-03-14 08:57:29 +05:30
contrapunctus b3ae86ba18 Rename project, add image
Symbol names remain unaltered for the moment, since that is a more
involved task.
2021-03-14 01:25:11 +05:30
4 changed files with 13292 additions and 37 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -1,4 +1,4 @@
;;; jabber.el --- a minimal jabber client
;;; rapha.el --- a minimal jabber client
;; Copyright (C) 2003, 2004, 2007, 2008 - Magnus Henoch - mange@freemail.hu
;; Copyright (C) 2002, 2003, 2004 - tom berger - object@intelectronica.net
@ -6,6 +6,8 @@
;; SSL - Support, mostly inspired by Gnus
;; Copyright (C) 2005 - Georg Lehner - jorge@magma.com.ni
;; This file is a part of rapha.el.
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2 of the License, or
@ -877,7 +879,7 @@ applied to the node and not to the data itself."
"Decide whether the \"Jabber\" menu is displayed in the menu bar.
If t, always display.
If nil, never display.
If maybe, display if jabber.el is installed under `package-user-dir', or
If maybe, display if rapha.el is installed under `package-user-dir', or
if any of `jabber-account-list' or `jabber-connections' is non-nil."
:group 'jabber
:type '(choice (const :tag "Never" nil)
@ -1181,7 +1183,7 @@ any string character data of this node"
(setq default-ns xmlns)))
;; Now, if the node name has a prefix, replace it and add an
;; "xmlns" attribute. Slightly ugly, but avoids the need to
;; change all the rest of jabber.el at once.
;; change all the rest of rapha.el at once.
(let ((node-name-string (symbol-name node-name)))
(when (string-match "\\(.*\\):\\(.*\\)" node-name-string)
(let* ((prefix (match-string 1 node-name-string))
@ -1991,6 +1993,9 @@ problems."
(defvar jabber-connection-type-history ()
"Keeps track of previously used connection types")
;; jabber-connect and jabber-connect-all should load rapha.el, not
;; just jabber-core.el, when autoloaded.
;;;###autoload (autoload 'jabber-connect-all "jabber" "Connect to all configured Jabber accounts.\nSee `jabber-account-list'.\nIf no accounts are configured (or ARG supplied), call `jabber-connect' interactively." t)
(defun jabber-connect-all (&optional arg)
"Connect to all configured Jabber accounts.
@ -5748,6 +5753,7 @@ If DONT-PRINT-NICK-P is true, don't include nickname."
;; using `field-beginning'.
(goto-address-fontify (field-beginning nil nil limit) end)))))
;; jabber-compose is autoloaded in rapha.el
(add-to-list 'jabber-jid-chat-menu
(cons "Compose message" 'jabber-compose))
@ -7682,7 +7688,7 @@ on success or failure, respectively."
(when (or (bound-and-true-p jabber-muc-autojoin)
(bound-and-true-p jabber-muc-default-nicknames))
(widget-insert "The variables `jabber-muc-autojoin' and/or `jabber-muc-default-nicknames'\n"
"contain values. They are only available to jabber.el on this machine.\n"
"contain values. They are only available to rapha.el on this machine.\n"
"You may want to import them into your bookmarks, to make them available\n"
"to any client on any machine.\n")
(widget-create 'push-button :notify 'jabber-bookmarks-import "Import values from variables")
@ -7817,8 +7823,9 @@ ERROR-CLOSURE-DATA are used as in `jabber-send-iq'."
(file-name-directory (locate-library "jabber")))
load-path)))
(require 'hexrgb)))
(error
"hexrgb not found in `load-path' or jabber-fallback-lib/ directory.")))
;; (error
;; "hexrgb not found in `load-path' or jabber-fallback-lib/ directory.")
))
(defcustom jabber-muc-participant-colors nil
"Alist of used colors. Format is (nick . color). Color may be
@ -9482,7 +9489,7 @@ determined from the incoming packet passed in XML-DATA."
system-type)))
(jabber-send-iq jc to "result"
`(query ((xmlns . "jabber:iq:version"))
(name () "jabber.el")
(name () "rapha.el")
(version () ,jabber-version)
;; Booting... /vmemacs.el
;; Shamelessly stolen from someone's sig.
@ -13231,11 +13238,11 @@ Contents of process buffers might be useful for debugging."
;;;###autoload
(defun jabber-info ()
"Open jabber.el manual."
"Open rapha.el manual."
(interactive)
(info "jabber"))
(provide 'jabber)
;;; jabber.el ends here
;;; rapha.el ends here

13242
raphael.el Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,17 @@
#+TITLE: Raphael - a heavenly messenger for the Church of Emacs
#+TODO: TODO WIP EXTEND CLEANUP FIXME REVIEW |
#+PROPERTY: header-args :tangle yes
* jabber.el
** README
This is jabber.el 0.8.92, an XMPP client for Emacs. XMPP (also known as 'Jabber') is an instant messaging system; see http://xmpp.org for more information.
Raphael (formerly known as jabber.el) is a Jabber/XMPP client for Emacs. Jabber/XMPP is an IETF standard for federated instant messaging - see http://xmpp.org for more information.
* Raphael - a heavenly messenger for the Church of Emacs
#+ATTR_HTML: :alt painting of Archangel Raphael by Ingres
[[file:CC-BY-SA Ingres_-_Carton_pour_les_vitraux_de_la_chapelle_Saint-Ferdinand_saint_Raphaël,_archange,_1842.jpg]]
** readme
Raphael resources
+ [[https://tildegit.org/wgreenhouse/emacs-jabber/][project page]]
+ chat: [[xmpp:emacs@salas.suchat.org?join][xmpp:emacs@salas.suchat.org?join]]
Old jabber.el resources
+ [[http://sourceforge.net/projects/emacs-jabber][old project page]]
+ [[http://emacs-jabber.sourceforge.net][old home page]]
+ [[http://www.emacswiki.org/cgi-bin/wiki/JabberEl][old wiki page]]
@ -15,12 +20,12 @@ This is jabber.el 0.8.92, an XMPP client for Emacs. XMPP (also known as 'Jabber
* http://dir.gmane.org/gmane.emacs.jabber.general
*** GNU Emacs
jabber.el runs on GNU Emacs 23.1 or later.
Raphael runs on GNU Emacs 23.1 or later.
The file hexrgb.el (http://www.emacswiki.org/emacs/hexrgb.el) is needed for MUC nick coloring feature. A copy is located in the compat directory, and used if the configure script doesn't find another copy already installed.
*** XEmacs
You need an XEmacs with Mule support, and recent versions of the gnus, net-utils and mule-ucs packages. jabber.el basically works on XEmacs, but some features are missing (in particular mouse support). Testing and patches are very welcome.
You need an XEmacs with Mule support, and recent versions of the gnus, net-utils and mule-ucs packages. Raphael basically works on XEmacs, but some features are missing (in particular mouse support). Testing and patches are very welcome.
*** Encrypted connections
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:
@ -29,18 +34,18 @@ Many Jabber servers require encrypted connections, and even if yours doesn't it
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.
Failing that, Raphael 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.
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. Raphael 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.
*** Installation
jabber.el can be installed using the commands:
Raphael can be installed using the commands:
#+BEGIN_SRC
./configure
make
@ -50,14 +55,14 @@ make install
You can specify which emacs you want to use:
: ./configure EMACS=emacs-or-xemacs-21.4
You can also install jabber.el by hand. Put all .el files somewhere in your =load-path=, or have your =load-path= include the directory they're in. To install the Info documentation, copy =jabber.info= to =/usr/local/info= and run ="install-info /usr/local/info/jabber.info"=.
You can also install Raphael by hand. Put all .el files somewhere in your =load-path=, or have your =load-path= include the directory they're in. To install the Info documentation, copy =jabber.info= to =/usr/local/info= and run ="install-info /usr/local/info/jabber.info"=.
After installation by either method, add (load "jabber-autoloads") to your .emacs file. (If you got the code from GIT, you still need the makefile to generate jabber-autoloads.el.)
If you are upgrading from 0.7-0.7.x, you need to update your configuration. See the section "Account settings" in the manual.
**** Special notes for Git version
If you are running jabber.el from Git, you need to generate the =jabber-autoloads.el= file yourself. The simplest way to do this is by using the =./configure && make= process.
If you are running Raphael from Git, you need to generate the =jabber-autoloads.el= file yourself. The simplest way to do this is by using the =./configure && make= process.
To generate the configure script, make sure that autoconf and automake are installed and run =autoreconf -i=.
@ -79,13 +84,13 @@ To change how you are notified about incoming events, type =M-x customize-group
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, Raphael 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.
*** File transfer
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.
This release of Raphael contains support for file transfer. You may need to configure some variables to make it work; see the manual for details.
*** XMPP URIs
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".
It is possible to make various web browsers pass links starting with "xmpp:" to Raphael. In the ideal case, this works right after running "make install". Otherwise, see the manual, section "XMPP URIs".
** TODO maintenance [0%]
1. [ ] Satisfy =M-x checkdoc=
@ -93,7 +98,7 @@ It is possible to make various web browsers pass links starting with "xmpp:" to
3. [ ] hexrgb.el is not available on MELPA
** About this file
jabber.el is an Org literate program.
Raphael is an Org literate program.
=org-babel-tangle= takes ages, so we use a little sed one-liner (in the file-local variables) to do the tangling, which is nearly instant. The sed script emits anything between lines matching the exact strings "#+BEGIN_SRC emacs-lisp" and "#+END_SRC".
@ -113,7 +118,7 @@ If a source block does not have syntax highlighting, press =M-o M-o= (=font-lock
8. [ ] The tangled file currently does not list all the other authors (currently listed in =:COPYRIGHT:= drawers). We could add them all at once in the library headers section...or something else. 🤔
** Library headers and commentary
#+BEGIN_SRC emacs-lisp
;;; jabber.el --- a minimal jabber client
;;; raphael.el --- a minimal jabber client
;; Copyright (C) 2003, 2004, 2007, 2008 - Magnus Henoch - mange@freemail.hu
;; Copyright (C) 2002, 2003, 2004 - tom berger - object@intelectronica.net
@ -1198,7 +1203,7 @@ Copyright (C) 2002, 2003, 2004 - tom berger - object@intelectronica.net
"Decide whether the \"Jabber\" menu is displayed in the menu bar.
If t, always display.
If nil, never display.
If maybe, display if jabber.el is installed under `package-user-dir', or
If maybe, display if Raphael is installed under `package-user-dir', or
if any of `jabber-account-list' or `jabber-connections' is non-nil."
:group 'jabber
:type '(choice (const :tag "Never" nil)
@ -1599,7 +1604,7 @@ any string character data of this node"
(setq default-ns xmlns)))
;; Now, if the node name has a prefix, replace it and add an
;; "xmlns" attribute. Slightly ugly, but avoids the need to
;; change all the rest of jabber.el at once.
;; change all the rest of Raphael at once.
(let ((node-name-string (symbol-name node-name)))
(when (string-match "\\(.*\\):\\(.*\\)" node-name-string)
(let* ((prefix (match-string 1 node-name-string))
@ -9639,7 +9644,7 @@ on success or failure, respectively."
(when (or (bound-and-true-p jabber-muc-autojoin)
(bound-and-true-p jabber-muc-default-nicknames))
(widget-insert "The variables `jabber-muc-autojoin' and/or `jabber-muc-default-nicknames'\n"
"contain values. They are only available to jabber.el on this machine.\n"
"contain values. They are only available to Raphael on this machine.\n"
"You may want to import them into your bookmarks, to make them available\n"
"to any client on any machine.\n")
(widget-create 'push-button :notify 'jabber-bookmarks-import "Import values from variables")
@ -9808,8 +9813,9 @@ Copyright 2009, 2010, 2012, 2013 Terechkov Evgenii - evg@altlinux.org
(file-name-directory (locate-library "jabber")))
load-path)))
(require 'hexrgb)))
(error
"hexrgb not found in `load-path' or jabber-fallback-lib/ directory.")))
;; (error
;; "hexrgb not found in `load-path' or jabber-fallback-lib/ directory.")
))
#+END_SRC
**** jabber-muc-participant-colors :custom:variable:
@ -11760,7 +11766,7 @@ Copyright (C) 2002, 2003, 2004 - tom berger - object@intelectronica.net
Copyright (C) 2003, 2004 - Magnus Henoch - mange@freemail.hu
:END:
jabber.el can perform browse requests, but will not answer them.
Raphael can perform browse requests, but will not answer them.
**** jabber-get-browse :command:
#+BEGIN_SRC emacs-lisp
(add-to-list 'jabber-jid-info-menu
@ -11912,7 +11918,7 @@ determined from the incoming packet passed in XML-DATA."
system-type)))
(jabber-send-iq jc to "result"
`(query ((xmlns . "jabber:iq:version"))
(name () "jabber.el")
(name () "Raphael")
(version () ,jabber-version)
;; Booting... /vmemacs.el
;; Shamelessly stolen from someone's sig.
@ -16557,7 +16563,7 @@ XEP-0301, In-Band Real Time Text."
#+END_SRC
*** Jabber
*** Raphael
:PROPERTIES:
:file: jabber.el
:END:
@ -16797,20 +16803,20 @@ Contents of process buffers might be useful for debugging."
#+BEGIN_SRC emacs-lisp
;;;###autoload
(defun jabber-info ()
"Open jabber.el manual."
"Open Raphael manual."
(interactive)
(info "jabber"))
(info "raphael"))
#+END_SRC
#+BEGIN_SRC emacs-lisp
(provide 'jabber)
(provide 'raphael)
;;; jabber.el ends here
;;; raphael.el ends here
#+END_SRC
** local variables
# Local Variables:
# eval: (progn (make-local-variable 'after-save-hook) (add-hook 'after-save-hook (lambda () (start-process-shell-command "jabber-sed-tangle" "jabber-sed-tangle" "sed -n -e '/#+BEGIN_SRC emacs-lisp$/,/#+END_SRC$/{//!p;}' jabber.org > jabber.el"))))
# eval: (progn (make-local-variable 'after-save-hook) (add-hook 'after-save-hook (lambda () (start-process-shell-command "raphael-sed-tangle" "raphael-sed-tangle" "sed -n -e '/#+BEGIN_SRC emacs-lisp$/,/#+END_SRC$/{//!p;}' raphael.org > raphael.el"))))
# End: