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...> - 2007-08-23 21:08:13
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv7621 Modified Files: jabber-muc.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-391 Creator: Magnus Henoch <ma...@fr...> Fix check for MUC history when stanza contains cdata Index: jabber-muc.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-muc.el,v retrieving revision 1.69 retrieving revision 1.70 diff -u -d -r1.69 -r1.70 --- jabber-muc.el 6 Aug 2007 17:08:12 -0000 1.69 +++ jabber-muc.el 23 Aug 2007 21:08:09 -0000 1.70 @@ -847,7 +847,7 @@ ;; ...except if the message is part of history, in which ;; case we don't want an alert. - (let ((children-namespaces (mapcar (lambda (x) (jabber-xml-get-attribute x 'xmlns)) + (let ((children-namespaces (mapcar (lambda (x) (when (listp x) (jabber-xml-get-attribute x 'xmlns))) (jabber-xml-node-children xml-data)))) (unless (or (member "urn:xmpp:delay" children-namespaces) (member "jabber:x:delay" children-namespaces)) |
From: Magnus H. <leg...@us...> - 2007-08-23 20:44:14
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv29523 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-390 Creator: Magnus Henoch <ma...@fr...> Comment out choke check Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.59 retrieving revision 1.60 diff -u -d -r1.59 -r1.60 --- jabber-core.el 23 Aug 2007 17:15:49 -0000 1.59 +++ jabber-core.el 23 Aug 2007 20:44:10 -0000 1.60 @@ -263,8 +263,9 @@ (jabber-send-stream-header fsm) - (setq jabber-choked-timer - (run-with-timer 5 5 #'jabber-check-choked)) + ;; 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*) |
From: Magnus H. <leg...@us...> - 2007-08-23 17:16:02
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv28059 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-389 Creator: Magnus Henoch <ma...@fr...> Fix stupid typo in automatic reconnection Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- jabber-core.el 23 Aug 2007 17:15:38 -0000 1.58 +++ jabber-core.el 23 Aug 2007 17:15:49 -0000 1.59 @@ -206,6 +206,7 @@ (when jabber-auto-reconnect (run-with-timer jabber-reconnect-delay nil + 'jabber-connect (plist-get state-data :username) (plist-get state-data :server) (plist-get state-data :resource))))) |
From: Magnus H. <leg...@us...> - 2007-08-23 17:15:50
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv28022 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-388 Creator: Magnus Henoch <ma...@fr...> Tell the function that caused an error in jabber-process-input Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- jabber-core.el 21 Aug 2007 23:27:45 -0000 1.57 +++ jabber-core.el 23 Aug 2007 17:15:38 -0000 1.58 @@ -770,7 +770,7 @@ (condition-case e (funcall f jc xml-data) ((debug error) - (fsm-debug-output "Error %S while processing %S" e xml-data)))))) + (fsm-debug-output "Error %S while processing %S with function %s" e xml-data f)))))) (defun jabber-process-stream-error (xml-data state-data) "Process an incoming stream error. |
From: Magnus H. <leg...@us...> - 2007-08-21 23:28:00
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv9847 Modified Files: jabber-roster.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-386 Creator: Magnus Henoch <ma...@fr...> Keybinding for toggling roster buffer keybinding help text Patch by Xavier Maillard. Index: jabber-roster.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-roster.el,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- jabber-roster.el 19 Aug 2007 09:46:34 -0000 1.51 +++ jabber-roster.el 21 Aug 2007 23:27:53 -0000 1.52 @@ -197,6 +197,7 @@ (define-key map "g" 'jabber-display-roster) (define-key map "S" 'jabber-ft-send) (define-key map "o" 'jabber-roster-toggle-offline-display) + (define-key map "H" 'jabber-roster-toggle-binding-display) ;;(define-key map "D" 'jabber-disconnect) map)) @@ -296,6 +297,13 @@ (not jabber-show-offline-contacts)) (jabber-display-roster)) +(defun jabber-roster-toggle-binding-display () + "Toggle display of the roster binding text." + (interactive) + (setq jabber-roster-show-bindings + (not jabber-roster-show-bindings)) + (jabber-display-roster)) + (defun jabber-display-roster () "switch to the main jabber buffer and refresh the roster display to reflect the current information" (interactive) @@ -321,7 +329,8 @@ C-c C-c Chat menu C-c C-m Multi-User Chat menu C-c C-i Info menu C-c C-r Roster menu C-c C-s Service menu -To disable this text, set `jabber-roster-show-bindings' to nil. + +H Toggle displaying this text ")) (insert "__________________________________\n\n") (if (null jabber-connections) |
From: Magnus H. <leg...@us...> - 2007-08-21 23:27:50
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv9834 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-385 Creator: Magnus Henoch <ma...@fr...> Print debug messages in `read'-able format Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- jabber-core.el 15 Aug 2007 20:47:50 -0000 1.56 +++ jabber-core.el 21 Aug 2007 23:27:45 -0000 1.57 @@ -770,7 +770,7 @@ (condition-case e (funcall f jc xml-data) ((debug error) - (fsm-debug-output "Error %s while processing %s" e xml-data)))))) + (fsm-debug-output "Error %S while processing %S" e xml-data)))))) (defun jabber-process-stream-error (xml-data state-data) "Process an incoming stream error. |
From: Magnus H. <leg...@us...> - 2007-08-15 20:55:50
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv28632 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-384 Creator: Magnus Henoch <ma...@fr...> Start hacking automatic reconnection Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.55 retrieving revision 1.56 diff -u -d -r1.55 -r1.56 --- jabber-core.el 15 Aug 2007 20:47:40 -0000 1.55 +++ jabber-core.el 15 Aug 2007 20:47:50 -0000 1.56 @@ -92,6 +92,16 @@ :type 'hook :group 'jabber-core) +(defcustom jabber-auto-reconnect nil + "Reconnect automatically after losing connection?" + :type 'boolean + :group 'jabber-core) + +(defcustom jabber-reconnect-delay 5 + "Seconds to wait before reconnecting" + :type 'integer + :group 'jabber-core) + (defcustom jabber-roster-buffer "*-jabber-*" "The name of the roster buffer" :type 'string @@ -192,7 +202,13 @@ (plist-get state-data :username) (plist-get state-data :server) (plist-get state-data :resource) - reason))) + reason) + + (when jabber-auto-reconnect + (run-with-timer jabber-reconnect-delay nil + (plist-get state-data :username) + (plist-get state-data :server) + (plist-get state-data :resource))))) (list state-data nil)) |
From: Magnus H. <leg...@us...> - 2007-08-15 20:47:44
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv28620 Modified Files: jabber-core.el jabber-util.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-383 Creator: Magnus Henoch <ma...@fr...> Pull stream error handling closer to the FSM Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- jabber-core.el 15 Aug 2007 19:31:13 -0000 1.54 +++ jabber-core.el 15 Aug 2007 20:47:40 -0000 1.55 @@ -61,9 +61,6 @@ (defvar jabber-presence-chain nil "Incoming presence notifications are sent to these functions, in order.") -(defvar jabber-stream-error-chain '(jabber-process-stream-error) - "Stream errors are sent to these functions, in order") - (defvar jabber-choked-count 0 "Number of successive times that the process buffer has been nonempty.") @@ -235,9 +232,14 @@ (defsubst jabber-fsm-handle-sentinel (state-data event) "Handle sentinel event for jabber fsm." ;; We do the same thing for every state, so avoid code duplication. - (let ((string (car (cddr event)))) - (list nil (plist-put state-data - :disconnection-reason string)))) + (let* ((string (car (cddr event))) + (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))) (define-enter-state jabber-connection :connected (fsm state-data) @@ -292,11 +294,12 @@ (:stanza (let ((stanza (cadr event))) - ;; At this stage, we only expect a stream:features stanza. - (unless (eq (jabber-xml-node-name stanza) 'stream:features) - (error "Unexpected stanza %s" stanza)) - (cond + ;; At this stage, we only expect a stream:features stanza. + ((not (eq (jabber-xml-node-name stanza) 'stream:features)) + (list nil (plist-put state-data + :disconnection-reason + (format "Unexpected stanza %s" stanza)))) ((and (jabber-xml-get-children stanza 'starttls) (eq jabber-connection-type 'starttls)) (list :starttls state-data)) @@ -358,8 +361,11 @@ (jabber-fsm-handle-sentinel state-data event)) (:stanza - (jabber-process-input fsm (cadr event)) - (list :register-account state-data)))) + (or + (jabber-process-stream-error (cadr event) state-data) + (progn + (jabber-process-input fsm (cadr event)) + (list :register-account state-data)))))) (define-enter-state jabber-connection :legacy-auth (fsm state-data) @@ -380,8 +386,11 @@ (jabber-fsm-handle-sentinel state-data event)) (:stanza - (jabber-process-input fsm (cadr event)) - (list :legacy-auth state-data)) + (or + (jabber-process-stream-error (cadr event) state-data) + (progn + (jabber-process-input fsm (cadr event)) + (list :legacy-auth state-data)))) (:authentication-success (list :session-established state-data)) @@ -453,29 +462,32 @@ (:stanza (let ((stanza (cadr event))) - (cond - ((eq (jabber-xml-node-name stanza) 'stream:features) - (if (and (jabber-xml-get-children stanza 'bind) - (jabber-xml-get-children stanza 'session)) - (labels - ((handle-bind - (jc xml-data success) - (fsm-send jc (list - (if success :bind-success :bind-failure) - xml-data)))) - ;; So let's bind a resource. We can either pick a resource ourselves, - ;; or have the server pick one for us. - (jabber-send-iq fsm nil "set" - `(bind ((xmlns . "urn:ietf:params:xml:ns:xmpp-bind")) - (resource () ,jabber-resource)) - #'handle-bind t - #'handle-bind nil) - (list :bind state-data)) - (message "Server doesn't permit resource binding and session establishing") - (list nil state-data))) - (t - (jabber-process-input fsm (cadr event)) - (list :bind state-data))))) + (cond + ((eq (jabber-xml-node-name stanza) 'stream:features) + (if (and (jabber-xml-get-children stanza 'bind) + (jabber-xml-get-children stanza 'session)) + (labels + ((handle-bind + (jc xml-data success) + (fsm-send jc (list + (if success :bind-success :bind-failure) + xml-data)))) + ;; So let's bind a resource. We can either pick a resource ourselves, + ;; or have the server pick one for us. + (jabber-send-iq fsm nil "set" + `(bind ((xmlns . "urn:ietf:params:xml:ns:xmpp-bind")) + (resource () ,jabber-resource)) + #'handle-bind t + #'handle-bind nil) + (list :bind state-data)) + (message "Server doesn't permit resource binding and session establishing") + (list nil state-data))) + (t + (or + (jabber-process-stream-error (cadr event) state-data) + (progn + (jabber-process-input fsm (cadr event)) + (list :bind state-data))))))) (:bind-success (let ((jid (jabber-xml-path (cadr event) '(bind jid "")))) @@ -535,8 +547,11 @@ (jabber-fsm-handle-sentinel state-data event)) (:stanza - (jabber-process-input fsm (cadr event)) - (list :session-established state-data)) + (or + (jabber-process-stream-error (cadr event) state-data) + (progn + (jabber-process-input fsm (cadr event)) + (list :session-established state-data)))) (:do-disconnect (jabber-send-string fsm "</stream:stream>") @@ -734,21 +749,28 @@ (let* ((tag (jabber-xml-node-name xml-data)) (functions (eval (cdr (assq tag '((iq . jabber-iq-chain) (presence . jabber-presence-chain) - (message . jabber-message-chain) - (stream:error . jabber-stream-error-chain))))))) - + (message . jabber-message-chain))))))) (dolist (f functions) (condition-case e (funcall f jc xml-data) ((debug error) (fsm-debug-output "Error %s while processing %s" e xml-data)))))) -(defun jabber-process-stream-error (jc xml-data) - "Process an incoming stream error." - (beep) - (run-hooks 'jabber-lost-connection-hook) - (message "Stream error, connection lost: %s" (jabber-parse-stream-error xml-data)) - (jabber-disconnect-one jc)) +(defun jabber-process-stream-error (xml-data state-data) + "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) + (let ((condition (jabber-stream-error-condition xml-data)) + (text (jabber-parse-stream-error xml-data))) + (setq state-data (plist-put state-data :disconnection-reason + (format "Stream error: %s" text))) + ;; Special case: when the error is `conflict', we have been + ;; forcibly disconnected by the same user. Don't reconnect + ;; automatically. + (when (eq condition 'conflict) + (setq state-data (plist-put state-data :disconnection-expected t))) + (list nil state-data)))) ;; XXX: This function should probably die. The roster is stored ;; inside the connection plists, and the obarray shouldn't be so big Index: jabber-util.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-util.el,v retrieving revision 2.47 retrieving revision 2.48 diff -u -d -r2.47 -r2.48 --- jabber-util.el 8 May 2007 12:22:42 -0000 2.47 +++ jabber-util.el 15 Aug 2007 20:47:40 -0000 2.48 @@ -507,19 +507,21 @@ (cons 'xml-not-well-formed "XML not well formed")) "String descriptions of XMPP stream errors") +(defun jabber-stream-error-condition (error-xml) + "Return the condition of a <stream:error/> tag." + ;; as we don't know the node name of the condition, we have to + ;; search for it. + (dolist (node (jabber-xml-node-children error-xml)) + (when (and (string= (jabber-xml-get-attribute node 'xmlns) + "urn:ietf:params:xml:ns:xmpp-streams") + (assq (jabber-xml-node-name node) + jabber-stream-error-messages)) + (return (jabber-xml-node-name node))))) + (defun jabber-parse-stream-error (error-xml) "Parse the given <stream:error/> tag and return a sting fit for human consumption." (let ((text-node (car (jabber-xml-get-children error-xml 'text))) - condition) - ;; as we don't know the node name of the condition, we have to - ;; search for it. - (dolist (node (jabber-xml-node-children error-xml)) - (when (and (string= (jabber-xml-get-attribute node 'xmlns) - "urn:ietf:params:xml:ns:xmpp-streams") - (assq (jabber-xml-node-name node) - jabber-stream-error-messages)) - (setq condition (jabber-xml-node-name node)) - (return))) + (condition (jabber-stream-error-condition error-xml))) (concat (if condition (cdr (assq condition jabber-stream-error-messages)) "Unknown stream error") (if (and text-node (stringp (car (jabber-xml-node-children text-node)))) |
From: Magnus H. <leg...@us...> - 2007-08-15 19:31:20
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv29190 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-382 Creator: Magnus Henoch <ma...@fr...> Catch errors in jabber-process-input Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.53 retrieving revision 1.54 diff -u -d -r1.53 -r1.54 --- jabber-core.el 12 Aug 2007 22:00:38 -0000 1.53 +++ jabber-core.el 15 Aug 2007 19:31:13 -0000 1.54 @@ -738,7 +738,10 @@ (stream:error . jabber-stream-error-chain))))))) (dolist (f functions) - (funcall f jc xml-data)))) + (condition-case e + (funcall f jc xml-data) + ((debug error) + (fsm-debug-output "Error %s while processing %s" e xml-data)))))) (defun jabber-process-stream-error (jc xml-data) "Process an incoming stream error." |
From: Magnus H. <leg...@us...> - 2007-08-12 22:00:43
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv9529 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-381 Creator: Magnus Henoch <ma...@fr...> Beautify disconnection and sentinel handling Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- jabber-core.el 8 Aug 2007 10:58:28 -0000 1.52 +++ jabber-core.el 12 Aug 2007 22:00:38 -0000 1.53 @@ -181,8 +181,22 @@ ;; `nil' is the error state. Remove the connection from the list. (setq jabber-connections (delq fsm jabber-connections)) + ;; Close the network connection. + (let ((connection (plist-get state-data :connection))) + (when (processp connection) + (delete-process connection))) ;; Remove lost connections from the roster buffer. (jabber-display-roster) + (let ((expected (plist-get state-data :disconnection-expected)) + (reason (plist-get state-data :disconnection-reason))) + (unless expected + (run-hooks 'jabber-lost-connection-hook) + (message "%s@%s/%s: connection lost: `%s'" + (plist-get state-data :username) + (plist-get state-data :server) + (plist-get state-data :resource) + reason))) + (list state-data nil)) ;; There is no `define-state' for `nil', since any message received @@ -212,7 +226,18 @@ (:connection-failed (message "Jabber connection failed") - (list nil state-data)))) + (list nil state-data)) + + (:do-disconnect + ;; We don't have the connection object, so defer the disconnection. + :defer))) + +(defsubst jabber-fsm-handle-sentinel (state-data event) + "Handle sentinel event for jabber fsm." + ;; We do the same thing for every state, so avoid code duplication. + (let ((string (car (cddr event)))) + (list nil (plist-put state-data + :disconnection-reason string)))) (define-enter-state jabber-connection :connected (fsm state-data) @@ -240,8 +265,7 @@ (list :connected state-data))) (:sentinel - (message "Jabber connection unexpectedly closed") - (list nil state-data)) + (jabber-fsm-handle-sentinel state-data event)) (:stream-start (let ((session-id (cadr event)) @@ -283,7 +307,12 @@ ;; that. (list :register-account state-data)) (t - (list :sasl-auth (plist-put state-data :stream-features stanza)))))))) + (list :sasl-auth (plist-put state-data :stream-features stanza)))))) + + (:do-disconnect + (jabber-send-string fsm "</stream:stream>") + (list nil (plist-put state-data + :disconnection-expected t))))) (define-enter-state jabber-connection :starttls (fsm state-data) @@ -300,8 +329,7 @@ (list :starttls state-data))) (:sentinel - (message "Jabber connection unexpectedly closed") - (list nil state-data)) + (jabber-fsm-handle-sentinel state-data event)) (:stanza (if (jabber-starttls-process-input fsm (cadr event)) @@ -327,8 +355,7 @@ (list :register-account state-data))) (:sentinel - (message "Jabber connection unexpectedly closed") - (list nil state-data)) + (jabber-fsm-handle-sentinel state-data event)) (:stanza (jabber-process-input fsm (cadr event)) @@ -350,8 +377,7 @@ (list :legacy-auth state-data))) (:sentinel - (message "Jabber connection unexpectedly closed") - (list nil state-data)) + (jabber-fsm-handle-sentinel state-data event)) (:stanza (jabber-process-input fsm (cadr event)) @@ -385,8 +411,7 @@ (list :sasl-auth state-data))) (:sentinel - (message "Jabber connection unexpectedly closed") - (list nil state-data)) + (jabber-fsm-handle-sentinel state-data event)) (:stanza (let ((new-sasl-data @@ -420,8 +445,7 @@ (list :bind state-data))) (:sentinel - (message "Jabber connection unexpectedly closed") - (list nil state-data)) + (jabber-fsm-handle-sentinel state-data event)) (:stream-start ;; we wait for stream features... @@ -508,25 +532,20 @@ (list :session-established state-data))) (:sentinel - (let ((process (cadr event)) - (string (car (cddr event)))) - (run-hooks 'jabber-lost-connection-hook) - (message "%s@%s/%s: connection lost: `%s'" - (plist-get state-data :username) - (plist-get state-data :server) - (plist-get state-data :resource) - string) - (list nil state-data))) + (jabber-fsm-handle-sentinel state-data event)) (:stanza (jabber-process-input fsm (cadr event)) - (list :session-established state-data)))) + (list :session-established state-data)) + + (:do-disconnect + (jabber-send-string fsm "</stream:stream>") + (list nil (plist-put state-data + :disconnection-expected t))))) (defun jabber-disconnect () "Disconnect from all Jabber servers." (interactive) - ;; XXX: this function is slightly out of sync with the rest of the - ;; FSM remake. (unless *jabber-disconnecting* ; avoid reentry (let ((*jabber-disconnecting* t)) (dolist (c jabber-connections) @@ -535,24 +554,17 @@ (jabber-disconnected) (when (interactive-p) - (message "Disconnected from Jabber server"))))) + (message "Disconnected from Jabber server(s)"))))) (defun jabber-disconnect-one (jc &optional dont-redisplay) "Disconnect from one Jabber server. If DONT-REDISPLAY is non-nil, don't update roster buffer." (interactive (list (jabber-read-account))) ;;(run-hooks 'jabber-pre-disconnect-hook) - (let ((process (plist-get - (fsm-get-state-data jc) - :connection))) - (when (and process - (memq (process-status process) '(open run))) - (jabber-send-string jc "</stream:stream>") - ;; let the server close the stream - (accept-process-output process 3) - ;; and do it ourselves as well, just to be sure - (delete-process process))) - (setq jabber-connections (remq jc jabber-connections)) + (fsm-send-sync jc :do-disconnect) + (when (interactive-p) + (message "Disconnected from %s" + (jabber-connection-jid jc))) (unless dont-redisplay (jabber-display-roster))) |
From: Magnus H. <leg...@us...> - 2007-08-12 22:00:40
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv9488 Modified Files: fsm.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-380 Creator: Magnus Henoch <ma...@fr...> More information in fsm debug output Index: fsm.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/fsm.el,v retrieving revision 2.3 retrieving revision 2.4 diff -u -d -r2.3 -r2.4 --- fsm.el 5 Feb 2007 21:59:03 -0000 2.3 +++ fsm.el 12 Aug 2007 22:00:29 -0000 2.4 @@ -1,6 +1,6 @@ ;;; fsm.el --- state machine library -;; Copyright (C) 2006 Magnus Henoch +;; Copyright (C) 2006, 2007 Magnus Henoch ;; Author: Magnus Henoch <ma...@fr...> ;; Version: 0.1ttn4 @@ -368,9 +368,11 @@ (plist-put (cddr fsm) :deferred (cons (list event callback) deferred)))) ((null result) - (fsm-debug-output "Warning: event %S ignored in state %s" event state)) + (fsm-debug-output "Warning: event %S ignored in state %s/%s" event fsm-name state)) ((eq (car-safe result) :error-signaled) - (fsm-debug-output "Error: %s" (error-message-string (cdr result)))) + (fsm-debug-output "Error in %s/%s: %s" + fsm-name state + (error-message-string (cdr result)))) (t (destructuring-bind (new-state new-state-data &optional timeout) result (fsm-update fsm new-state new-state-data timeout)))))))) |
From: Magnus H. <leg...@us...> - 2007-08-08 12:01:09
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv6450 Modified Files: jabber-core.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-376 Creator: Magnus Henoch <ma...@fr...> Only use STARTTLS if jabber-connection-type is starttls Index: jabber-core.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-core.el,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- jabber-core.el 22 Apr 2007 10:26:42 -0000 1.51 +++ jabber-core.el 8 Aug 2007 10:58:28 -0000 1.52 @@ -273,7 +273,8 @@ (error "Unexpected stanza %s" stanza)) (cond - ((jabber-xml-get-children stanza 'starttls) + ((and (jabber-xml-get-children stanza 'starttls) + (eq jabber-connection-type 'starttls)) (list :starttls state-data)) ;; XXX: require encryption for registration? ((plist-get state-data :registerp) |
From: Magnus H. <leg...@us...> - 2007-08-08 11:59:08
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv30056 Modified Files: jabber-vcard-avatars.el jabber-avatar.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-379 Creator: Magnus Henoch <ma...@fr...> Display avatar warnings only when jabber-avatar-verbose is set Index: jabber-avatar.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-avatar.el,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- jabber-avatar.el 8 Aug 2007 10:58:39 -0000 1.8 +++ jabber-avatar.el 8 Aug 2007 11:59:01 -0000 1.9 @@ -45,6 +45,11 @@ :group 'jabber-avatar :type 'directory) +(defcustom jabber-avatar-verbose nil + "Display messages about irregularities with other people's avatars." + :group 'jabber-avatar + :type 'boolean) + ;;;; Avatar data handling (defstruct avatar sha1-sum mime-type url base64-data height width bytes) @@ -162,7 +167,8 @@ (make-directory jabber-avatar-cache-directory)) (if (file-exists-p filename) - (message "Caching avatar, but %s already exists" filename) + (when jabber-avatar-verbose + (message "Caching avatar, but %s already exists" filename)) (with-current-buffer buffer (let ((require-final-newline nil)) (setq buffer-file-coding-system 'binary) Index: jabber-vcard-avatars.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-vcard-avatars.el,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- jabber-vcard-avatars.el 8 Aug 2007 10:58:51 -0000 1.9 +++ jabber-vcard-avatars.el 8 Aug 2007 11:59:01 -0000 1.10 @@ -78,10 +78,11 @@ (let ((avatar (jabber-avatar-from-base64-string (nth 2 photo) (nth 1 photo)))) (unless (string= sha1-hash (avatar-sha1-sum avatar)) - (message "%s's avatar should have SHA1 sum %s, but has %s" - (jabber-jid-displayname from) - sha1-hash - (avatar-sha1-sum avatar))) + (when jabber-avatar-verbose + (message "%s's avatar should have SHA1 sum %s, but has %s" + (jabber-jid-displayname from) + sha1-hash + (avatar-sha1-sum avatar)))) (jabber-avatar-cache avatar) (jabber-avatar-set from avatar)) (jabber-avatar-set from nil)))) |
From: Magnus H. <leg...@us...> - 2007-08-08 10:59:25
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv6480 Modified Files: jabber-vcard-avatars.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-378 Creator: Magnus Henoch <ma...@fr...> Display warning when we get the wrong avatar from a contact Index: jabber-vcard-avatars.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-vcard-avatars.el,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- jabber-vcard-avatars.el 20 Feb 2007 14:13:40 -0000 1.8 +++ jabber-vcard-avatars.el 8 Aug 2007 10:58:51 -0000 1.9 @@ -1,6 +1,6 @@ ;;; jabber-vcard-avatars.el --- Avatars by JEP-0153 -;; Copyright (C) 2006 Magnus Henoch +;; Copyright (C) 2006, 2007 Magnus Henoch ;; Author: Magnus Henoch <ma...@fr...> @@ -59,26 +59,33 @@ ;; Avatar is cached (jabber-avatar-set from sha1-hash) ;; Avatar is not cached; retrieve it - (jabber-vcard-avatars-fetch jc from)))))) + (jabber-vcard-avatars-fetch jc from sha1-hash)))))) -(defun jabber-vcard-avatars-vcard (jc iq from) +(defun jabber-vcard-avatars-fetch (jc who sha1-hash) + "Fetch WHO's vCard, and extract avatar." + (interactive (list (jabber-read-account) + (jabber-read-jid-completing "Fetch whose vCard avatar: "))) + (jabber-send-iq jc who "get" '(vCard ((xmlns . "vcard-temp"))) + #'jabber-vcard-avatars-vcard (cons who sha1-hash) + #'ignore nil)) + +(defun jabber-vcard-avatars-vcard (jc iq closure) "Get the photo from the vCard, and set the avatar." - (let ((photo (assq 'PHOTO (jabber-vcard-parse (jabber-iq-query iq))))) + (let ((from (car closure)) + (sha1-hash (cdr closure)) + (photo (assq 'PHOTO (jabber-vcard-parse (jabber-iq-query iq))))) (if photo (let ((avatar (jabber-avatar-from-base64-string (nth 2 photo) (nth 1 photo)))) + (unless (string= sha1-hash (avatar-sha1-sum avatar)) + (message "%s's avatar should have SHA1 sum %s, but has %s" + (jabber-jid-displayname from) + sha1-hash + (avatar-sha1-sum avatar))) (jabber-avatar-cache avatar) (jabber-avatar-set from avatar)) (jabber-avatar-set from nil)))) -(defun jabber-vcard-avatars-fetch (jc who) - "Fetch WHO's vCard, and extract avatar." - (interactive (list (jabber-read-account) - (jabber-read-jid-completing "Fetch whose vCard avatar: "))) - (jabber-send-iq jc who "get" '(vCard ((xmlns . "vcard-temp"))) - #'jabber-vcard-avatars-vcard who - #'ignore nil)) - (add-hook 'jabber-post-connect-hooks 'jabber-vcard-avatars-find-current) (defun jabber-vcard-avatars-find-current (jc) "Request our own vCard, to find hash of avatar." |
From: Magnus H. <leg...@us...> - 2007-08-08 10:59:25
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv6463 Modified Files: jabber-avatar.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-377 Creator: Magnus Henoch <ma...@fr...> Don't save avatar if already cached Index: jabber-avatar.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-avatar.el,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- jabber-avatar.el 5 Aug 2007 21:57:50 -0000 1.7 +++ jabber-avatar.el 8 Aug 2007 10:58:39 -0000 1.8 @@ -1,6 +1,6 @@ ;;; jabber-avatar.el --- generic functions for avatars -;; Copyright (C) 2006 Magnus Henoch +;; Copyright (C) 2006, 2007 Magnus Henoch ;; Author: Magnus Henoch <ma...@fr...> @@ -161,15 +161,17 @@ (unless (file-directory-p jabber-avatar-cache-directory) (make-directory jabber-avatar-cache-directory)) - (with-current-buffer buffer - (let ((require-final-newline nil)) - (setq buffer-file-coding-system 'binary) - (if (fboundp 'set-buffer-multibyte) - (set-buffer-multibyte nil)) - (set-visited-file-name filename t) - (insert base64-data) - (base64-decode-region (point-min) (point-max)) - (basic-save-buffer))) + (if (file-exists-p filename) + (message "Caching avatar, but %s already exists" filename) + (with-current-buffer buffer + (let ((require-final-newline nil)) + (setq buffer-file-coding-system 'binary) + (if (fboundp 'set-buffer-multibyte) + (set-buffer-multibyte nil)) + (set-visited-file-name filename t) + (insert base64-data) + (base64-decode-region (point-min) (point-max)) + (basic-save-buffer)))) (kill-buffer buffer))) ;;;; Set avatar for contact |
From: Magnus H. <leg...@us...> - 2007-08-07 17:02:23
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv31821 Modified Files: AUTHORS jabber-activity.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-375 Creator: Magnus Henoch <ma...@fr...> Make jabber-activity-add work properly when jabber-chat-buffer-format contains %r Patch by Olivier Ramonat. Index: jabber-activity.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-activity.el,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- jabber-activity.el 16 Jul 2007 18:04:29 -0000 1.28 +++ jabber-activity.el 7 Aug 2007 17:02:19 -0000 1.29 @@ -267,13 +267,9 @@ (defun jabber-activity-add (from buffer text proposed-alert) "Add a JID to mode line when `jabber-activity-show-p'" - ;; In case of private MUC message, we want to keep the full JID. - (let ((jid (if (jabber-muc-sender-p from) - from - (jabber-jid-user from)))) - (when (funcall jabber-activity-show-p jid) - (add-to-list 'jabber-activity-jids jid) - (jabber-activity-mode-line-update)))) + (when (funcall jabber-activity-show-p from) + (add-to-list 'jabber-activity-jids from) + (jabber-activity-mode-line-update))) (defun jabber-activity-add-muc (nick group buffer text proposed-alert) "Add a JID to mode line when `jabber-activity-show-p'" Index: AUTHORS =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/AUTHORS,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- AUTHORS 16 Jul 2007 18:04:29 -0000 1.10 +++ AUTHORS 7 Aug 2007 17:02:19 -0000 1.11 @@ -12,6 +12,7 @@ Justin Kirby Kirill A. Korinskiy Carl Henrik Lunde +Olivier Ramonat Andrey Slusar Evgenii Terechkov Milan Zamazal |
From: Magnus H. <leg...@us...> - 2007-08-07 16:56:52
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv29433 Modified Files: jabber-chat.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-374 Creator: Magnus Henoch <ma...@fr...> Fix jabber-chat-get-buffer when jabber-chat-buffer-format contains "%r" Index: jabber-chat.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-chat.el,v retrieving revision 1.78 retrieving revision 1.79 diff -u -d -r1.78 -r1.79 --- jabber-chat.el 7 May 2007 01:40:12 -0000 1.78 +++ jabber-chat.el 7 Aug 2007 16:56:48 -0000 1.79 @@ -207,7 +207,7 @@ (list (cons ?n (jabber-jid-displayname chat-with)) (cons ?j (jabber-jid-user chat-with)) - (cons ?r (jabber-jid-resource chat-with))))) + (cons ?r (or (jabber-jid-resource chat-with) ""))))) (defun jabber-chat-create-buffer (jc chat-with) "Prepare a buffer for chatting with CHAT-WITH. |
From: Magnus H. <leg...@us...> - 2007-08-06 17:08:20
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv6089 Modified Files: jabber-muc.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-373 Creator: Magnus Henoch <ma...@fr...> Don't call alerts for MUC history Index: jabber-muc.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-muc.el,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- jabber-muc.el 6 May 2007 14:53:11 -0000 1.68 +++ jabber-muc.el 6 Aug 2007 17:08:12 -0000 1.69 @@ -844,12 +844,18 @@ (run-hook-with-args-until-success 'printers xml-data type :printp)) (jabber-maybe-print-rare-time (ewoc-enter-last jabber-chat-ewoc (list type xml-data :time (current-time)))) - - (dolist (hook '(jabber-muc-hooks jabber-alert-muc-hooks)) - (run-hook-with-args hook - nick group (current-buffer) body-text - (funcall jabber-alert-muc-function - nick group (current-buffer) body-text)))))))) + + ;; ...except if the message is part of history, in which + ;; case we don't want an alert. + (let ((children-namespaces (mapcar (lambda (x) (jabber-xml-get-attribute x 'xmlns)) + (jabber-xml-node-children xml-data)))) + (unless (or (member "urn:xmpp:delay" children-namespaces) + (member "jabber:x:delay" children-namespaces)) + (dolist (hook '(jabber-muc-hooks jabber-alert-muc-hooks)) + (run-hook-with-args hook + nick group (current-buffer) body-text + (funcall jabber-alert-muc-function + nick group (current-buffer) body-text)))))))))) (defun jabber-muc-process-presence (jc presence) (let* ((from (jabber-xml-get-attribute presence 'from)) |
From: Magnus H. <leg...@us...> - 2007-08-05 21:57:54
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv31917 Modified Files: jabber-avatar.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-372 Creator: Magnus Henoch <ma...@fr...> Fix bug for avatars without '.' in file name Index: jabber-avatar.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-avatar.el,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- jabber-avatar.el 12 Apr 2006 12:32:56 -0000 1.6 +++ jabber-avatar.el 5 Aug 2007 21:57:50 -0000 1.7 @@ -71,8 +71,8 @@ (let ((data (with-temp-buffer (insert-file-contents-literally filename) (buffer-string))) - (mime-type (progn (string-match "\\.[^.]+$" filename) - (mailcap-extension-to-mime (match-string 0 filename))))) + (mime-type (when (string-match "\\.[^.]+$" filename) + (mailcap-extension-to-mime (match-string 0 filename))))) (jabber-avatar-from-data data nil mime-type))) (defun jabber-avatar-from-base64-string (base64-string &optional mime-type) |
From: Magnus H. <leg...@us...> - 2007-08-05 21:36:28
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv23716 Modified Files: jabber-roster.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-371 Creator: Magnus Henoch <ma...@fr...> Roster bindings text: add directions for disabling it Index: jabber-roster.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-roster.el,v retrieving revision 1.49 retrieving revision 1.50 diff -u -d -r1.49 -r1.50 --- jabber-roster.el 31 Jul 2007 07:05:32 -0000 1.49 +++ jabber-roster.el 5 Aug 2007 21:36:22 -0000 1.50 @@ -319,6 +319,7 @@ C-c C-c Chat menu C-c C-m Multi-User Chat menu C-c C-i Info menu C-c C-r Roster menu C-c C-s Service menu +To disable this text, set `jabber-roster-show-bindings' to nil. ")) (insert "__________________________________\n\n") (if (null jabber-connections) |
From: Magnus H. <leg...@us...> - 2007-07-31 07:05:38
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv29810 Modified Files: jabber-keepalive.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-369 Creator: Magnus Henoch <ma...@fr...> Add optional jc argument to jabber-keepalive-start Index: jabber-keepalive.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-keepalive.el,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- jabber-keepalive.el 15 Apr 2007 23:53:16 -0000 1.6 +++ jabber-keepalive.el 31 Jul 2007 07:05:21 -0000 1.7 @@ -49,8 +49,11 @@ (defvar jabber-keepalive-debug nil "Log keepalive traffic when non-nil") -(defun jabber-keepalive-start () - "Activate keepalive" +(defun jabber-keepalive-start (&optional jc) + "Activate keepalive. +The JC argument makes it possible to add this function to +`jabber-post-connect-hooks'; it is ignored. Keepalive is activated +for all accounts regardless of the argument." (interactive) (when jabber-keepalive-timer @@ -62,7 +65,7 @@ 'jabber-keepalive-do)) (add-hook 'jabber-post-disconnect-hook 'jabber-keepalive-stop)) -(defun jabber-keepalive-stop() +(defun jabber-keepalive-stop () "Deactivate keepalive" (interactive) |
From: Magnus H. <leg...@us...> - 2007-07-31 07:05:38
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv30061 Modified Files: jabber-roster.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-370 Creator: Magnus Henoch <ma...@fr...> Add optional jc argument to jabber-switch-to-roster-buffer Index: jabber-roster.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-roster.el,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- jabber-roster.el 3 Jun 2007 18:33:22 -0000 1.48 +++ jabber-roster.el 31 Jul 2007 07:05:32 -0000 1.49 @@ -216,8 +216,10 @@ (put 'jabber-roster-mode 'mode-class 'special) -(defun jabber-switch-to-roster-buffer () - "Switch to roster buffer." +(defun jabber-switch-to-roster-buffer (&optional jc) + "Switch to roster buffer. +Optional JC argument is ignored; it's there so this function can +be used in `jabber-post-connection-hooks'." (interactive) (switch-to-buffer jabber-roster-buffer)) |
From: Magnus H. <leg...@us...> - 2007-07-31 07:05:17
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv29448 Modified Files: NEWS jabber-iq.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-368 Creator: Magnus Henoch <ma...@fr...> Make browse buffer names customizable Patch by Evgenii Terechkov. Index: NEWS =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/NEWS,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- NEWS 7 May 2007 01:40:29 -0000 1.58 +++ NEWS 31 Jul 2007 07:05:10 -0000 1.59 @@ -16,6 +16,10 @@ ** MUC bookmarks (not documented yet) +** Name of browse buffers customizable +See jabber-browse-buffer-format. +(not documented yet) + * New features in jabber.el 0.7.1 ** STARTTLS Index: jabber-iq.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-iq.el,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- jabber-iq.el 5 Feb 2007 21:59:03 -0000 1.20 +++ jabber-iq.el 31 Jul 2007 07:05:11 -0000 1.21 @@ -1,7 +1,7 @@ ;; jabber-iq.el - infoquery functions +;; Copyright (C) 2003, 2004, 2007 - Magnus Henoch - ma...@fr... ;; Copyright (C) 2002, 2003, 2004 - tom berger - ob...@in... -;; Copyright (C) 2003, 2004 - Magnus Henoch - ma...@fr... ;; This file is a part of jabber.el. @@ -43,6 +43,18 @@ :group 'jabber :type 'hook) +(defgroup jabber-browse nil "browse display options" + :group 'jabber) + +(defcustom jabber-browse-buffer-format "*-jabber-browse:-%n-*" + "The format specification for the name of browse buffers. + +These fields are available at this moment: + +%n JID to browse" + :type 'string + :group 'jabber-browse) + (defun jabber-browse-mode () "\\{jabber-browse-mode-map}" (kill-all-local-variables) @@ -152,7 +164,8 @@ (let ((from (or (jabber-xml-get-attribute xml-data 'from) jabber-server)) (xmlns (jabber-iq-xmlns xml-data)) (type (jabber-xml-get-attribute xml-data 'type))) - (with-current-buffer (get-buffer-create (concat "*-jabber-browse-:-" from "-*")) + (with-current-buffer (get-buffer-create (format-spec jabber-browse-buffer-format + (list (cons ?n from)))) (if (not (eq major-mode 'jabber-browse-mode)) (jabber-browse-mode)) |
From: Magnus H. <leg...@us...> - 2007-07-16 18:04:35
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv6598 Modified Files: AUTHORS jabber-activity.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-367 Creator: Magnus Henoch <ma...@fr...> Switch back to non-Jabber buffer in jabber-activity-switch-to Patch by Anthony Chaumas-Pellet Index: jabber-activity.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-activity.el,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- jabber-activity.el 5 Feb 2007 21:59:03 -0000 1.27 +++ jabber-activity.el 16 Jul 2007 18:04:29 -0000 1.28 @@ -293,17 +293,23 @@ ;;; Interactive functions +(defvar jabber-activity-last-buffer nil + "Last non-Jabber buffer used.") + (defun jabber-activity-switch-to (&optional jid-param) "If JID-PARAM is provided, switch to that buffer. If JID-PARAM is nil and there has been activity in another buffer, switch to that buffer. If no such -buffer exists, switch back to most recently used buffer." - (interactive) - (if (or jid-param jabber-activity-jids) - (let ((jid (or jid-param (car jabber-activity-jids)))) - (switch-to-buffer (jabber-activity-find-buffer-name jid)) - (jabber-activity-clean)) - ;; Switch back to the buffer used last - (switch-to-buffer nil))) +buffer exists, switch back to the last non Jabber chat buffer used." + (interactive) + (if (or jid-param jabber-activity-jids) + (let ((jid (or jid-param (car jabber-activity-jids)))) + (unless (eq major-mode 'jabber-chat-mode) + (setq jabber-activity-last-buffer (current-buffer))) + (switch-to-buffer (jabber-activity-find-buffer-name jid)) + (jabber-activity-clean)) + ;; Switch back to the buffer used last + (when (buffer-live-p jabber-activity-last-buffer) + (switch-to-buffer jabber-activity-last-buffer)))) ;;;###autoload (define-minor-mode jabber-activity-mode Index: AUTHORS =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/AUTHORS,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- AUTHORS 28 Apr 2007 15:00:36 -0000 1.9 +++ AUTHORS 16 Jul 2007 18:04:29 -0000 1.10 @@ -3,6 +3,7 @@ Magnus Henoch Contributors: +Anthony Chaumas-Pellet Mathias Dahl Mario Domenech Goulart Nolan Eakins |
From: Magnus H. <leg...@us...> - 2007-06-05 16:29:19
|
Update of /cvsroot/emacs-jabber/emacs-jabber In directory sc8-pr-cvs17:/tmp/cvs-serv24625 Modified Files: jabber-history.el Log Message: Revision: ma...@fr...--2005/emacs-jabber--cvs-head--0--patch-366 Creator: Magnus Henoch <ma...@fr...> Canonicalize JIDs in jabber-history-filename Index: jabber-history.el =================================================================== RCS file: /cvsroot/emacs-jabber/emacs-jabber/jabber-history.el,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- jabber-history.el 8 May 2007 12:22:26 -0000 1.27 +++ jabber-history.el 5 Jun 2007 16:29:16 -0000 1.28 @@ -125,7 +125,9 @@ loggin strategy is used or the global history filename." (if jabber-use-global-history jabber-global-history-filename - (concat jabber-history-dir "/" (jabber-jid-user contact)))) + ;; jabber-jid-symbol is the best canonicalization we have. + (concat jabber-history-dir + "/" (symbol-name (jabber-jid-symbol contact))))) (defun jabber-history-log-message (direction from to body timestamp) "Log a message" |