You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(24) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(66) |
Feb
(15) |
Mar
(15) |
Apr
(23) |
May
(16) |
Jun
(29) |
Jul
|
Aug
(5) |
Sep
(40) |
Oct
(10) |
Nov
(2) |
Dec
(25) |
2006 |
Jan
(43) |
Feb
(7) |
Mar
(11) |
Apr
(15) |
May
(7) |
Jun
(13) |
Jul
(13) |
Aug
(6) |
Sep
(3) |
Oct
|
Nov
(9) |
Dec
(12) |
2007 |
Jan
(5) |
Feb
(9) |
Mar
(27) |
Apr
(20) |
May
(20) |
Jun
(4) |
Jul
(54) |
Aug
(67) |
Sep
(27) |
Oct
(9) |
Nov
(18) |
Dec
(11) |
2008 |
Jan
(32) |
Feb
(29) |
Mar
(15) |
Apr
(6) |
May
(11) |
Jun
(2) |
Jul
(3) |
Aug
|
Sep
(17) |
Oct
(19) |
Nov
(8) |
Dec
(13) |
2009 |
Jan
(8) |
Feb
(3) |
Mar
(11) |
Apr
(18) |
May
(4) |
Jun
(2) |
Jul
(7) |
Aug
(12) |
Sep
(20) |
Oct
(1) |
Nov
(2) |
Dec
(9) |
2010 |
Jan
(1) |
Feb
(7) |
Mar
(1) |
Apr
|
May
(13) |
Jun
|
Jul
(5) |
Aug
(4) |
Sep
(7) |
Oct
(9) |
Nov
|
Dec
(6) |
2011 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(19) |
Sep
(1) |
Oct
(10) |
Nov
(2) |
Dec
(6) |
2012 |
Jan
(1) |
Feb
(3) |
Mar
(23) |
Apr
(1) |
May
(3) |
Jun
|
Jul
|
Aug
(1) |
Sep
(7) |
Oct
(3) |
Nov
(5) |
Dec
|
2013 |
Jan
(4) |
Feb
(6) |
Mar
(1) |
Apr
(20) |
May
(9) |
Jun
(1) |
Jul
(8) |
Aug
(14) |
Sep
|
Oct
(1) |
Nov
(4) |
Dec
(1) |
2014 |
Jan
(1) |
Feb
(16) |
Mar
|
Apr
(1) |
May
(3) |
Jun
(11) |
Jul
(7) |
Aug
(13) |
Sep
(4) |
Oct
|
Nov
(2) |
Dec
(2) |
2015 |
Jan
(2) |
Feb
(4) |
Mar
(2) |
Apr
(2) |
May
(5) |
Jun
(1) |
Jul
(9) |
Aug
(2) |
Sep
(2) |
Oct
(1) |
Nov
(5) |
Dec
(1) |
2016 |
Jan
(6) |
Feb
(1) |
Mar
(5) |
Apr
|
May
(7) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
(4) |
2017 |
Jan
(5) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(4) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
(1) |
Apr
(10) |
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(6) |
Aug
|
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(4) |
2023 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
From: <as...@ko...> - 2016-12-14 19:11:17
|
Hi, I think some XMPP-clients can transfer files. Is that something jabber.el can/want to handle? Just curious :-) Best regards, Adam -- "Do I really want to set this in Denmark?" Adam Sjøgren as...@ko... |
From: Damien C. <da...@ca...> - 2016-09-28 11:26:39
|
Hi, I'm discovering jabber-account-list and already made it look good on the zerodark theme (https://github.com/NicolasPetton/zerodark-theme/pull/12). Now, I'm wondering how to make jabber.el find my account password without writing it in jabber-account-list. The first thing I tried it auth-source (I am a user of auth-password-store so auth-source would be convenient). This solution doesn't work for me because jabber.el searches for a password associated with the server part of the JID which is something else for me: in my case, my JID is "da...@ca..." but the "cassou.me" entry in auth-source contains a different password than the one I'm using for XMPP. A possible workaround would be to add a new option to jabber-account-list for the key under which to search for a password in auth-source. Something like: (setq jabber-account-list `(("da...@ca..." (:auth-source-host . "my-XMPP-host")))) But this is not so easy because #'jabber-read-password takes a bare-jid as argument, not an account. So, I tried another approach: (setq jabber-account-list '(("da...@ca..." (:password . (password-store-get "my-XMPP-host"))))) That way, the expression (password-store-get "my-XMPP-host") is stored in the variable, not the password itself. When connecting, jabber.el must check the value of the option, and if it's a lisp expression, evaluate it and take the result as the password string. I did this change to make that work: (defun jabber-sasl-read-passphrase-closure (jc remember) "Return a lambda function suitable for `sasl-read-passphrase' for JC. Call REMEMBER with the password. REMEMBER is expected to return it as well." (lexical-let ((password (plist-get (fsm-get-state-data jc) :password)) (bare-jid (jabber-connection-bare-jid jc)) (remember remember)) (if password (lambda (prompt) (funcall remember (copy-sequence ;; MY CHANGES (cond ((stringp password) password) ((listp password) (eval password))) ;; /MY CHANGES ))) (lambda (prompt) (funcall remember (jabber-read-password bare-jid)))))) I can make a pull request if you want but I would prefer the first solution with :auth-source-host. What do you think? -- Damien Cassou http://damiencassou.seasidehosting.st "Success is the ability to go from one failure to another without losing enthusiasm." --Winston Churchill |
From: Cody B. <cod...@gm...> - 2016-07-16 18:45:16
|
I have been using Jabber.el for some time now, but recently I have been having problems with people sending me messages with html notations embedded in the messages, which jabber displays directly. For example [12:27] Joe> <font size="3">no</font> As you can see, it makes it difficult to read the message being sent. Is there a way to either interpret or strip the formatting from the messages? |
From: Uwe B. <ou...@ma...> - 2016-06-08 15:25:21
|
Hi Is there any change in the foreseeable future to connect to whatsapp using jabber? regards Uwe Brauer |
From: Phil G. <pg...@gm...> - 2016-05-31 13:19:21
|
as...@ko... (Adam Sjøgren) writes: > Adam writes: > Ok, I think I got this licked: Excellent! Thanks for running this to ground. My jabber protocol knowledge is minimal, and my use case involved a machine sending HTML messages to a chatroom, so I completely missed this. (How are feature advertisements done on chatrooms, I wonder? I should read up on that.) I'll look into making a patch for this when I get around to it, but that may be a while. If anyone else would rather do it, I'm happy for them to incorporate the code into jabber.el in whatever way is most compatible licensing-wise (I presume GPL). > Best regards, > > Adam phil |
From: <as...@ko...> - 2016-05-27 19:21:34
|
Adam writes: > I think we need to figure out how to advertise XEP-0071 compability? Ok, I think I got this licked: I took your function: (defun jabber-print-html-body (xml-data who mode) "Print messages formatted in HTML in XML-DATA" (let* ((html-msg (car (jabber-xml-get-children xml-data 'html)))) (when (eql mode :insert) (when html-msg (let* (beg end) (setq beg (point)) (insert (jabber-sexp2xml html-msg)) (setq end (point)) (shr-render-region beg end)))) html-msg)) And added: (add-to-list 'jabber-body-printers 'jabber-print-html-body) (jabber-disco-advertise-feature "http://jabber.org/protocol/xhtml-im") I then sent a formatted message from Pidgin, and jabber.el logged this: <message id="purplecb1517e7" type="chat" to="as...@ja..." from="as...@ko.../Pidgin"> <active xmlns="http://jabber.org/protocol/chatstates"/> <body>This is bold. And a link <https://koldfront.dk/>. Test 3.</body> <html xmlns="http://jabber.org/protocol/xhtml-im"> <body xmlns="http://www.w3.org/1999/xhtml"> <p>This is <span style="font-weight: bold;">bold</span>. And a <a href="https://koldfront.dk/">link</a>. Test <em>3</em>. </p> </body> </html> </message> And the HTML-version was displayed in the chat buffer! So before adding the jabber-disco-advertise-feature call, I saw: [20:56] as...@ko...> This is bold. And a link <https://koldfront.dk/>. In plain text in the chat-buffer. After advertising: [21:16] as...@ko...> This is bold. And a link. Test 3. --- (Where "link" was clickable, and "3" was in italics. Bold didn't work, but I guess that is due to the span used by Pidgin.) So except for the whitespace, it looks really good! Best regards, Adam -- "Eternal evil Adam Sjøgren Yeah it stares behind the desk" as...@ko... |
From: <as...@ko...> - 2016-05-27 19:10:21
|
Phil writes: >> If I edebug the function, it seems to be called om a "Composing" >> message, to which it responds nil, and then it doesn't get called >> again. > What do you mean by "a 'Composing' message"? Is that the value of mode? Nope, that's just the XMPP message sent by another client when its person is typing. After enabling jabber-debug-log-xml, it seems that Pidgin doesn't send the HTML to jabber.el at all. I guess the reason is that jabber.el doesn't advertise XEP-0071 capability? "The primary means of discovering support for XHTML-IM is Service Discovery (XEP-0030) [27] (or the dynamic profile of service discovery defined in Entity Capabilities (XEP-0115) [28])." - http://www.xmpp.org/extensions/xep-0071.html section 10 [...] > 2) Pidgin is sending the "HTML" as a text message that happens to > contain words with with other funny words with angle brackets around > them. :) It only sends the text version - I *think* because Pidgin doesn't realize that I (well, you) just enhanced jabber.el to understand XHTML. > Thoughts? I think we need to figure out how to advertise XEP-0071 compability? Best regards, Adam -- "Eternal evil Adam Sjøgren Yeah it stares behind the desk" as...@ko... |
From: Phil G. <pg...@gm...> - 2016-05-24 23:04:26
|
as...@ko... (Adam Sjøgren) writes: > Phil writes: > >> The attached function renders XHTML messages more readably in Emacs >> using shr. (It was nice to see how easy this is now with just Emacs core >> packages.) > > This sounds nice - I can't figure out how to make it work, though :-/ Hmm. > I evaluated the function and added it to the jabber-body-printers list, > but I still get the text-version e.g. when writing some HTML in Pidgin > and sending it to jabber.el. > > If I edebug the function, it seems to be called om a "Composing" > message, to which it responds nil, and then it doesn't get called > again. What do you mean by "a 'Composing' message"? Is that the value of mode? That would certainly be a bug for me to fix, but I don't see any documentation of that mode value. Setting that aside for a moment... > Do I need to do something else to activate it? A preamble: As I (and the function) understand it, an "HTML Jabber message" is one which has contains subtree of XHTML in xml-data stanza of the message. The client has to deliberately encode its message as HTML for this to work; if it sends plain text (CDATA?) that contains HTML, it won't have the same structure in the XML message. (Note that I got 99% of this from reverse-engineering one sample, though, so moderately-sized grains of salt may be warranted.) Two possibilities that I see: 1) The message you sent is embedding (X)HTML in the Jabber message in a way that is different from what I tested on. 2) Pidgin is sending the "HTML" as a text message that happens to contain words with with other funny words with angle brackets around them. :) #1 is certainly possible, given my limited testing. My gut says #2 is what's happening now, though. If you print out xml-data on the test message, you can resolve the matter definitively. If the message text hasn't been converted to sexprs in xml-data, then it will be rendered as text. It might make sense to have an additional chat printer that tries to infer the presence of HTML in text and renders it. (Possibly if the message starts with "<html>...."?) I think it would be nice to make it a separate printer because people may wish to always render "text messages made up of HTML" as text, but still render "HTML messages" as HTML. Thoughts? > Adam phil |
From: <as...@ko...> - 2016-05-23 20:58:14
|
Phil writes: > The attached function renders XHTML messages more readably in Emacs > using shr. (It was nice to see how easy this is now with just Emacs core > packages.) This sounds nice - I can't figure out how to make it work, though :-/ I evaluated the function and added it to the jabber-body-printers list, but I still get the text-version e.g. when writing some HTML in Pidgin and sending it to jabber.el. If I edebug the function, it seems to be called om a "Composing" message, to which it responds nil, and then it doesn't get called again. Do I need to do something else to activate it? Best regards, Adam -- "the office is quiet now, i am at the desk, preparing Adam Sjøgren to landscape for another day." as...@ko... |
From: jla <jl...@op...> - 2016-05-13 15:20:12
|
I made this and had it working just now: (defun my-jabber () (interactive) (jabber-connect-all) (sit-for 5) (eyebrowse-switch-to-window-config-6) (jabber-chat-with "my...@ex..." "pe...@ex...") (other-window 1) (jabber-chat-with "my...@ex..." "pe...@ex...") (other-window 1) (jabber-chat-with "my...@ex..." "pe...@ex...) ) But now I get this when I try to send something. Only when i use jabber- chat-with from .emacs, works when you call with M-x. Debugger entered--Lisp error: (wrong-type-argument symbolp "my...@ex...") fsm-get-state-data("my...@ex...") jabber-connection-bare-jid("my...@ex...") jabber-find-active-connection("my...@ex...") jabber-chat-buffer-send() call-interactively(jabber-chat-buffer-send nil nil) command-execute(jabber-chat-buffer-send) |
From: Phil G. <pg...@gm...> - 2016-05-10 14:01:28
|
The emacs-jabber documentation, as posted on the project website[1], says the following of chat body printers: > Body printers are a subgroup of chat printers. They are exclusive; > only one of them applies to any given message. The idea is that > "higher-quality" parts of the message override pieces included for > backwards compatibility. Included are jabber-muc-print-invite and > jabber-chat-normal-body; functions for XHTML-IM and PGP encrypted > messages may be written in the future. The attached function renders XHTML messages more readably in Emacs using shr. (It was nice to see how easy this is now with just Emacs core packages.) I had only one source of HTML-formatted messages for testing, so there may be other ways of formatting the message that I missed. However, this seems like the 80% solution, at least. I hope it can be included in emacs-jabber. If not, perhaps others will find it helpful. As for the PGP printer: Good luck. :) phil [1] http://emacs-jabber.sourceforge.net/manual-0.8.0/Chat-printers.html |
From: Mingshen S. <ms...@cs...> - 2016-03-14 09:34:54
|
Dear Magnus, Great, thank you for your reply. I will look into that function and try to teach myself elisp :) Magnus Henoch writes: > Mingshen Sun <ms...@cs...> writes: > >> Dear folks, >> >> I am using emacs-jabber these days. I found that when a contact >> have more than one resources with the same priorities but >> different shows (e.g., "Away", "Online"), the roster will >> display the first show in the contact summary. >> >> For example, I have a contact called Alice. She uses OS X >> messaging and Adium at the same time in different devices. One >> shows "Away" and "Online" for another. We can definitely read >> these information from resources details. However, when you look >> at the contact summary. It shows that Alice is away. >> >> * Alice <-> Away >> MessagingXXXXXXXXX - Away (), priority 0 AdiumXXXXXXXX - >> Online (), priority 0 >> >> My suggestion is that if there exists one "Online" status, the >> summary should show "Online", since she IS INDEED ONLINE. >> >> I have tried to made modifications myself, but failed to find >> the main cause. (I am not familiar with elisp.) Could you >> provide some suggestions? Thank you so much. > > Right, this happens in the function jabber-prioritize-resources, > which sorts the entries for different devices/resources. It > currently only looks at the priority, so when the priority numbers > are equal, it's unpredictable which one will "win". > > I guess it should look at the "show" status when the priority of > two resources is equal, probably following the value of the > variable jabber-sort-order. > > I'll see if I can get that sorted out. Of course, feel free to > beat me to it :) > > Regards, > Magnus -- Best, Mingshen |
From: Magnus H. <mag...@gm...> - 2016-03-14 09:26:58
|
Mingshen Sun <ms...@cs...> writes: > Dear folks, > > I am using emacs-jabber these days. I found that when a contact > have more than one resources with the same priorities but > different shows (e.g., "Away", "Online"), the roster will > display the first show in the contact summary. > > For example, I have a contact called Alice. She uses OS X > messaging and Adium at the same time in different devices. One > shows "Away" and "Online" for another. We can definitely read > these information from resources details. However, when you look > at the contact summary. It shows that Alice is away. > > * Alice <-> Away > MessagingXXXXXXXXX - Away (), priority 0 AdiumXXXXXXXX - > Online (), priority 0 > > My suggestion is that if there exists one "Online" status, the > summary should show "Online", since she IS INDEED ONLINE. > > I have tried to made modifications myself, but failed to find > the main cause. (I am not familiar with elisp.) Could you > provide some suggestions? Thank you so much. Right, this happens in the function jabber-prioritize-resources, which sorts the entries for different devices/resources. It currently only looks at the priority, so when the priority numbers are equal, it's unpredictable which one will "win". I guess it should look at the "show" status when the priority of two resources is equal, probably following the value of the variable jabber-sort-order. I'll see if I can get that sorted out. Of course, feel free to beat me to it :) Regards, Magnus |
From: Mingshen S. <ms...@cs...> - 2016-03-10 04:02:14
|
Dear folks, I am using emacs-jabber these days. I found that when a contact have more than one resources with the same priorities but different shows (e.g., "Away", "Online"), the roster will display the first show in the contact summary. For example, I have a contact called Alice. She uses OS X messaging and Adium at the same time in different devices. One shows "Away" and "Online" for another. We can definitely read these information from resources details. However, when you look at the contact summary. It shows that Alice is away. * Alice <-> Away MessagingXXXXXXXXX - Away (), priority 0 AdiumXXXXXXXX - Online (), priority 0 My suggestion is that if there exists one "Online" status, the summary should show "Online", since she IS INDEED ONLINE. I have tried to made modifications myself, but failed to find the main cause. (I am not familiar with elisp.) Could you provide some suggestions? Thank you so much. -- Best, Bob |
From: Magnus H. <mag...@gm...> - 2016-03-06 22:25:29
|
ni...@ly... (Niels Möller) writes: > I don't quite understand how privacy-lists interacts with muc, > and after re-reading https://xmpp.org/extensions/xep-0016.html, > I'm still confused. It gives a couple of examples but I fail to > understand how the different "type" and "value" attributes > should work and what options there are. Right, since you can't really have a "subscription" to a MUC room, any stanzas to or from the room get blocked as well. Now that I think about it, it seems pretty difficult to use a block-by-default privacy list and still use MUC.... The best thing I can think of is adding MUC rooms to a particular roster group, and then add a privacy list rule that lets anything through for those MUC rooms. To add the room to a roster group, type M-x jabber-roster-change, enter the JID of the room, give it a name if you want (that's what it's going to show up in the roster as, and it also changes the name of the chat buffer), and enter "MUC" as the group. Then change the privacy list function to something like this: (defun nm-jabber-privacy-block-unsubscribed (jc) (interactive (list (jabber-read-account))) (jabber-send-iq jc (jabber-connection-bare-jid jc) "set" '(query ((xmlns . "jabber:iq:privacy")) (list ((name . "block-unsubscribed")) (item ((type . "group") (value . "MUC") (action . "allow") (order . "1"))) (item ((type . "subscription") (value . "none") (action . "deny") (order . "2"))))) #'jabber-process-data nil #'jabber-process-data "Defining list block-unsubscribed failed")) I _think_ that should work... Regards, Magnus |
From: <ni...@ly...> - 2016-03-05 20:47:58
|
ni...@ly... (Niels Möller) writes: > I'm a fairly new jabber user; I use jabber.el in my emacs (debian > package of version 0.8), and "conversations" on my phone. Recently, I've > started to see spam over jabber. I looked up XEP-0016, which allows > blocking messages from unknown senders (among many other things), and it > appears to be implemented on the jabber server I use, > jabber.lysator.liu.se. An update after using my hack for a few months (code quoted below for reference). It has eliminated spam, but today I found out it broke multi-user-chat. I have a private (members-only) muc with a couple of friends, used while traveling together. With the "block-unsubscribed" list below I can neither send or receive messages for the muc group. The *fsm-debug* buffer includes some error messages. Not sure what to look for, but the following entry pointed me to my privacy list. Sat Mar 5 18:35:17 2016: Error (error "Couldn't query groupchat: Not acceptable: Your active privacy list has denied the routing of this stanza.") while processing (iq ((from . "RED...@co...") (to . "ni...@ly.../1214188566145719594069081") (type . "error") (id . "emacs-iq-22235.6357.583762")) (query ((xmlns . "http://jabber.org/protocol/disco#info"))) (error ((code . "406") (type . "modify")) (not-acceptable ((xmlns . "urn:ietf:params:xml:ns:xmpp-stanzas"))) (text ((xmlns . "urn:ietf:params:xml:ns:xmpp-stanzas")) "Your active privacy list has denied the routing of this stanza."))) with function jabber-process-iq The immediate problem was solved by disabling both my "active" and my "default" lists (using '(query ((xmlns . "jabber:iq:privacy")) (default)) and '(query ((xmlns . "jabber:iq:privacy")) (active)) ). But I guess spam might return as well. I don't quite understand how privacy-lists interacts with muc, and after re-reading https://xmpp.org/extensions/xep-0016.html, I'm still confused. It gives a couple of examples but I fail to understand how the different "type" and "value" attributes should work and what options there are. Regards, /Niels > (defun nm-jabber-privacy-list (jc) > (interactive (list (jabber-read-account))) > (jabber-send-iq jc (jabber-connection-bare-jid jc) > "get" > '(query ((xmlns . "jabber:iq:privacy"))) > #'jabber-process-data nil > #'jabber-process-data "Privacy list failed")) > > (defun nm-jabber-privacy-block-unsubscribed (jc) > (interactive (list (jabber-read-account))) > (jabber-send-iq jc (jabber-connection-bare-jid jc) > "set" > '(query ((xmlns . "jabber:iq:privacy")) > (list ((name . "block-unsubscribed")) > (item ((type . "subscription") > (value . "none") > (action . "deny") > (order . "1"))))) > #'jabber-process-data nil > #'jabber-process-data "Defining list block-unsubscribed failed")) > > (defun nm-jabber-privacy-block-unsubscribed-as-default (jc) > (interactive (list (jabber-read-account))) > (jabber-send-iq jc (jabber-connection-bare-jid jc) > "set" > '(query ((xmlns . "jabber:iq:privacy")) > (default ((name . "block-unsubscribed")))) > #'jabber-process-data nil > #'jabber-process-data "Setting list block-unsubscribed as default failed")) -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. |
From: Magnus H. <mag...@gm...> - 2016-02-07 18:23:19
|
Hi all, So the recent thread about XML parsing oddities got me thinking that it's sometimes tricky to figure out exactly what's being sent to and from jabber.el. To some extent you can use Wireshark for that, but that doesn't help much after the starttls negotiation: once the connection is encrypted, you'd need to capture the traffic from within the application. The XML console works fairly well as long as the XML data is being parsed correctly. Thus I came up with a little tool called Cabledolphin. It runs inside Emacs, advising functions to get hold of network data being sent and received, and writes everything to pcapng/pcap files for examination in Wireshark or similar tools. It's available in MELPA, and the repository is on Github: https://github.com/legoscia/cabledolphin I hope it will be useful to someone :) Regards, Magnus |
From: David E. <dm...@dm...> - 2016-01-25 07:24:29
|
On Sun, Jan 24 2016, Magnus Henoch <mag...@gm...> wrote: > [...] > > Thanks for fixing this! I've merged and pushed your patch. It > should show up in MELPA soon. Thanks for the original code! > Hm, that looks like it might work... It doesn't immediately. xml.el doesn't look to be structured to easily support the kind of interface that would seem useful here. The first thing that all of the parsing routines do is copy the region to be parsed to a temporary buffer, which the parser is then free to modify. As a result, when the parsing is complete, we don't really have any clue how much of the original buffer should be removed (or perhaps more usefully, how far in the original buffer we should move point such that it is past the term being returned). Setting `xml-sub-parser' to `t' would allow the use of the parser in the case where there is more than a single term in the buffer. Of course, this would require some re-structuring of the loop that handles the terms that arrive from the server (because a single call to `xml-parse-region' will then return multiple terms and we have to loop through processing them). How an incomplete term is handled in this case might well be problematic - if the first term in the buffer is complete but a subsequent term is not (still waiting on data from the network, for example), error recovery will be "interesting". > I haven't really looked into improving the Emacs xml library, since in > any case I would want jabber.el to work with earlier versions, but > that's a bit of a fallacy: if I'd done something about this a few > years ago, I'd probably feel comfortable requiring a modern xml.el > now. If we were to extend the interface provided by xml.el slightly, we could presumably detect the availability of the updated interface in jabber.el and use newly provided functionality when it is available. > I started looking at something similar: Emacs 24.1 added support > for linking with libxml2, but this is not currently usable for > jabber.el for two reasons: it drops namespaces, and it returns > `nil' both for parse errors and for incomplete stanzas - in the > former case, we need to signal an error, but in the latter case, > we just wait for more data. I started working on the interface in > this branch: > > https://github.com/legoscia/emacs/commits/xml-return-errors > > but I didn't manage to finish it. The error behaviour seems generally problematic for any code trying to use such an interface, so perhaps it could be changed. > Alas, lack of free time hampers my progress on these things (I > also want to finish my optimisations of roster redrawing, which > seems to be the major performance bottleneck with rosters with a > few hundred items.) Understood. > If anyone would like to test the xml-sub-parser change, just to make > sure there's no weird edge-case where it breaks, I'd be very happy to > have it. The simple approach that I initially suggested is definitely insufficient - more extensive changes would be required, see above. > I just split that part of the code out into a separate function, > jabber-xml-parse-next-stanza, so that it's easy to change in > isolation, and added two simple test cases for it. I'm not sure > when I'll have time to pick this up again, so feel free to grab it > :) I will continue to look at it when I have time. |
From: Magnus H. <mag...@gm...> - 2016-01-24 13:58:57
|
David Edmondson <dm...@dm...> writes: > (I'm not currently subscribed to emacs-jabber-general - please > include me in any replies.) > > I'm trying to use emacs-jabber to communicate with the Oracle > Beehive XMPP server at $dayjob. The server seems to be liberal > in sprinkling the XML that it supplies with white space. The XML > parser itself is fine with this, but > `jabber-xml-skip-tag-forward' couldn't cope. Thanks for fixing this! I've merged and pushed your patch. It should show up in MELPA soon. > More generally, wouldn't it be useful if the emacs XML library > provided a way to consume terms from a buffer in an iterative > manner? I tried playing around with: > > (let ((xml-sub-parser t)) > (xml-parse-region (point-min) (point-max))) > > which is doing the right kind of thing, but really it would be > more convenient if we could ask the XML parser to read a single > term from a buffer, return the term _and_ remove the term that > was consumed from the buffer. The emacs JSON parser supports > something like this, I believe (though it has been several years > since I last used it). Hm, that looks like it might work... I haven't really looked into improving the Emacs xml library, since in any case I would want jabber.el to work with earlier versions, but that's a bit of a fallacy: if I'd done something about this a few years ago, I'd probably feel comfortable requiring a modern xml.el now. I started looking at something similar: Emacs 24.1 added support for linking with libxml2, but this is not currently usable for jabber.el for two reasons: it drops namespaces, and it returns `nil' both for parse errors and for incomplete stanzas - in the former case, we need to signal an error, but in the latter case, we just wait for more data. I started working on the interface in this branch: https://github.com/legoscia/emacs/commits/xml-return-errors but I didn't manage to finish it. Alas, lack of free time hampers my progress on these things (I also want to finish my optimisations of roster redrawing, which seems to be the major performance bottleneck with rosters with a few hundred items.) If anyone would like to test the xml-sub-parser change, just to make sure there's no weird edge-case where it breaks, I'd be very happy to have it. I just split that part of the code out into a separate function, jabber-xml-parse-next-stanza, so that it's easy to change in isolation, and added two simple test cases for it. I'm not sure when I'll have time to pick this up again, so feel free to grab it :) Regards, Magnus |
From: David E. <dm...@dm...> - 2016-01-21 09:44:08
|
(I'm not currently subscribed to emacs-jabber-general - please include me in any replies.) I'm trying to use emacs-jabber to communicate with the Oracle Beehive XMPP server at $dayjob. The server seems to be liberal in sprinkling the XML that it supplies with white space. The XML parser itself is fine with this, but `jabber-xml-skip-tag-forward' couldn't cope. More generally, wouldn't it be useful if the emacs XML library provided a way to consume terms from a buffer in an iterative manner? I tried playing around with: (let ((xml-sub-parser t)) (xml-parse-region (point-min) (point-max))) which is doing the right kind of thing, but really it would be more convenient if we could ask the XML parser to read a single term from a buffer, return the term _and_ remove the term that was consumed from the buffer. The emacs JSON parser supports something like this, I believe (though it has been several years since I last used it). David Edmondson (1): jabber-xml-skip-tag-forward: improve the match regexp jabber-xml.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) -- 2.6.3 |
From: David E. <dm...@dm...> - 2016-01-21 09:40:47
|
Improvements to the scanning of XML tags and properties: - Allow for white space after the parameter assignment sign (=). - Don't allow a closing angle bracket (>) in parameter names. - Skip trailing white space before looking for node termination (> or />). - Match syntax table white space rather than enumerating the white space characters inline. --- jabber-xml.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/jabber-xml.el b/jabber-xml.el index 46762ed..e19a247 100644 --- a/jabber-xml.el +++ b/jabber-xml.el @@ -111,15 +111,16 @@ enough for us." (if (search-forward "]]>" nil t) (goto-char (match-end 0)) (throw 'unfinished nil))) - ((looking-at "<\\([^ \t\n/>]+\\)\\([ \t\n]+[^=]+='[^']*'\\|[ \t\n]+[^=]+=\"[^\"]*\"\\)*") + ((looking-at "<\\([^[:space:]/>]+\\)\\([[:space:]]+[^=>]+=[[:space:]]*'[^']*'\\|[[:space:]]+[^=>]+=[[:space:]]*\"[^\"]*\"\\)*") (let ((node-name (match-string 1))) (goto-char (match-end 0)) + (skip-syntax-forward "\s-") ; Skip over trailing white space. (cond ((looking-at "/>") (goto-char (match-end 0)) t) ((looking-at ">") - (forward-char 1) + (goto-char (match-end 0)) (unless (and dont-recurse-into-stream (equal node-name "stream:stream")) (loop do (skip-chars-forward "^<") -- 2.6.3 |
From: Евгений Т. <evg...@ya...> - 2016-01-08 12:18:34
|
Max wrote: > Is there a way to add conference jid directly to roster? jabber-send-subscription-request > Or somehow else autoconnect to, for example, > co...@co... every time my account me...@my... is connected? jabber-edit-bookmarks Both functions documented in jabber.el manual, read it. -- С уважением, Терешков Евгений. Jabber ID: ev...@al..., evg...@ja... |
From: Max <ma...@si...> - 2016-01-08 11:12:50
|
Hi. Is there a way to add conference jid directly to roster? Or somehow else autoconnect to, for example, co...@co... every time my account me...@my... is connected? cheers, Max. |
From: <ni...@ly...> - 2015-12-03 17:34:05
|
Magnus Henoch <mag...@gm...> writes: > On the other hand, XEP-0016 is a complex beast, and presenting all the > available options that almost no-one uses might give an overwhelming > and confusing interface. Your functions are virtuously simple in > comparison. I think it's good to start with something simple, managing a "default" list, where each entry is filter type (from a short list) and any additional data. And then expand with management of multiple lists and more obscure filters as needed later on. But the "present current state"-function should preferably display all state, and not omit anything, however obscure it is. Regards, /Niels -- Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26. Internet email is subject to wholesale government surveillance. |
From: Magnus H. <mag...@gm...> - 2015-11-30 20:45:59
|
ni...@ly... (Niels Möller) writes: > Hi, > > I'm a fairly new jabber user; I use jabber.el in my emacs > (debian package of version 0.8), and "conversations" on my > phone. Recently, I've started to see spam over jabber. I looked > up XEP-0016, which allows blocking messages from unknown senders > (among many other things), and it appears to be implemented on > the jabber server I use, jabber.lysator.liu.se. > > I've tried to enable it from emacs, using the below crude > functions. I'm wondering if there's any better way to do it? I > don't quite understand neither the inner workings of jabber.el, > nor the fine details of xep-0016. That's the way to do it: a user action leads to a call to `jabber-send-iq'. I've been thinking about what kind of user interface to put on top of this. Perhaps something similar to what `jabber-edit-bookmarks' does: present the current state in a form, and let the user modify that. On the other hand, XEP-0016 is a complex beast, and presenting all the available options that almost no-one uses might give an overwhelming and confusing interface. Your functions are virtuously simple in comparison. Maybe there should be a simple form, that lets you choose: * whether to block unsubscribed contacts * which JIDs to block and forgo the more advanced possibilities of XEP-0016... Regards, Magnus > > > Regards, > /Niels Möller > > (defun nm-jabber-privacy-list (jc) > (interactive (list (jabber-read-account))) > (jabber-send-iq jc (jabber-connection-bare-jid jc) > "get" > '(query ((xmlns . "jabber:iq:privacy"))) > #'jabber-process-data nil > #'jabber-process-data "Privacy list failed")) > > (defun nm-jabber-privacy-block-unsubscribed (jc) > (interactive (list (jabber-read-account))) > (jabber-send-iq jc (jabber-connection-bare-jid jc) > "set" > '(query ((xmlns . "jabber:iq:privacy")) > (list ((name . "block-unsubscribed")) > (item ((type . "subscription") > (value . "none") > (action . "deny") > (order . "1"))))) > #'jabber-process-data nil > #'jabber-process-data "Defining list block-unsubscribed failed")) > > (defun nm-jabber-privacy-block-unsubscribed-as-default (jc) > (interactive (list (jabber-read-account))) > (jabber-send-iq jc (jabber-connection-bare-jid jc) > "set" > '(query ((xmlns . "jabber:iq:privacy")) > (default ((name . "block-unsubscribed")))) > #'jabber-process-data nil > #'jabber-process-data "Setting list block-unsubscribed as default failed")) |