emacsweblogs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacsweblogs] jira.el and xml-rpc.el


From: Mark A. Hershberger
Subject: [Emacsweblogs] jira.el and xml-rpc.el
Date: Mon, 14 Sep 2009 10:51:46 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

I've updated the handling of dateTime elements in xml-rpc.el to be more
spec-compliant and reliable.  Unfortunately, because it was difficult to
determine the when a dateTime parameter was given, I had to make some
backwards-incompatible changes.

Looking over jira.el (http://www.emacswiki.org/emacs/jira.el), it looks
like you'll need to update jira.el so that it works with the new
xml-rpc.el.

lisppaste.el needed this sort of update and I was able to patch it so
that it worked with the new xml-rpc.el as well as the older one.  Here
is the patch:

--- lisppaste.el~       2009-09-13 21:54:13.235164438 -0400
+++ lisppaste.el        2009-09-13 21:56:33.031180619 -0400
@@ -180,11 +180,14 @@
   "Clean an iso8601 TIME string to return YYYY-MM-DD.
 
 Not very robust."
+  (if (listp time)                      ; new style xml-rpc
+      (format-time-string "%Y-%m-%d" (cadr time))
+
   (if (string-match "^\\(....\\)\\(..\\)\\(..\\)T..:..:..$" time)
       (format "%s-%s-%s" (match-string 1 time)
                          (match-string 2 time)
                          (match-string 3 time))
-    (error "Invalid time format `%s'" time)))
+    (error "Invalid time format `%s'" time))))
 
 (defvar lisppaste-creation-help
   (concat ";; Enter your paste below, and press C-c C-c to send.\n"

Diff finished.  Sun Sep 13 21:56:59 2009

In summary, older versions returned a string, but this version returns a
list:

    (NAME :datetime (x y))

When you want to pass in a dateTime parameter, it must be preceded by
the :datetime keyword as above.

Let me know if I can help clarify anything else.

If you have the time and interest, I maintain xml-rpc.el (and
weblogger.el) on Savannah.  Please join the mailing list to keep up to
date: https://savannah.nongnu.org/mail/?group=emacsweblogs

Mark.


-- 
http://hexmode.com/

Every day, mindful practice.  When the mind is disciplined, then the
Way can work for us.  Otherwise, all we do is talk of the Way; everything
is just words; and the world will know us as its one great fool.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]