You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
(4) |
May
(13) |
Jun
(3) |
Jul
(4) |
Aug
(30) |
Sep
(17) |
Oct
(2) |
Nov
(6) |
Dec
(9) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(9) |
Feb
(30) |
Mar
(22) |
Apr
(23) |
May
(25) |
Jun
(25) |
Jul
(4) |
Aug
(21) |
Sep
(16) |
Oct
(44) |
Nov
(15) |
Dec
(3) |
2009 |
Jan
(9) |
Feb
(6) |
Mar
(2) |
Apr
(2) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(4) |
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(2) |
Oct
(3) |
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(5) |
Sep
|
Oct
(3) |
Nov
|
Dec
(2) |
2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
(3) |
May
(2) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
(1) |
2013 |
Jan
(3) |
Feb
(4) |
Mar
|
Apr
(4) |
May
(2) |
Jun
(1) |
Jul
(3) |
Aug
(3) |
Sep
(1) |
Oct
(1) |
Nov
(10) |
Dec
|
2014 |
Jan
(6) |
Feb
(2) |
Mar
|
Apr
(3) |
May
(8) |
Jun
(5) |
Jul
(2) |
Aug
(6) |
Sep
(2) |
Oct
(1) |
Nov
|
Dec
(2) |
2015 |
Jan
(1) |
Feb
(2) |
Mar
(2) |
Apr
(6) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: Magnus H. <leg...@us...> - 2014-09-23 22:44:56
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 2ada81d8664763700430d3e6aa9ea776e712631a (commit) from 7df437d1d8beeca967d0372f36862a27f507ffbc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 2ada81d8664763700430d3e6aa9ea776e712631a Author: Magnus Henoch <mag...@gm...> Date: Tue Sep 23 23:35:28 2014 +0100 Fix error responses to IQs without 'from' or 'id' attributes If an incoming IQ had no 'from' attribute, and we would try to send an error response to it, then the response actually sent would have to='nil', as jabber-sexp2xml converts the 'nil' symbol to an attribute value, but the XML console would fail to display the response. Avoid this by omitting the 'to' attribute in this case. If the incoming IQ had no 'id' attribute, the same would happen: the response sent on the wire would have id='nil', and the console would fail to print it. Section 8.3.1 of RFC 6120 says that the id attribute of the response should be empty if the id attribute in the request was absent, so let's do that here. diff --git a/jabber-iq.el b/jabber-iq.el index 2d8b502..a4a4121 100644 --- a/jabber-iq.el +++ b/jabber-iq.el @@ -152,9 +152,9 @@ APP-SPECIFIC is a list of extra XML tags. See section 9.3 of XMPP Core." (jabber-send-sexp jc - `(iq ((to . ,to) + `(iq (,@(when to `((to . ,to))) (type . "error") - (id . ,id)) + (id . ,(or id ""))) ,original-query (error ((type . ,error-type)) (,condition ((xmlns . "urn:ietf:params:xml:ns:xmpp-stanzas"))) ----------------------------------------------------------------------- Summary of changes: jabber-iq.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-08-29 09:57:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 7df437d1d8beeca967d0372f36862a27f507ffbc (commit) via 662442143dca54393c66ac710fc5aedd78c8b850 (commit) from e1c008cfb95202720613bcdb361dec86aa855285 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7df437d1d8beeca967d0372f36862a27f507ffbc Author: Magnus Henoch <mag...@gm...> Date: Fri Aug 29 10:40:30 2014 +0100 Support "instant configuration" of MUC rooms diff --git a/jabber-muc.el b/jabber-muc.el index a525c8a..95066e3 100644 --- a/jabber-muc.el +++ b/jabber-muc.el @@ -405,6 +405,20 @@ JID; only provide completion as a guide." (let ((muc-name (format "%s/%s" group nickname))) (jabber-vcard-get jc muc-name))) +(defun jabber-muc-instant-config (jc group) + "Accept default configuration for GROUP. +This can be used for a newly created room, as an alternative to +filling out the configuration form with `jabber-muc-get-config'. +Both of these methods unlock the room, so that other users can +enter it." + (interactive (jabber-muc-argument-list)) + (jabber-send-iq jc group + "set" + '(query ((xmlns . "http://jabber.org/protocol/muc#owner")) + (x ((xmlns . "jabber:x:data") (type . "submit")))) + #'jabber-report-success "MUC instant configuration" + #'jabber-report-success "MUC instant configuration")) + (add-to-list 'jabber-jid-muc-menu (cons "Configure groupchat" 'jabber-muc-get-config)) @@ -1135,7 +1149,6 @@ Return nil if X-MUC is nil." ;; Was this room just created? If so, it's a locked ;; room. Notify the user. (when (member "201" status-codes) - ;; TODO: suggest instant configuration (ewoc-enter-last jabber-chat-ewoc (list :muc-notice @@ -1145,6 +1158,10 @@ Return nil if X-MUC is nil." (insert-text-button "configure the room" 'action (apply-partially 'call-interactively 'jabber-muc-get-config)) + (insert " or ") + (insert-text-button + "accept the default configuration" + 'action (apply-partially 'call-interactively 'jabber-muc-instant-config)) (insert ".") (buffer-string)) :time (current-time)))))))))))) commit 662442143dca54393c66ac710fc5aedd78c8b850 Author: Magnus Henoch <mag...@gm...> Date: Fri Aug 29 10:33:02 2014 +0100 Add link to room configuration if room is locked diff --git a/jabber-muc.el b/jabber-muc.el index 19b912d..a525c8a 100644 --- a/jabber-muc.el +++ b/jabber-muc.el @@ -1135,13 +1135,18 @@ Return nil if X-MUC is nil." ;; Was this room just created? If so, it's a locked ;; room. Notify the user. (when (member "201" status-codes) - ;; TODO: suggest instant configuration, and add - ;; clickable buttons. + ;; TODO: suggest instant configuration (ewoc-enter-last jabber-chat-ewoc (list :muc-notice - (concat "This room was just created, and is locked to other participants.\n" - "To unlock it, configure the room.") + (with-temp-buffer + (insert "This room was just created, and is locked to other participants.\n" + "To unlock it, ") + (insert-text-button + "configure the room" + 'action (apply-partially 'call-interactively 'jabber-muc-get-config)) + (insert ".") + (buffer-string)) :time (current-time)))))))))))) (provide 'jabber-muc) ----------------------------------------------------------------------- Summary of changes: jabber-muc.el | 30 ++++++++++++++++++++++++++---- 1 files changed, 26 insertions(+), 4 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-08-27 10:56:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via e1c008cfb95202720613bcdb361dec86aa855285 (commit) from 0951030fa43fdb6df1d046cded631018be578e7b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e1c008cfb95202720613bcdb361dec86aa855285 Author: Magnus Henoch <mag...@gm...> Date: Wed Aug 27 10:36:58 2014 +0100 Compare nickname as well to find MUC self-presence Not all MUC servers send 110 status codes. diff --git a/jabber-muc.el b/jabber-muc.el index 9a8bd97..19b912d 100644 --- a/jabber-muc.el +++ b/jabber-muc.el @@ -1090,8 +1090,18 @@ Return nil if X-MUC is nil." (t ;; someone is entering - (when (member "110" status-codes) + (when (or (member "110" status-codes) (string= nickname our-nickname)) ;; This is us. We just succeeded in entering the room. + ;; + ;; The MUC server is supposed to send a 110 code whenever this + ;; is our presence ("self-presence"), but at least one + ;; (ejabberd's mod_irc) doesn't, so check the nickname as well. + ;; + ;; This check might give incorrect results if the server + ;; changed our nickname to avoid collision with an existing + ;; participant, but even in this case the window where we have + ;; incorrect information should be very small, as we should be + ;; getting our own 110+210 presence shortly. (let ((whichgroup (assoc group *jabber-active-groupchats*))) (if whichgroup (setcdr whichgroup nickname) ----------------------------------------------------------------------- Summary of changes: jabber-muc.el | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-08-14 10:08:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 0951030fa43fdb6df1d046cded631018be578e7b (commit) from 090c983aa3b0e7a72f059455cfdeac9d799ea5fc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0951030fa43fdb6df1d046cded631018be578e7b Author: Adam Sjøgren <as...@ko...> Date: Tue Aug 12 19:10:55 2014 +0200 Use avatar from cache in notifications.el notifications It seems that (get jid 'avatar) has started returning something different than previously (a binary blob, instead of a plist). diff --git a/jabber-notifications.el b/jabber-notifications.el index d947311..cb7963b 100644 --- a/jabber-notifications.el +++ b/jabber-notifications.el @@ -59,11 +59,12 @@ (or title (or jabber-notifications-message-header " ") text))) - (avatar (get (jabber-jid-symbol from) 'avatar))) + (avatar-hash (get (jabber-jid-symbol from) 'avatar-hash))) (notifications-notify :title title :body body - :app-icon (or (and avatar (plist-get (cdr avatar) ':file)) jabber-notifications-icon) + :app-icon (or (and avatar-hash (jabber-avatar-find-cached avatar-hash)) + jabber-notifications-icon) :app-name jabber-notifications-app :category "jabber.message" :timeout jabber-notifications-timeout))) ----------------------------------------------------------------------- Summary of changes: jabber-notifications.el | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-08-12 21:18:42
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 090c983aa3b0e7a72f059455cfdeac9d799ea5fc (commit) from 6113c371232d68a3fa56e5903feafdedf34f8d85 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 090c983aa3b0e7a72f059455cfdeac9d799ea5fc Author: Magnus Henoch <mag...@gm...> Date: Tue Aug 12 22:17:53 2014 +0100 Require goto-addr before calling goto-address-fontify goto-address is autoloaded, but goto-address-fontify is not. diff --git a/jabber-chat.el b/jabber-chat.el index c12e22c..f27af4b 100644 --- a/jabber-chat.el +++ b/jabber-chat.el @@ -616,6 +616,8 @@ If DONT-PRINT-NICK-P is true, don't include nickname." "Call `goto-address' on the newly written text." (when (eq mode :insert) (ignore-errors + ;; `goto-address' is autoloaded, but `goto-address-fontify' is not. + (require 'goto-addr) (let ((end (point)) (limit (max (- (point) 1000) (1+ (point-min))))) ;; We only need to fontify the text written since the last ----------------------------------------------------------------------- Summary of changes: jabber-chat.el | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-08-11 10:15:37
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 6113c371232d68a3fa56e5903feafdedf34f8d85 (commit) via 4229a1c8f4182e3a566f29bddaf0adbd19451ca2 (commit) via 2303708402cba35627970aaa9ea14c754f3cba72 (commit) via d374ff85bab670431cdc2b91634f092b33a670bd (commit) from 4b9c46232e83efae34ff8497325fae0e3b5675aa (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6113c371232d68a3fa56e5903feafdedf34f8d85 Author: Magnus Henoch <mag...@gm...> Date: Mon Aug 11 10:28:44 2014 +0100 Be more clever about identifying self-presence for MUC Presence stanzas that concern us have status code 110. This is particularly important to notice when the server changes our nick for us (status code 210). diff --git a/jabber-muc.el b/jabber-muc.el index ad443cc..9a8bd97 100644 --- a/jabber-muc.el +++ b/jabber-muc.el @@ -998,6 +998,7 @@ Return nil if X-MUC is nil." (group (jabber-jid-user from)) (nickname (jabber-jid-resource from)) (symbol (jabber-jid-symbol from)) + (our-nickname (gethash symbol jabber-pending-groupchats)) (item (car (jabber-xml-get-children x-muc 'item))) (actor (jabber-xml-get-attribute (car (jabber-xml-get-children item 'actor)) 'jid)) (reason (car (jabber-xml-node-children (car (jabber-xml-get-children item 'reason))))) @@ -1013,7 +1014,8 @@ Return nil if X-MUC is nil." ((or (string= type "unavailable") (string= type "error")) ;; error from room itself? or are we leaving? (if (or (null nickname) - (string= nickname (gethash (jabber-jid-symbol group) jabber-pending-groupchats))) + (member "110" status-codes) + (string= nickname our-nickname)) ;; Assume that an error means that we were thrown out of the ;; room... (let* ((leavingp t) @@ -1088,12 +1090,14 @@ Return nil if X-MUC is nil." (t ;; someone is entering - (when (string= nickname (gethash (jabber-jid-symbol group) jabber-pending-groupchats)) - ;; Our own nick? We just succeeded in entering the room. + (when (member "110" status-codes) + ;; This is us. We just succeeded in entering the room. (let ((whichgroup (assoc group *jabber-active-groupchats*))) (if whichgroup (setcdr whichgroup nickname) - (add-to-list '*jabber-active-groupchats* (cons group nickname))))) + (add-to-list '*jabber-active-groupchats* (cons group nickname)))) + ;; The server may have changed our nick. Record the new one. + (puthash symbol nickname jabber-pending-groupchats)) ;; Whoever enters, we create a buffer (if it didn't already ;; exist), and print a notice. This is where autojoined MUC @@ -1111,6 +1115,13 @@ Return nil if X-MUC is nil." jabber-chat-ewoc (list :muc-notice report :time (current-time)))) + ;; Did the server change our nick? + (when (member "210" status-codes) + (ewoc-enter-last + jabber-chat-ewoc + (list :muc-notice + (concat "Your nick was changed to " nickname " by the server") + :time (current-time)))) ;; Was this room just created? If so, it's a locked ;; room. Notify the user. (when (member "201" status-codes) commit 4229a1c8f4182e3a566f29bddaf0adbd19451ca2 Author: Magnus Henoch <mag...@gm...> Date: Mon Aug 11 10:09:26 2014 +0100 Note if newly created MUC room is locked to others diff --git a/jabber-muc.el b/jabber-muc.el index 4ef729d..ad443cc 100644 --- a/jabber-muc.el +++ b/jabber-muc.el @@ -1110,7 +1110,18 @@ Return nil if X-MUC is nil." (ewoc-enter-last jabber-chat-ewoc (list :muc-notice report - :time (current-time)))))))))))) + :time (current-time)))) + ;; Was this room just created? If so, it's a locked + ;; room. Notify the user. + (when (member "201" status-codes) + ;; TODO: suggest instant configuration, and add + ;; clickable buttons. + (ewoc-enter-last + jabber-chat-ewoc + (list :muc-notice + (concat "This room was just created, and is locked to other participants.\n" + "To unlock it, configure the room.") + :time (current-time)))))))))))) (provide 'jabber-muc) commit 2303708402cba35627970aaa9ea14c754f3cba72 Author: Magnus Henoch <mag...@gm...> Date: Mon Aug 11 10:00:38 2014 +0100 Prepare to observe more than one status code in MUC presence diff --git a/jabber-muc.el b/jabber-muc.el index 2efb37e..4ef729d 100644 --- a/jabber-muc.el +++ b/jabber-muc.el @@ -1002,9 +1002,12 @@ Return nil if X-MUC is nil." (actor (jabber-xml-get-attribute (car (jabber-xml-get-children item 'actor)) 'jid)) (reason (car (jabber-xml-node-children (car (jabber-xml-get-children item 'reason))))) (error-node (car (jabber-xml-get-children presence 'error))) - (status-code (if error-node - (jabber-xml-get-attribute error-node 'code) - (jabber-xml-get-attribute (car (jabber-xml-get-children x-muc 'status)) 'code)))) + (status-codes (if error-node + (list (jabber-xml-get-attribute error-node 'code)) + (mapcar + (lambda (status-element) + (jabber-xml-get-attribute status-element 'code)) + (jabber-xml-get-children x-muc 'status))))) ;; handle leaving a room (cond ((or (string= type "unavailable") (string= type "error")) @@ -1018,8 +1021,8 @@ Return nil if X-MUC is nil." ((string= type "error") (cond ;; ...except for certain cases. - ((or (equal status-code "406") - (equal status-code "409")) + ((or (member "406" status-codes) + (member "409" status-codes)) (setq leavingp nil) (concat "Nickname change not allowed" (when error-node @@ -1028,11 +1031,11 @@ Return nil if X-MUC is nil." (concat "Error entering room" (when error-node (concat ": " (jabber-parse-error error-node))))))) - ((equal status-code "301") + ((member "301" status-codes) (concat "You have been banned" (when actor (concat " by " actor)) (when reason (concat " - '" reason "'")))) - ((equal status-code "307") + ((member "307" status-codes) (concat "You have been kicked" (when actor (concat " by " actor)) (when reason (concat " - '" reason "'")))) @@ -1068,15 +1071,15 @@ Return nil if X-MUC is nil." jabber-chat-ewoc (list :muc-notice (cond - ((equal status-code "301") + ((member "301" status-codes) (concat name " has been banned" (when actor (concat " by " actor)) (when reason (concat " - '" reason "'")))) - ((equal status-code "307") + ((member "307" status-codes) (concat name " has been kicked" (when actor (concat " by " actor)) (when reason (concat " - '" reason "'")))) - ((equal status-code "303") + ((member "303" status-codes) (concat name " changes nickname to " (jabber-xml-get-attribute item 'nick))) (t commit d374ff85bab670431cdc2b91634f092b33a670bd Author: Magnus Henoch <mag...@gm...> Date: Mon Aug 11 09:49:53 2014 +0100 Clear MUC data on disconnection Avoid "phantom" participants when we reconnect and rejoin an MUC room. diff --git a/jabber-core.el b/jabber-core.el index 6785376..4c757c8 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -289,6 +289,8 @@ With double prefix argument, specify more connection details." (not jabber-debug-keep-process-buffers)) (kill-buffer process-buffer))))) (setq state-data (plist-put state-data :connection nil)) + ;; Clear MUC data + (jabber-muc-connection-closed (jabber-connection-bare-jid fsm)) ;; Remove lost connections from the roster buffer. (jabber-display-roster) (let ((expected (plist-get state-data :disconnection-expected)) @@ -812,7 +814,6 @@ Call this function after disconnection." (erase-buffer)))) (jabber-clear-roster) - (setq *jabber-active-groupchats* nil) (run-hooks 'jabber-post-disconnect-hook)) (defun jabber-log-xml (fsm direction data) diff --git a/jabber-muc.el b/jabber-muc.el index ba713a4..2efb37e 100644 --- a/jabber-muc.el +++ b/jabber-muc.el @@ -243,6 +243,23 @@ This function is idempotent." (setq jabber-muc-participants (delq whichparticipants jabber-muc-participants)))) +(defun jabber-muc-connection-closed (bare-jid) + "Remove MUC data for BARE-JID. +Forget all information about rooms that had been entered with +this JID. Suitable to call when the connection is closed." + (dolist (room-entry jabber-muc-participants) + (let* ((room (car room-entry)) + (buffer (get-buffer (jabber-muc-get-buffer room)))) + (when (bufferp buffer) + (with-current-buffer buffer + (when (string= bare-jid + (jabber-connection-bare-jid jabber-buffer-connection)) + (setq *jabber-active-groupchats* + (delete* room *jabber-active-groupchats* + :key #'car :test #'string=)) + (setq jabber-muc-participants + (delq room-entry jabber-muc-participants)))))))) + (defun jabber-muc-participant-plist (group nickname) "Return plist associated with NICKNAME in GROUP. Return nil if nothing known about that combination." ----------------------------------------------------------------------- Summary of changes: jabber-core.el | 3 +- jabber-muc.el | 72 ++++++++++++++++++++++++++++++++++++++++++++----------- 2 files changed, 59 insertions(+), 16 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-08-08 17:16:20
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 4b9c46232e83efae34ff8497325fae0e3b5675aa (commit) via aedd89f5912a24e6bfacfd34a8ce4bbf57e5d51c (commit) from 3f168ae5c1f7b40c2935158b99354c97bc82ab59 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4b9c46232e83efae34ff8497325fae0e3b5675aa Author: Magnus Henoch <mag...@gm...> Date: Fri Aug 8 18:14:33 2014 +0100 Fix prompt and /me messages for private MUC messages Previously these would be printed with the group's JID. Now they use the nick of the person you're chatting with instead. diff --git a/jabber-chat.el b/jabber-chat.el index 60191ca..c12e22c 100644 --- a/jabber-chat.el +++ b/jabber-chat.el @@ -382,11 +382,14 @@ This function is used as an ewoc prettyprinter." delayed /me-p)) (:foreign - ;; For :error and :notice, this might be a string... beware - (jabber-chat-print-prompt (when (listp (cadr data)) (cadr data)) - (or original-timestamp internal-time) - delayed - /me-p)) + (if (and (listp (cadr data)) + (jabber-muc-private-message-p (cadr data))) + (jabber-muc-private-print-prompt (cadr data)) + ;; For :error and :notice, this might be a string... beware + (jabber-chat-print-prompt (when (listp (cadr data)) (cadr data)) + (or original-timestamp internal-time) + delayed + /me-p))) ((:error :notice :subscription-request) (jabber-chat-system-prompt (or original-timestamp internal-time))) (:muc-local @@ -573,7 +576,8 @@ If DONT-PRINT-NICK-P is true, don't include nickname." (nick (cond ((eq who :local) (plist-get (fsm-get-state-data jabber-buffer-connection) :username)) - ((jabber-muc-message-p xml-data) + ((or (jabber-muc-message-p xml-data) + (jabber-muc-private-message-p xml-data)) (jabber-jid-resource (jabber-xml-get-attribute xml-data 'from))) (t (jabber-jid-displayname (jabber-xml-get-attribute xml-data 'from)))))) commit aedd89f5912a24e6bfacfd34a8ce4bbf57e5d51c Author: Magnus Henoch <mag...@gm...> Date: Fri Aug 8 09:33:38 2014 +0100 Chat prompts are fields; use for goto-address Give all chat prompts a 'field property. This changes behaviour, hopefully to the better. For example, C-a will now stop at the beginning of the chat text; use C-b C-a at that point to go to the beginning of the prompt. Use the field property to improve jabber-chat-goto-address. Previously, we would try to make URLs clickable in the entire buffer, which besides being wasteful would cease working once the buffer size was past goto-address-fontify-maximum-size. diff --git a/jabber-chat.el b/jabber-chat.el index ab8d2e2..60191ca 100644 --- a/jabber-chat.el +++ b/jabber-chat.el @@ -374,7 +374,8 @@ This function is used as an ewoc prettyprinter." (string= (substring body 0 4) "/me ")))) ;; Print prompt... - (let ((delayed (or original-timestamp (plist-get (cddr data) :delayed)))) + (let ((delayed (or original-timestamp (plist-get (cddr data) :delayed))) + (prompt-start (point))) (case (car data) (:local (jabber-chat-self-prompt (or original-timestamp internal-time) @@ -393,7 +394,8 @@ This function is used as an ewoc prettyprinter." (:muc-foreign (jabber-muc-print-prompt (cadr data) nil /me-p)) ((:muc-notice :muc-error) - (jabber-muc-system-prompt)))) + (jabber-muc-system-prompt))) + (put-text-property prompt-start (point) 'field 'jabber-prompt)) ;; ...and body (case (car data) @@ -609,8 +611,13 @@ If DONT-PRINT-NICK-P is true, don't include nickname." (defun jabber-chat-goto-address (xml-data who mode) "Call `goto-address' on the newly written text." (when (eq mode :insert) - (ignore-errors - (goto-address)))) + (ignore-errors + (let ((end (point)) + (limit (max (- (point) 1000) (1+ (point-min))))) + ;; We only need to fontify the text written since the last + ;; prompt. The prompt has a field property, so we can find it + ;; using `field-beginning'. + (goto-address-fontify (field-beginning nil nil limit) end))))) ;; jabber-compose is autoloaded in jabber.el (add-to-list 'jabber-jid-chat-menu ----------------------------------------------------------------------- Summary of changes: jabber-chat.el | 31 +++++++++++++++++++++---------- 1 files changed, 21 insertions(+), 10 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-07-11 07:32:50
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 3f168ae5c1f7b40c2935158b99354c97bc82ab59 (commit) from 54907e7b118be0a70d392c2442a3829d405a43e1 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 3f168ae5c1f7b40c2935158b99354c97bc82ab59 Author: Magnus Henoch <mag...@gm...> Date: Thu Jul 10 18:42:28 2014 +0100 Don't print enter function in fsm debug output Most of the time it's just compiled byte code anyway. diff --git a/fsm.el b/fsm.el index 75f9650..b7f6225 100644 --- a/fsm.el +++ b/fsm.el @@ -330,7 +330,7 @@ CALLBACK with the response as only argument." (fsm-debug-output "%s enters %s" fsm-name new-state) (let ((enter-fn (gethash new-state (get fsm-name :fsm-enter)))) (when (functionp enter-fn) - (fsm-debug-output "Found enter function for %S: %S" new-state enter-fn) + (fsm-debug-output "Found enter function for %S" new-state) (condition-case e (destructuring-bind (newer-state-data newer-timeout) (funcall enter-fn fsm new-state-data) ----------------------------------------------------------------------- Summary of changes: fsm.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-07-10 09:46:30
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 54907e7b118be0a70d392c2442a3829d405a43e1 (commit) from 9f41bb1ed996bd77f3594e85ef05584969710b94 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 54907e7b118be0a70d392c2442a3829d405a43e1 Author: Adam Sjøgren <as...@ko...> Date: Mon Jul 7 21:55:55 2014 +0200 Add type="chat" to chatstate notifications. This improves interoperability with the client Profanity. Comparing what Pidgin sends to what jabber.el did, the difference was that Pidgin includes an id- and a type attribute. Adding just the 'type' was enough to make Profanity recognize the notifications sent by jabber.el. diff --git a/jabber-chatstates.el b/jabber-chatstates.el index 0cdc3d1..9cd561e 100644 --- a/jabber-chatstates.el +++ b/jabber-chatstates.el @@ -106,7 +106,8 @@ It can be sent and cancelled several times.") (jabber-send-sexp jabber-buffer-connection `(message - ((to . ,jabber-chatting-with)) + ((to . ,jabber-chatting-with) + (type . "chat")) (paused ((xmlns . ,jabber-chatstates-xmlns))))))) (defun jabber-chatstates-after-change () @@ -119,7 +120,8 @@ It can be sent and cancelled several times.") (jabber-send-sexp jabber-buffer-connection `(message - ((to . ,jabber-chatting-with)) + ((to . ,jabber-chatting-with) + (type . "chat")) (,state ((xmlns . ,jabber-chatstates-xmlns))))) (when (setq jabber-chatstates-composing-sent composing-now) (jabber-chatstates-kick-timer))))) ----------------------------------------------------------------------- Summary of changes: jabber-chatstates.el | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-06-23 09:09:16
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 9f41bb1ed996bd77f3594e85ef05584969710b94 (commit) from 5453338333431e07e23277ccc86d929aaf3a744c (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 9f41bb1ed996bd77f3594e85ef05584969710b94 Author: Magnus Henoch <mag...@gm...> Date: Mon Jun 23 09:35:08 2014 +0100 Warn about incorrect return values in fsm-send-sync Previously we would crash in destructuring-bind, but this produces rather unhelpful error messages. Better log it in *fsm-debug*, pointing to the source of the error. diff --git a/fsm.el b/fsm.el index 1ffe941..75f9650 100644 --- a/fsm.el +++ b/fsm.el @@ -375,9 +375,15 @@ CALLBACK with the response as only argument." (fsm-debug-output "Error in %s/%s: %s" fsm-name state (error-message-string (cdr result)))) - (t + ((and (listp result) + (<= 2 (length result)) + (<= (length result) 3)) (destructuring-bind (new-state new-state-data &optional timeout) result - (fsm-update fsm new-state new-state-data timeout)))))))) + (fsm-update fsm new-state new-state-data timeout))) + (t + (fsm-debug-output "Incorrect return value in %s/%s: %S" + fsm-name state + result))))))) (defun fsm-call (fsm event) "Send EVENT to FSM synchronously, and wait for a reply. ----------------------------------------------------------------------- Summary of changes: fsm.el | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |
From: Evgenii T. <evg...@us...> - 2014-06-20 08:30:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 5453338333431e07e23277ccc86d929aaf3a744c (commit) from 0df441a41092596b2dde47442c310c54dd797e07 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 5453338333431e07e23277ccc86d929aaf3a744c Author: Evgenii Terechkov <ev...@al...> Date: Fri Jun 20 16:25:23 2014 +0800 Typo in filename fixed diff --git a/Makefile.am b/Makefile.am index 23daa88..9b43844 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,7 +6,7 @@ AUTOMAKE_OPTIONS = 1.11 my_lisp_sources=fsm.el jabber-activity.el jabber-ahc-presence.el \ jabber-ahc.el jabber-alert.el jabber-autoaway.el jabber-avatar.el \ jabber-awesome.el jabber-ping.el jabber-libnotify.el jabber-console.el \ -jabber-notifications \ +jabber-notifications.el \ jabber-bookmarks.el jabber-browse.el jabber-chat.el \ jabber-chatbuffer.el jabber-chatstates.el jabber-compose.el \ jabber-conn.el jabber-core.el jabber-disco.el jabber-events.el \ ----------------------------------------------------------------------- Summary of changes: Makefile.am | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-06-12 21:57:14
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 0df441a41092596b2dde47442c310c54dd797e07 (commit) from 1ea60b5549345a297309e9087388987dd6fbec89 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0df441a41092596b2dde47442c310c54dd797e07 Author: Magnus Henoch <mag...@gm...> Date: Thu Jun 12 19:59:48 2014 +0100 Fix closure data when retrying caps disco request The closure data used in jabber-process-caps-modern was a three-element list, while the one used in jabber-caps-try-next was a cons cell. This led to crashes in jabber-process-caps-info-error when there were more than one contact with the same caps hash, all failing to respond. diff --git a/jabber-disco.el b/jabber-disco.el index fcb91ae..cab427f 100644 --- a/jabber-disco.el +++ b/jabber-disco.el @@ -479,8 +479,8 @@ Return (IDENTITIES FEATURES), or nil if not in cache." "get" `(query ((xmlns . "http://jabber.org/protocol/disco#info") (node . ,(concat node "#" ver)))) - #'jabber-process-caps-info-result key - #'jabber-process-caps-info-error key)) + #'jabber-process-caps-info-result (list hash node ver) + #'jabber-process-caps-info-error (list hash node ver))) ;; No, forget about it for now. (remhash key jabber-caps-cache)))))) ----------------------------------------------------------------------- Summary of changes: jabber-disco.el | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-06-11 10:05:35
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 1ea60b5549345a297309e9087388987dd6fbec89 (commit) from 15ea34d2d8b7e6a83cdcd64a3aac13bb1c8452b7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1ea60b5549345a297309e9087388987dd6fbec89 Author: Magnus Henoch <mag...@gm...> Date: Wed Jun 11 10:19:44 2014 +0100 Initialise chat buffer only once Don't clobber local variables. This is needed for OTR. diff --git a/jabber-chat.el b/jabber-chat.el index d08e913..ab8d2e2 100644 --- a/jabber-chat.el +++ b/jabber-chat.el @@ -226,27 +226,28 @@ Either a string or a buffer is returned, so use `get-buffer' or This function is idempotent." (with-current-buffer (get-buffer-create (jabber-chat-get-buffer chat-with)) (unless (eq major-mode 'jabber-chat-mode) - (jabber-chat-mode jc #'jabber-chat-pp)) + (jabber-chat-mode jc #'jabber-chat-pp) + + (make-local-variable 'jabber-chatting-with) + (setq jabber-chatting-with chat-with) + (setq jabber-send-function 'jabber-chat-send) + (setq header-line-format jabber-chat-header-line-format) + + (make-local-variable 'jabber-chat-earliest-backlog) + + ;; insert backlog + (when (null jabber-chat-earliest-backlog) + (let ((backlog-entries (jabber-history-backlog chat-with))) + (if (null backlog-entries) + (setq jabber-chat-earliest-backlog (jabber-float-time)) + (setq jabber-chat-earliest-backlog + (jabber-float-time (jabber-parse-time + (aref (car backlog-entries) 0)))) + (mapc 'jabber-chat-insert-backlog-entry (nreverse backlog-entries)))))) + ;; Make sure the connection variable is up to date. (setq jabber-buffer-connection jc) - (make-local-variable 'jabber-chatting-with) - (setq jabber-chatting-with chat-with) - (setq jabber-send-function 'jabber-chat-send) - (setq header-line-format jabber-chat-header-line-format) - - (make-local-variable 'jabber-chat-earliest-backlog) - - ;; insert backlog - (when (null jabber-chat-earliest-backlog) - (let ((backlog-entries (jabber-history-backlog chat-with))) - (if (null backlog-entries) - (setq jabber-chat-earliest-backlog (jabber-float-time)) - (setq jabber-chat-earliest-backlog - (jabber-float-time (jabber-parse-time - (aref (car backlog-entries) 0)))) - (mapc 'jabber-chat-insert-backlog-entry (nreverse backlog-entries))))) - (current-buffer))) (defun jabber-chat-insert-backlog-entry (msg) ----------------------------------------------------------------------- Summary of changes: jabber-chat.el | 37 +++++++++++++++++++------------------ 1 files changed, 19 insertions(+), 18 deletions(-) hooks/post-receive -- emacs-jabber |
From: Evgenii T. <evg...@us...> - 2014-06-07 11:48:27
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 15ea34d2d8b7e6a83cdcd64a3aac13bb1c8452b7 (commit) from b1cb3f7181f90abb5acbb37370e35cf91c7a4cdb (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 15ea34d2d8b7e6a83cdcd64a3aac13bb1c8452b7 Author: Evgenii Terechkov <ev...@al...> Date: Sat Jun 7 19:12:56 2014 +0800 Notifications alerts by Adam Sjøgren (as...@ko...) diff --git a/Makefile.am b/Makefile.am index ce47ac7..23daa88 100644 --- a/Makefile.am +++ b/Makefile.am @@ -6,6 +6,7 @@ AUTOMAKE_OPTIONS = 1.11 my_lisp_sources=fsm.el jabber-activity.el jabber-ahc-presence.el \ jabber-ahc.el jabber-alert.el jabber-autoaway.el jabber-avatar.el \ jabber-awesome.el jabber-ping.el jabber-libnotify.el jabber-console.el \ +jabber-notifications \ jabber-bookmarks.el jabber-browse.el jabber-chat.el \ jabber-chatbuffer.el jabber-chatstates.el jabber-compose.el \ jabber-conn.el jabber-core.el jabber-disco.el jabber-events.el \ diff --git a/jabber-notifications.el b/jabber-notifications.el new file mode 100644 index 0000000..d947311 --- /dev/null +++ b/jabber-notifications.el @@ -0,0 +1,90 @@ +;; jabber-notifications.el - emacs-jabber interface to notifications.el + +;; Copyright (C) 2014 - Adam Sjøgren - as...@ko... +;; Copyright (C) 2010 - Kirill A. Korinskiy - ca...@ca... +;; Copyright (C) 2007 - Rodrigo Lazo - rla...@gm... + +;; 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 +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program; if not, write to the Free Software +;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +;; Built on jabber-libnotify.el. + +(eval-when-compile (require 'jabber-alert)) +(unless (string< emacs-version "24.1") ;notifications.el preset since Emacs 24.1 + (require 'notifications) + + (defcustom jabber-notifications-icon "" + "Icon to be used on the notification pop-up. Default is empty" + :type '(file :must-match t) + :group 'jabber-alerts) + + (defcustom jabber-notifications-timeout nil + "Specifies the timeout of the pop up window in millisecond" + :type 'integer + :group 'jabber-alerts) + + (defcustom jabber-notifications-message-header "Jabber message" + "Defines the header of the pop up." + :type 'string + :group 'jabber-alerts) + + (defcustom jabber-notifications-app "Emacs Jabber" + "Defines the app of the pop up." + :type 'string + :group 'jabber-alerts) + + (defcustom jabber-notifications-urgency "low" + "Urgency of message" + :type '(choice (const :tag "Low" "low") + (const :tag "Normal" "normal") + (const :tag "Critical" "critical")) + :group 'jabber-alerts) + + (defun jabber-message-notifications (from buffer text title) + "Show a message through the notifications.el interface" + (let + ((body (or (jabber-escape-xml text) " ")) + (head (jabber-escape-xml + (or title + (or jabber-notifications-message-header " ") + text))) + (avatar (get (jabber-jid-symbol from) 'avatar))) + (notifications-notify + :title title + :body body + :app-icon (or (and avatar (plist-get (cdr avatar) ':file)) jabber-notifications-icon) + :app-name jabber-notifications-app + :category "jabber.message" + :timeout jabber-notifications-timeout))) + + (defun jabber-muc-notifications (nick group buffer text title) + "Show MUC message through the notifications.el interface" + (jabber-message-notifications group buffer (if nick (format "%s: %s" nick text) text) title) + ) + + (defun jabber-muc-notifications-personal (nick group buffer text title) + "Show personal MUC message through the notifications.el interface" + (if (jabber-muc-looks-like-personal-p text group) + (jabber-muc-notifications nick group buffer text title)) + ) + + ;; jabber-*-notifications* requires "from" argument, so we cant use + ;; define-jabber-alert/define-personal-jabber-alert here and do the + ;; work by hand: + (pushnew 'jabber-message-notifications (get 'jabber-alert-message-hooks 'custom-options)) + (pushnew 'jabber-muc-notifications (get 'jabber-alert-muc-hooks 'custom-options)) + (pushnew 'jabber-muc-notifications-personal (get 'jabber-alert-muc-hooks 'custom-options)) + ) + +(provide 'jabber-notifications) diff --git a/jabber.el b/jabber.el index ca34584..55eec68 100644 --- a/jabber.el +++ b/jabber.el @@ -154,6 +154,7 @@ configure a Google Talk account like this: (require 'jabber-osd) (require 'jabber-awesome) (require 'jabber-libnotify) +(require 'jabber-notifications) ;;;###autoload (defvar *jabber-current-status* nil diff --git a/jabber.texi b/jabber.texi index 07419e3..d85d5da 100644 --- a/jabber.texi +++ b/jabber.texi @@ -2090,6 +2090,11 @@ XOSD.@footnote{XOSD can be found at @uref{http://www.ignavus.net/software.html}. You also need @file{osd.el} from @uref{http://www.brockman.se/software/osd.el}.} +@cindex notifications.el +The @code{notifications} alerts send a message using Emacs built-in +package @file{notifications.el}. Note that @file{notifications.el} first appear in +Emacs 24.1, so they are disabled by default. + @cindex libnotify @cindex notification-daemon The @code{libnotify} alerts send a message onto your screen using ----------------------------------------------------------------------- Summary of changes: Makefile.am | 1 + jabber-notifications.el | 90 +++++++++++++++++++++++++++++++++++++++++++++++ jabber.el | 1 + jabber.texi | 5 +++ 4 files changed, 97 insertions(+), 0 deletions(-) create mode 100644 jabber-notifications.el hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-05-23 09:08:07
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via b1cb3f7181f90abb5acbb37370e35cf91c7a4cdb (commit) from b7797f15bbda577a2b7365e82734e3a5b0929fe0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b1cb3f7181f90abb5acbb37370e35cf91c7a4cdb Author: Magnus Henoch <mag...@gm...> Date: Fri May 23 09:53:43 2014 +0100 Validate additional data from server in SASL authentication Some SASL mechanisms, e.g. SCRAM-SHA-1, specify that the server should send additional data along with the success response. This data needs to be validated by the client according to the SASL mechanism. diff --git a/jabber-sasl.el b/jabber-sasl.el index ce3fc2e..61d3c56 100644 --- a/jabber-sasl.el +++ b/jabber-sasl.el @@ -128,8 +128,29 @@ Call REMEMBER with the password. REMEMBER is expected to return it as well." (fsm-send jc :authentication-failure)) ((eq (car xml-data) 'success) - (message "Authentication succeeded for %s" (jabber-connection-bare-jid jc)) - (fsm-send jc (cons :authentication-success passphrase)))) + ;; The server might, depending on the mechanism, send + ;; "additional data" (see RFC 4422) with the <success/> element. + ;; Since some SASL mechanisms perform mutual authentication, we + ;; need to pass this data to sasl.el - we're not necessarily + ;; done just because the server says we're done. + (let* ((data (car (jabber-xml-node-children xml-data))) + (decoded (if data + (base64-decode-string data) + ""))) + (sasl-step-set-data step decoded) + (condition-case e + (progn + ;; Check that sasl-next-step doesn't signal an error. + ;; TODO: once sasl.el allows it, check that all steps have + ;; been completed. + (sasl-next-step client step) + (message "Authentication succeeded for %s" (jabber-connection-bare-jid jc)) + (fsm-send jc (cons :authentication-success passphrase))) + (sasl-error + (message "%s: authentication failure: %s" + (jabber-connection-bare-jid jc) + (error-message-string e)) + (fsm-send jc :authentication-failure)))))) (list client step passphrase))) (provide 'jabber-sasl) ----------------------------------------------------------------------- Summary of changes: jabber-sasl.el | 25 +++++++++++++++++++++++-- 1 files changed, 23 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-05-20 00:25:02
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via b7797f15bbda577a2b7365e82734e3a5b0929fe0 (commit) via c51557a2e78f798c89a94fa161c9d80d91d34c29 (commit) via b76837bbb68f4a084e2d6fe37a9ecca7af094da7 (commit) via 3aabccc44559bf8f307e9a9ff60c79e83f2795c0 (commit) from 4735e5c16d9088bf77403781750960d4f4db5f5b (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit b7797f15bbda577a2b7365e82734e3a5b0929fe0 Author: Magnus Henoch <mag...@gm...> Date: Tue May 20 01:23:09 2014 +0100 Remove *jabber-authenticated* variable diff --git a/jabber-core.el b/jabber-core.el index c172bca..6785376 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -41,9 +41,6 @@ (defvar jabber-jid-obarray (make-vector 127 0) "obarray for keeping JIDs") -(defvar *jabber-authenticated* nil - "boolean - are we authenticated") - (defvar *jabber-disconnecting* nil "boolean - are we in the process of disconnecting by free will") @@ -80,7 +77,7 @@ The functions should accept one argument, the connection object." (defcustom jabber-pre-disconnect-hook nil "*Hooks run just before voluntary disconnection -This might be due to failed authentication. Check `*jabber-authenticated*'." +This might be due to failed authentication." :type 'hook :group 'jabber-core) @@ -250,7 +247,6 @@ With double prefix argument, specify more connection details." jabber-connections)) (message "Already connected to %s@%s" username server) - (setq *jabber-authenticated* nil) ;;(jabber-clear-roster) (push (start-jabber-connection username server resource @@ -816,7 +812,6 @@ Call this function after disconnection." (erase-buffer)))) (jabber-clear-roster) - (setq *jabber-authenticated* nil) (setq *jabber-active-groupchats* nil) (run-hooks 'jabber-post-disconnect-hook)) commit c51557a2e78f798c89a94fa161c9d80d91d34c29 Author: Magnus Henoch <mag...@gm...> Date: Tue May 20 01:21:07 2014 +0100 Remove *jabber-connection* variable Obsolete; use jabber-connections instead. diff --git a/jabber-conn.el b/jabber-conn.el index 0131d45..6a4c2d5 100644 --- a/jabber-conn.el +++ b/jabber-conn.el @@ -38,11 +38,6 @@ (require 'srv) -;; This variable holds the connection, which is used for further -;; input/output to the server -(defvar *jabber-connection* nil - "the process that does the actual connection") - (defgroup jabber-conn nil "Jabber Connection Settings" :group 'jabber) diff --git a/jabber-core.el b/jabber-core.el index 8e24134..c172bca 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -397,9 +397,6 @@ With double prefix argument, specify more connection details." (jabber-send-stream-header fsm) - ;;XXX: why is this here? I'll try commenting it out... - ;;(accept-process-output *jabber-connection*) - ;; Next thing happening is the server sending its own <stream:stream> start tag. (list state-data nil)) @@ -818,7 +815,6 @@ Call this function after disconnection." (let ((inhibit-read-only t)) (erase-buffer)))) - (setq *jabber-connection* nil) (jabber-clear-roster) (setq *jabber-authenticated* nil) (setq *jabber-active-groupchats* nil) commit b76837bbb68f4a084e2d6fe37a9ecca7af094da7 Author: Magnus Henoch <mag...@gm...> Date: Tue May 20 01:18:54 2014 +0100 Remove *jabber-connected* variable Obsolete; check whether jabber-connections is non-empty. diff --git a/jabber-core.el b/jabber-core.el index 9df55b3..8e24134 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -41,9 +41,6 @@ (defvar jabber-jid-obarray (make-vector 127 0) "obarray for keeping JIDs") -(defvar *jabber-connected* nil - "boolean - are we connected") - (defvar *jabber-authenticated* nil "boolean - are we authenticated") @@ -405,7 +402,6 @@ With double prefix argument, specify more connection details." ;; Next thing happening is the server sending its own <stream:stream> start tag. - (setq *jabber-connected* t) (list state-data nil)) (define-state jabber-connection :connected @@ -825,7 +821,6 @@ Call this function after disconnection." (setq *jabber-connection* nil) (jabber-clear-roster) (setq *jabber-authenticated* nil) - (setq *jabber-connected* nil) (setq *jabber-active-groupchats* nil) (run-hooks 'jabber-post-disconnect-hook)) diff --git a/jabber-socks5.el b/jabber-socks5.el index fc77523..fa8ac0c 100644 --- a/jabber-socks5.el +++ b/jabber-socks5.el @@ -68,7 +68,7 @@ Values are \"streamhost\" XML nodes.") "Set `jabber-socks5-proxies' and query proxies. This is the set function of `jabber-socks5-proxies-data'." (set-default symbol value) - (when *jabber-connected* + (when jabber-connections (jabber-socks5-query-all-proxies))) (defun jabber-socks5-query-all-proxies (jc &optional callback) commit 3aabccc44559bf8f307e9a9ff60c79e83f2795c0 Author: Magnus Henoch <mag...@gm...> Date: Tue May 20 01:15:28 2014 +0100 Remove "choked" check This hasn't worked since the switch to multi-account, and apparently hasn't been missed. diff --git a/jabber-core.el b/jabber-core.el index 5018aae..9df55b3 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -59,11 +59,6 @@ (defvar jabber-presence-chain nil "Incoming presence notifications are sent to these functions, in order.") -(defvar jabber-choked-count 0 - "Number of successive times that the process buffer has been nonempty.") - -(defvar jabber-choked-timer nil) - (defvar jabber-namespace-prefixes nil "XML namespace prefixes used for the current connection.") (make-variable-buffer-local 'jabber-namespace-prefixes) @@ -260,7 +255,6 @@ With double prefix argument, specify more connection details." username server) (setq *jabber-authenticated* nil) ;;(jabber-clear-roster) - (jabber-reset-choked) (push (start-jabber-connection username server resource registerp password @@ -406,10 +400,6 @@ With double prefix argument, specify more connection details." (jabber-send-stream-header fsm) - ;; XXX: Update to multiaccount? Remove? - ;; (setq jabber-choked-timer - ;; (run-with-timer 5 5 #'jabber-check-choked)) - ;;XXX: why is this here? I'll try commenting it out... ;;(accept-process-output *jabber-connection*) @@ -827,10 +817,6 @@ If DONT-REDISPLAY is non-nil, don't update roster buffer." (defun jabber-disconnected () "Re-initialise jabber package variables. Call this function after disconnection." - (when jabber-choked-timer - (jabber-cancel-timer jabber-choked-timer) - (setq jabber-choked-timer nil)) - (when (get-buffer jabber-roster-buffer) (with-current-buffer (get-buffer jabber-roster-buffer) (let ((inhibit-read-only t)) @@ -918,8 +904,6 @@ DATA is any sexp." (jabber-xml-skip-tag-forward) (> (point) (point-min))) (xml-parse-region (point-min) (point)))) - (if xml-data - (jabber-reset-choked)) while xml-data do @@ -942,45 +926,6 @@ DATA is any sexp." ;; (jabber-process-input (car xml-data)) )))) -(defun jabber-reset-choked () - (setq jabber-choked-count 0)) - -(defun jabber-check-choked () - ;; "Choked" means that data is sitting in the process buffer - ;; without being parsed, despite several attempts. - (if (zerop (buffer-size (process-buffer *jabber-connection*))) - (jabber-reset-choked) - (incf jabber-choked-count) - (if (and (> jabber-choked-count 3) - ;; Now we're definitely choked. Take action. - ;; But ask user first. - (yes-or-no-p "jabber.el is severely confused. Bail out? ")) - (run-with-idle-timer 0.1 nil 'jabber-choked-bail-out) - (jabber-reset-choked)))) - -(defun jabber-choked-bail-out () - ;; So here we are. Something in the process buffer prevents us - ;; from continuing normally. Let's die honorably by providing - ;; bug report material. - (with-current-buffer (generate-new-buffer "*jabber-bug*") - (insert "jabber.el couldn't cope with the data received from the server. -This should never happen, but apparently it did. - -The information below will be helpful in tracking down and fixing -the bug. You may want to edit out any sensitive information. - -Please go to -http://sourceforge.net/tracker/?group_id=88346&atid=586350 and -submit a bug report, including the information below. - -") - (goto-address) - (emacs-version t) - (insert "\n\nThe following couldn't be parsed:\n") - (insert-buffer-substring (process-buffer *jabber-connection*)) - (switch-to-buffer (current-buffer))) - (jabber-disconnect)) - (defun jabber-process-input (jc xml-data) "process an incoming parsed tag" (let* ((tag (jabber-xml-node-name xml-data)) ----------------------------------------------------------------------- Summary of changes: jabber-conn.el | 5 ---- jabber-core.el | 71 +----------------------------------------------------- jabber-socks5.el | 2 +- 3 files changed, 2 insertions(+), 76 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-05-12 21:41:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 4735e5c16d9088bf77403781750960d4f4db5f5b (commit) from 7c8c72a17b8e026ab5f9f7423d2f33683bf39763 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 4735e5c16d9088bf77403781750960d4f4db5f5b Author: Magnus Henoch <mag...@gm...> Date: Mon May 12 21:44:32 2014 +0100 Fix hook call in jabber-keepalive-timeout This should be run-hook-with-args, as we now pass an argument to the jabber-lost-connection-hooks. diff --git a/jabber-keepalive.el b/jabber-keepalive.el index 33297a6..e89592c 100644 --- a/jabber-keepalive.el +++ b/jabber-keepalive.el @@ -116,7 +116,7 @@ for all accounts regardless of the argument." (current-time-string) (plist-get (fsm-get-state-data c) :server)) - (run-hooks jabber-lost-connection-hooks c) + (run-hook-with-args 'jabber-lost-connection-hooks c) (jabber-disconnect-one c nil))) ;;;; Whitespace pings - less traffic, no error checking on our side ----------------------------------------------------------------------- Summary of changes: jabber-keepalive.el | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-05-09 09:17:06
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 7c8c72a17b8e026ab5f9f7423d2f33683bf39763 (commit) from 57594244d38ce2dff1031dbcef2eed0508438be0 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 7c8c72a17b8e026ab5f9f7423d2f33683bf39763 Author: Magnus Henoch <mag...@gm...> Date: Fri May 9 01:46:17 2014 +0100 Remember stream features after authentication The features reported after authentication are the ones that may be relevant for the established session. diff --git a/jabber-core.el b/jabber-core.el index c75370d..5018aae 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -657,6 +657,8 @@ With double prefix argument, specify more connection details." (let ((stanza (cadr event))) (cond ((eq (jabber-xml-node-name stanza) 'features) + ;; Record stream features, discarding earlier data: + (setq state-data (plist-put state-data :stream-features stanza)) (if (and (jabber-xml-get-children stanza 'bind) (jabber-xml-get-children stanza 'session)) (labels ----------------------------------------------------------------------- Summary of changes: jabber-core.el | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-05-04 20:33:25
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 57594244d38ce2dff1031dbcef2eed0508438be0 (commit) from 1d8ad84343cf2c7b300c43b9042a563a20ae9063 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 57594244d38ce2dff1031dbcef2eed0508438be0 Author: Magnus Henoch <mag...@gm...> Date: Sun May 4 21:31:58 2014 +0100 Reorganise Jabber menu Put connection-related items first, including changing presence status. Then come chat-related items, also adding "send subscription request". diff --git a/jabber-menu.el b/jabber-menu.el index 8cec04b..528181e 100644 --- a/jabber-menu.el +++ b/jabber-menu.el @@ -30,25 +30,11 @@ '("Connect" . jabber-connect-all)) (define-key-after map - [jabber-menu-chat-with] - '(menu-item "Chat with..." jabber-chat-with - :enable (bound-and-true-p jabber-connections))) - - (define-key-after map - [jabber-menu-nextmsg] - '(menu-item "Next unread message" jabber-activity-switch-to - :enable (bound-and-true-p jabber-activity-jids))) - - (define-key-after map [jabber-menu-disconnect] '(menu-item "Disconnect" jabber-disconnect :enable (bound-and-true-p jabber-connections))) (define-key-after map - [jabber-menu-roster] - '("Switch to roster" . jabber-switch-to-roster-buffer)) - - (define-key-after map [jabber-menu-status] `(menu-item "Set Status" ,(make-sparse-keymap "set-status") :enable (bound-and-true-p jabber-connections))) @@ -96,6 +82,30 @@ '(menu-item "--")) (define-key-after map + [jabber-menu-chat-with] + '(menu-item "Chat with..." jabber-chat-with + :enable (bound-and-true-p jabber-connections))) + + (define-key-after map + [jabber-menu-nextmsg] + '(menu-item "Next unread message" jabber-activity-switch-to + :enable (bound-and-true-p jabber-activity-jids))) + + (define-key-after map + [jabber-menu-send-subscription-request] + '(menu-item "Send subscription request" jabber-send-subscription-request + :enable (bound-and-true-p jabber-connections))) + + (define-key-after map + [jabber-menu-roster] + '("Switch to roster" . jabber-switch-to-roster-buffer)) + + (define-key-after map + [separator2] + '(menu-item "--")) + + + (define-key-after map [jabber-menu-customize] '("Customize" . jabber-customize)) ----------------------------------------------------------------------- Summary of changes: jabber-menu.el | 38 ++++++++++++++++++++++++-------------- 1 files changed, 24 insertions(+), 14 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-05-04 00:13:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 1d8ad84343cf2c7b300c43b9042a563a20ae9063 (commit) via 637cbe4114c51028e6e96de964d8d5d7145fd136 (commit) from e726d72a61e5743eb326a50fc0eb379f577fa0d4 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 1d8ad84343cf2c7b300c43b9042a563a20ae9063 Author: Magnus Henoch <mag...@gm...> Date: Sun May 4 01:13:33 2014 +0100 Add "Chat with" menu item diff --git a/jabber-menu.el b/jabber-menu.el index 98c972f..8cec04b 100644 --- a/jabber-menu.el +++ b/jabber-menu.el @@ -30,6 +30,11 @@ '("Connect" . jabber-connect-all)) (define-key-after map + [jabber-menu-chat-with] + '(menu-item "Chat with..." jabber-chat-with + :enable (bound-and-true-p jabber-connections))) + + (define-key-after map [jabber-menu-nextmsg] '(menu-item "Next unread message" jabber-activity-switch-to :enable (bound-and-true-p jabber-activity-jids))) commit 637cbe4114c51028e6e96de964d8d5d7145fd136 Author: Magnus Henoch <mag...@gm...> Date: Sun May 4 01:10:32 2014 +0100 Radio buttons for status menu items diff --git a/jabber-menu.el b/jabber-menu.el index c5cf9a8..98c972f 100644 --- a/jabber-menu.el +++ b/jabber-menu.el @@ -50,29 +50,41 @@ (define-key map [jabber-menu-status jabber-menu-status-chat] - '("Chatty" . + '(menu-item + "Chatty" (lambda () (interactive) (jabber-send-presence "chat" (jabber-read-with-input-method "status message: " *jabber-current-status* '*jabber-status-history*) - *jabber-current-priority*)))) + *jabber-current-priority*)) + :button (:radio . (and (boundp '*jabber-current-show*) + (equal *jabber-current-show* "chat"))))) (define-key map [jabber-menu-status jabber-menu-status-dnd] - '("Do not Disturb" . + '(menu-item + "Do not Disturb" (lambda () (interactive) (jabber-send-presence "dnd" (jabber-read-with-input-method "status message: " *jabber-current-status* '*jabber-status-history*) - *jabber-current-priority*)))) + *jabber-current-priority*)) + :button (:radio . (and (boundp '*jabber-current-show*) + (equal *jabber-current-show* "dnd"))))) (define-key map [jabber-menu-status jabber-menu-status-xa] - '("Extended Away" . jabber-send-xa-presence)) + '(menu-item "Extended Away" jabber-send-xa-presence + :button (:radio . (and (boundp '*jabber-current-show*) + (equal *jabber-current-show* "xa"))))) (define-key map [jabber-menu-status jabber-menu-status-away] - '("Away" . jabber-send-away-presence)) + '(menu-item "Away" jabber-send-away-presence + :button (:radio . (and (boundp '*jabber-current-show*) + (equal *jabber-current-show* "away"))))) (define-key map [jabber-menu-status jabber-menu-status-online] - '("Online" . jabber-send-default-presence)) + '(menu-item "Online" jabber-send-default-presence + :button (:radio . (and (boundp '*jabber-current-show*) + (equal *jabber-current-show* ""))))) (define-key-after map [separator] ----------------------------------------------------------------------- Summary of changes: jabber-menu.el | 31 ++++++++++++++++++++++++------- 1 files changed, 24 insertions(+), 7 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-05-03 22:49:29
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via e726d72a61e5743eb326a50fc0eb379f577fa0d4 (commit) from 6c85b203ca874e5736d785eac78db05129de2ccc (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit e726d72a61e5743eb326a50fc0eb379f577fa0d4 Author: Magnus Henoch <mag...@gm...> Date: Sat May 3 23:42:06 2014 +0100 Fix reporting of last timestamp Add missing concat call. diff --git a/jabber-time.el b/jabber-time.el index 96ebe36..299ccef 100644 --- a/jabber-time.el +++ b/jabber-time.el @@ -137,11 +137,12 @@ (string-to-number seconds) (error nil)))) (when (numberp seconds) - "That is, at " - (format-time-string "%Y-%m-%d %T" - (time-subtract (current-time) - (seconds-to-time seconds))) - "\n")))) + (concat + " - that is, at " + (format-time-string "%Y-%m-%d %T" + (time-subtract (current-time) + (seconds-to-time seconds))) + "\n"))))) (t ;; Only hostname: uptime (format "%s uptime: %s seconds" from seconds))))) ----------------------------------------------------------------------- Summary of changes: jabber-time.el | 11 ++++++----- 1 files changed, 6 insertions(+), 5 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-05-03 21:54:05
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 6c85b203ca874e5736d785eac78db05129de2ccc (commit) via 5035b0738480153280d8d3d88a42ab11fa3720c6 (commit) via 00d0567960bcfd18646766ab7178bcd2600d6abf (commit) from 0782581252e5d774125cf1d7a68ec27297f84105 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 6c85b203ca874e5736d785eac78db05129de2ccc Author: Magnus Henoch <mag...@gm...> Date: Sat May 3 22:52:18 2014 +0100 Fix handling of stream errors This was overlooked when introducing namespace handling: the namespace prefix is no longer part of the element name, and the namespace can be looked up through a fictitious xmlns attribute. diff --git a/jabber-core.el b/jabber-core.el index 85879e0..c75370d 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -995,7 +995,8 @@ submit a bug report, including the information below. "Process an incoming stream error. Return nil if XML-DATA is not a stream:error stanza. Return an fsm result list if it is." - (when (eq (jabber-xml-node-name xml-data) 'stream:error) + (when (and (eq (jabber-xml-node-name xml-data) 'error) + (equal (jabber-xml-get-xmlns xml-data) "http://etherx.jabber.org/streams")) (let ((condition (jabber-stream-error-condition xml-data)) (text (jabber-parse-stream-error xml-data))) (setq state-data (plist-put state-data :disconnection-reason commit 5035b0738480153280d8d3d88a42ab11fa3720c6 Author: Magnus Henoch <mag...@gm...> Date: Sat May 3 22:51:46 2014 +0100 Trim trailing newline from sentinel status messages diff --git a/jabber-core.el b/jabber-core.el index c8ee5cc..85879e0 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -387,13 +387,19 @@ With double prefix argument, specify more connection details." "Handle sentinel event for jabber fsm." ;; We do the same thing for every state, so avoid code duplication. (let* ((string (car (cddr event))) + ;; The event string sometimes (always?) has a trailing + ;; newline, that we don't care for. + (trimmed-string + (if (eq ?\n (aref string (1- (length string)))) + (substring string 0 -1) + string)) (new-state-data ;; If we already know the reason (e.g. a stream error), don't ;; overwrite it. (if (plist-get state-data :disconnection-reason) state-data - (plist-put state-data :disconnection-reason string)))) - (list nil new-state-data))) + (plist-put state-data :disconnection-reason trimmed-string)))) + (list nil new-state-data))) (define-enter-state jabber-connection :connected (fsm state-data) commit 00d0567960bcfd18646766ab7178bcd2600d6abf Author: Magnus Henoch <mag...@gm...> Date: Fri Apr 25 20:01:34 2014 +0100 Fix argument name s/js/jc/. This code happened to work anyway because of dynamic scoping. diff --git a/jabber-iq.el b/jabber-iq.el index 1a94010..2d8b502 100644 --- a/jabber-iq.el +++ b/jabber-iq.el @@ -195,7 +195,7 @@ See section 9.3 of XMPP Core." (dolist (hook '(jabber-info-message-hooks jabber-alert-info-message-hooks)) (run-hook-with-args hook 'browse (current-buffer) (funcall jabber-alert-info-message-function 'browse (current-buffer)))))))) -(defun jabber-silent-process-data (js xml-data closure-data) +(defun jabber-silent-process-data (jc xml-data closure-data) "Process random results from various requests to only alert hooks." (let ((text (cond ((functionp closure-data) ----------------------------------------------------------------------- Summary of changes: jabber-core.el | 13 ++++++++++--- jabber-iq.el | 2 +- 2 files changed, 11 insertions(+), 4 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-04-25 19:01:08
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 0782581252e5d774125cf1d7a68ec27297f84105 (commit) from 177ebecdaf34e5da2bb5e327d6c7281a38d238c7 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 0782581252e5d774125cf1d7a68ec27297f84105 Author: Magnus Henoch <mag...@gm...> Date: Fri Apr 25 20:00:46 2014 +0100 Handle synchronous errors when connecting asynchronously In jabber-network-connect-async, the call to make-network-process can fail in certain cases without creating a connection and without calling our sentinel function, in particular if DNS resolution fails, and that error case was not updated for the new error reporting solution. This should now work properly. diff --git a/jabber-conn.el b/jabber-conn.el index c91b5f5..0131d45 100644 --- a/jabber-conn.el +++ b/jabber-conn.el @@ -177,7 +177,7 @@ connection fails." (caar remaining-targets) (cdar remaining-targets)) (connect (car remaining-targets) (cdr remaining-targets))) (fsm-send fsm (list :connection-failed (nreverse errors)))))) - (condition-case nil + (condition-case e (make-network-process :name "jabber" :buffer (generate-new-buffer jabber-process-buffer) @@ -198,8 +198,14 @@ connection fails." nil) (t (message "Unknown sentinel status `%s'" status)))))) + (file-error + ;; A file-error has the error message in the third list + ;; element. + (connection-failed nil (car (cddr e)))) (error - (connection-failed nil))))))) + ;; Not sure if we ever get anything but file-errors, + ;; but let's make sure we report them: + (connection-failed nil (error-message-string e)))))))) (message "Connecting to %s:%s..." (caar targets) (cdar targets)) (connect (car targets) (cdr targets))))) ----------------------------------------------------------------------- Summary of changes: jabber-conn.el | 10 ++++++++-- 1 files changed, 8 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-04-08 11:28:27
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 177ebecdaf34e5da2bb5e327d6c7281a38d238c7 (commit) from 8429db91051b54c8259d7af53ad7b6d806987190 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 177ebecdaf34e5da2bb5e327d6c7281a38d238c7 Author: Magnus Henoch <mag...@gm...> Date: Mon Apr 7 22:56:50 2014 +0100 Simplify "OS" version in jabber:iq:version No need to include the entire result of emacs-version; something like Emacs 24.3 (darwin) is enough. diff --git a/jabber-version.el b/jabber-version.el index 455701a..5f3dc19 100644 --- a/jabber-version.el +++ b/jabber-version.el @@ -63,14 +63,19 @@ determined from the incoming packet passed in XML-DATA." ;; exactly one child, namely query with xmlns='jabber:iq:version'? ;; Then again, jabber-process-iq should take care of that. (let ((to (jabber-xml-get-attribute xml-data 'from)) - (id (jabber-xml-get-attribute xml-data 'id))) + (id (jabber-xml-get-attribute xml-data 'id)) + (os (format "%s %d.%d (%s)" + (cond ((featurep 'xemacs) "XEmacs") + (t "Emacs")) + emacs-major-version emacs-minor-version + system-type))) (jabber-send-iq jc to "result" `(query ((xmlns . "jabber:iq:version")) (name () "jabber.el") (version () ,jabber-version) ;; Booting... /vmemacs.el ;; Shamelessly stolen from someone's sig. - (os () ,(emacs-version))) + (os () ,os)) nil nil nil nil id))) ----------------------------------------------------------------------- Summary of changes: jabber-version.el | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) hooks/post-receive -- emacs-jabber |
From: Magnus H. <leg...@us...> - 2014-04-07 21:02:54
|
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "emacs-jabber". The branch, master has been updated via 8429db91051b54c8259d7af53ad7b6d806987190 (commit) via 0c813fc754ffa287c3a6dd561eb9ac3f268881c8 (commit) from 2964c95b33ca2f4e0c8b24d08dd05877b270d5f9 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit 8429db91051b54c8259d7af53ad7b6d806987190 Author: Magnus Henoch <mag...@gm...> Date: Mon Apr 7 22:02:19 2014 +0100 Don't report nil resource when connection lost If we didn't get a resource before the connection was lost, don't put "/nil" in the error message, e.g. "fo...@ex.../nil: connection lost". diff --git a/jabber-core.el b/jabber-core.el index beb6c59..c8ee5cc 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -309,10 +309,12 @@ With double prefix argument, specify more connection details." (ever-session-established (plist-get state-data :ever-session-established))) (unless expected (run-hook-with-args 'jabber-lost-connection-hooks fsm) - (message "%s@%s/%s: connection lost: `%s'" + (message "%s@%s%s: connection lost: `%s'" (plist-get state-data :username) (plist-get state-data :server) - (plist-get state-data :resource) + (if (plist-get state-data :resource) + (concat "/" (plist-get state-data :resource)) + "") reason)) (if (and jabber-auto-reconnect (not expected) ever-session-established) commit 0c813fc754ffa287c3a6dd561eb9ac3f268881c8 Author: Magnus Henoch <mag...@gm...> Date: Mon Apr 7 21:59:57 2014 +0100 Improve error message for connection failure Ensure that the final message, the one that stays in the echo area, contains information about where we tried to connect to. Also accumulate error messages for all addresses we tried. diff --git a/jabber-conn.el b/jabber-conn.el index bdc0cc4..c91b5f5 100644 --- a/jabber-conn.el +++ b/jabber-conn.el @@ -132,7 +132,7 @@ If we can't find SRV records, use standard defaults." (defun jabber-network-connect (fsm server network-server port) "Connect to a Jabber server with a plain network connection. Send a message of the form (:connected CONNECTION) to FSM if -connection succeeds. Send a message :connection-failed if +connection succeeds. Send a message (:connection-failed ERRORS) if connection fails." (cond ((featurep 'make-network-process '(:nowait t)) @@ -145,6 +145,7 @@ connection fails." (defun jabber-network-connect-async (fsm server network-server port) ;; Get all potential targets... (lexical-let ((targets (jabber-srv-targets server network-server port)) + errors (fsm fsm)) ;; ...and connect to them one after another, asynchronously, until ;; connection succeeds. @@ -159,8 +160,15 @@ connection fails." ;; from inside the sentinel. (fsm-send fsm (list :connected c))) (connection-failed - (c) - (message "Couldn't connect to %s:%s" (car target) (cdr target)) + (c status) + (when (and (> (length status) 0) + (eq (aref status (1- (length status))) ?\n)) + (setq status (substring status 0 -1))) + (let ((err + (format "Couldn't connect to %s:%s: %s" + (car target) (cdr target) status))) + (message "%s" err) + (push err errors)) (when c (delete-process c)) (if remaining-targets (progn @@ -168,7 +176,7 @@ connection fails." "Connecting to %s:%s..." (caar remaining-targets) (cdar remaining-targets)) (connect (car remaining-targets) (cdr remaining-targets))) - (fsm-send fsm :connection-failed)))) + (fsm-send fsm (list :connection-failed (nreverse errors)))))) (condition-case nil (make-network-process :name "jabber" @@ -183,7 +191,7 @@ connection fails." ((string-match "^open" status) (connection-successful connection)) ((string-match "^failed" status) - (connection-failed connection)) + (connection-failed connection status)) ((string-match "^deleted" status) ;; This happens when we delete a process in the ;; "failed" case above. @@ -200,7 +208,8 @@ connection fails." ;; advance for any bit rot... (let ((coding-system-for-read 'utf-8) (coding-system-for-write 'utf-8) - (targets (jabber-srv-targets server network-server port))) + (targets (jabber-srv-targets server network-server port)) + errors) (catch 'connected (dolist (target targets) (condition-case e @@ -219,10 +228,23 @@ connection fails." (when connection (fsm-send fsm (list :connected connection)) (throw 'connected connection))) + (file-error + ;; A file-error has the error message in the third list + ;; element. + (let ((err (format "Couldn't connect to %s:%s: %s" + (car target) (cdr target) + (car (cddr e))))) + (message "%s" err) + (push err errors))) (error - (message "Couldn't connect to %s: %s" target - (error-message-string e))))) - (fsm-send fsm :connection-failed)))) + ;; Not sure if we ever get anything but file-errors, + ;; but let's make sure we report them: + (let ((err (format "Couldn't connect to %s:%s: %s" + (car target) (cdr target) + (error-message-string e)))) + (message "%s" err) + (push err errors))))) + (fsm-send fsm (list :connection-failed (nreverse errors)))))) (defun jabber-network-send (connection string) "Send a string via a plain TCP/IP connection to the Jabber Server." @@ -234,7 +256,7 @@ connection fails." (defun jabber-ssl-connect (fsm server network-server port) "connect via OpenSSL or GnuTLS to a Jabber Server Send a message of the form (:connected CONNECTION) to FSM if -connection succeeds. Send a message :connection-failed if +connection succeeds. Send a message (:connection-failed ERRORS) if connection fails." (let ((coding-system-for-read 'utf-8) (coding-system-for-write 'utf-8) @@ -247,7 +269,8 @@ connection fails." (fboundp 'open-ssl-stream)) 'open-ssl-stream) (t - (error "Neither TLS nor SSL connect functions available"))))) + (error "Neither TLS nor SSL connect functions available")))) + error-msg) (let ((process-buffer (generate-new-buffer jabber-process-buffer)) connection) (setq network-server (or network-server server)) @@ -259,13 +282,16 @@ connection fails." network-server port)) (error - (message "Couldn't connect to %s:%d: %s" network-server port - (error-message-string e)))) + (setq error-msg + (format "Couldn't connect to %s:%d: %s" network-server port + (error-message-string e))) + (message "%s" error-msg))) (unless (or connection jabber-debug-keep-process-buffers) (kill-buffer process-buffer)) (if connection (fsm-send fsm (list :connected connection)) - (fsm-send fsm :connection-failed))))) + (fsm-send fsm (list :connection-failed + (when error-msg (list error-msg)))))))) (defun jabber-ssl-send (connection string) "Send a string via an SSL-encrypted connection to the Jabber Server." @@ -276,11 +302,12 @@ connection fails." (defun jabber-starttls-connect (fsm server network-server port) "Connect via an external GnuTLS process to a Jabber Server. Send a message of the form (:connected CONNECTION) to FSM if -connection succeeds. Send a message :connection-failed if +connection succeeds. Send a message (:connection-failed ERRORS) if connection fails." (let ((coding-system-for-read 'utf-8) (coding-system-for-write 'utf-8) - (targets (jabber-srv-targets server network-server port))) + (targets (jabber-srv-targets server network-server port)) + errors) (unless (fboundp 'starttls-open-stream) (error "starttls.el not available")) (catch 'connected @@ -297,13 +324,22 @@ connection fails." (cdr target))) (unless (or connection jabber-debug-keep-process-buffers) (kill-buffer process-buffer))) - (when connection + (if (null connection) + ;; It seems we don't actually get an error if we + ;; can't connect. Let's try to convey some useful + ;; information to the user at least. + (let ((err (format "Couldn't connect to %s:%s" + (car target) (cdr target)))) + (message "%s" err) + (push err errors)) (fsm-send fsm (list :connected connection)) (throw 'connected connection))) (error - (message "Couldn't connect to %s: %s" target - (error-message-string e)))) - (fsm-send fsm :connection-failed))))) + (let ((err (format "Couldn't connect to %s: %s" target + (error-message-string e)))) + (message "%s" err) + (push err errors))))) + (fsm-send fsm (list :connection-failed (nreverse errors)))))) (defun jabber-starttls-initiate (fsm) "Initiate a starttls connection" diff --git a/jabber-core.el b/jabber-core.el index b3acc31..beb6c59 100644 --- a/jabber-core.el +++ b/jabber-core.el @@ -373,6 +373,8 @@ With double prefix argument, specify more connection details." (:connection-failed (message "Jabber connection failed") + (plist-put state-data :disconnection-reason + (mapconcat #'identity (cadr event) "; ")) (list nil state-data)) (:do-disconnect ----------------------------------------------------------------------- Summary of changes: jabber-conn.el | 76 +++++++++++++++++++++++++++++++++++++++++-------------- jabber-core.el | 8 ++++- 2 files changed, 62 insertions(+), 22 deletions(-) hooks/post-receive -- emacs-jabber |