signal(error ("Error during request: 301"))
error("Error during request: %s" 301)
(progn (error "Error during request: %s" url-http-response-status))
(if (> url-http-response-status 299) (progn (error "Error during request: %s" url-http-response-status)))
(save-current-buffer (set-buffer buffer) (if (not (numberp url-http-response-status)) (progn (error "Why? url-http-response-status is %s" url-http-response-status))) (if (> url-http-response-status 299) (progn (error "Error during request: %s" url-http-response-status))))
(let ((buffer (url-retrieve-synchronously server-url))) (save-current-buffer (set-buffer buffer) (if (not (numberp url-http-response-status)) (progn (error "Why? url-http-response-status is %s" url-http-response-status))) (if (> url-http-response-status 299) (progn (error "Error during request: %s" url-http-response-status)))) (xml-rpc-request-process-buffer buffer))
(if async-callback-function (url-retrieve server-url async-callback-function) (let ((buffer (url-retrieve-synchronously server-url))) (save-current-buffer (set-buffer buffer) (if (not (numberp url-http-response-status)) (progn (error "Why? url-http-response-status is %s" url-http-response-status))) (if (> url-http-response-status 299) (progn (error "Error during request: %s" url-http-response-status)))) (xml-rpc-request-process-buffer buffer)))
(cond ((boundp (quote url-be-asynchronous)) (if async-callback-function (setq url-be-asynchronous t url-current-callback-data (list async-callback-function (current-buffer)) url-current-callback-func (quote xml-rpc-request-callback-handler)) (setq url-be-asynchronous nil)) (url-retrieve server-url t) (if (not url-be-asynchronous) (progn (let ((result (xml-rpc-request-process-buffer ...))) (if (> xml-rpc-debug 1) (progn (print result ...))) result)))) (t (if async-callback-function (url-retrieve server-url async-callback-function) (let ((buffer (url-retrieve-synchronously server-url))) (save-current-buffer (set-buffer buffer) (if (not (numberp url-http-response-status)) (progn (error "Why? url-http-response-status is %s" url-http-response-status))) (if (> url-http-response-status 299) (progn (error "Error during request: %s" url-http-response-status)))) (xml-rpc-request-process-buffer buffer)))))
(let ((url-request-method "POST") (url-package-name "xml-rpc.el") (url-package-version xml-rpc-version) (url-request-data (concat "<?xml version=\"1.0\"" " encoding=\"UTF-8\"?>\n" (let ((temp-buffer (generate-new-buffer " *temp*"))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn ... ... ...) (and ... ...)))) "\n")) (url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5") (url-request-coding-system xml-rpc-use-coding-system) (url-http-attempt-keepalives nil) (url-request-extra-headers (list (cons "Connection" "close") (cons "Content-Type" "text/xml; charset=utf-8")))) (if (> xml-rpc-debug 1) (progn (print url-request-data (create-file-buffer "request-data")))) (cond ((boundp (quote url-be-asynchronous)) (if async-callback-function (setq url-be-asynchronous t url-current-callback-data (list async-callback-function (current-buffer)) url-current-callback-func (quote xml-rpc-request-callback-handler)) (setq url-be-asynchronous nil)) (url-retrieve server-url t) (if (not url-be-asynchronous) (progn (let ((result ...)) (if (> xml-rpc-debug 1) (progn ...)) result)))) (t (if async-callback-function (url-retrieve server-url async-callback-function) (let ((buffer (url-retrieve-synchronously server-url))) (save-current-buffer (set-buffer buffer) (if (not ...) (progn ...)) (if (> url-http-response-status 299) (progn ...))) (xml-rpc-request-process-buffer buffer))))))
(save-excursion (let ((url-request-method "POST") (url-package-name "xml-rpc.el") (url-package-version xml-rpc-version) (url-request-data (concat "<?xml version=\"1.0\"" " encoding=\"UTF-8\"?>\n" (let ((temp-buffer ...)) (save-current-buffer (set-buffer temp-buffer) (unwind-protect ... ...))) "\n")) (url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5") (url-request-coding-system xml-rpc-use-coding-system) (url-http-attempt-keepalives nil) (url-request-extra-headers (list (cons "Connection" "close") (cons "Content-Type" "text/xml; charset=utf-8")))) (if (> xml-rpc-debug 1) (progn (print url-request-data (create-file-buffer "request-data")))) (cond ((boundp (quote url-be-asynchronous)) (if async-callback-function (setq url-be-asynchronous t url-current-callback-data (list async-callback-function (current-buffer)) url-current-callback-func (quote xml-rpc-request-callback-handler)) (setq url-be-asynchronous nil)) (url-retrieve server-url t) (if (not url-be-asynchronous) (progn (let (...) (if ... ...) result)))) (t (if async-callback-function (url-retrieve server-url async-callback-function) (let ((buffer ...)) (save-current-buffer (set-buffer buffer) (if ... ...) (if ... ...)) (xml-rpc-request-process-buffer buffer)))))))
(unwind-protect (save-excursion (let ((url-request-method "POST") (url-package-name "xml-rpc.el") (url-package-version xml-rpc-version) (url-request-data (concat "<?xml version=\"1.0\"" " encoding=\"UTF-8\"?>\n" (let (...) (save-current-buffer ... ...)) "\n")) (url-mime-charset-string "utf-8;q=1, iso-8859-1;q=0.5") (url-request-coding-system xml-rpc-use-coding-system) (url-http-attempt-keepalives nil) (url-request-extra-headers (list (cons "Connection" "close") (cons "Content-Type" "text/xml; charset=utf-8")))) (if (> xml-rpc-debug 1) (progn (print url-request-data (create-file-buffer "request-data")))) (cond ((boundp (quote url-be-asynchronous)) (if async-callback-function (setq url-be-asynchronous t url-current-callback-data (list async-callback-function ...) url-current-callback-func (quote xml-rpc-request-callback-handler)) (setq url-be-asynchronous nil)) (url-retrieve server-url t) (if (not url-be-asynchronous) (progn (let ... ... result)))) (t (if async-callback-function (url-retrieve server-url async-callback-function) (let (...) (save-current-buffer ... ... ...) (xml-rpc-request-process-buffer buffer))))))))
xml-rpc-request("
http://myname.wordpress.com/xmlrpc.php" ((methodCall nil (methodName nil "metaWeblog.getCategories") (params nil (param nil (value nil (string nil "1"))) (param nil (value nil (string nil "myname"))) (param nil (value nil (string nil "######")))))) nil)
(let* ((m-name (if (stringp method) method (symbol-name method))) (m-params (mapcar (function (lambda (p) (list (quote param) nil (car ...)))) (if async-callback-func params (car-safe params)))) (m-func-call (list (list (quote methodCall) nil (list (quote methodName) nil m-name) (append (quote (params nil)) m-params))))) (if (> xml-rpc-debug 1) (progn (print m-func-call (create-file-buffer "func-call")))) (xml-rpc-request server-url m-func-call async-callback-func))
(let ((response (xml-rpc-method-call-async nil server-url method params))) (cond ((stringp response) (list (cons nil (concat "URL/HTTP Error: " response)))) (t (xml-rpc-xml-to-response response))))
(mapcar (function (lambda (category) (cdr (assoc "categoryName" category)))) (metaweblog-get-categories org2blog/wp-server-xmlrpc-url org2blog/wp-server-userid org2blog/wp-server-pass org2blog/wp-server-blogid))
(setq org2blog/wp-blog (assoc org2blog/wp-blog-name org2blog/wp-blog-alist) org2blog/wp-server-xmlrpc-url (plist-get (cdr org2blog/wp-blog) :url) org2blog/wp-server-userid (eval (plist-get (cdr org2blog/wp-blog) :username)) org2blog/wp-server-blogid (or (plist-get (cdr org2blog/wp-blog) :id) "1") org2blog/wp-server-pass (or (eval (plist-get (cdr org2blog/wp-blog) :password)) (read-passwd (format "%s Weblog password? " org2blog/wp-blog-name))) org2blog/wp-categories-list (mapcar (function (lambda (category) (cdr (assoc "categoryName" category)))) (metaweblog-get-categories org2blog/wp-server-xmlrpc-url org2blog/wp-server-userid org2blog/wp-server-pass org2blog/wp-server-blogid)) org2blog/wp-tags-list (mapcar (function (lambda (tag) (cdr (assoc "slug" tag)))) (wp-get-tags org2blog/wp-server-xmlrpc-url org2blog/wp-server-userid org2blog/wp-server-pass org2blog/wp-server-blogid)) org2blog/wp-pages-list (mapcar (function (lambda (pg) (cons (cdr (assoc "page_title" pg)) (cdr (assoc "page_id" pg))))) (wp-get-pagelist org2blog/wp-server-xmlrpc-url org2blog/wp-server-userid org2blog/wp-server-pass org2blog/wp-server-blogid)))
(let nil (setq org2blog/wp-blog-name (or blog-name (and (equal (length org2blog/wp-blog-alist) 1) (car (car org2blog/wp-blog-alist))) (completing-read "Blog to login into? ([Tab] to see list): " (mapcar (quote car) org2blog/wp-blog-alist) nil t))) (if (> (length org2blog/wp-blog-name) 1) nil (error "Invalid blog name")) (setq org2blog/wp-blog (assoc org2blog/wp-blog-name org2blog/wp-blog-alist) org2blog/wp-server-xmlrpc-url (plist-get (cdr org2blog/wp-blog) :url) org2blog/wp-server-userid (eval (plist-get (cdr org2blog/wp-blog) :username)) org2blog/wp-server-blogid (or (plist-get (cdr org2blog/wp-blog) :id) "1") org2blog/wp-server-pass (or (eval (plist-get (cdr org2blog/wp-blog) :password)) (read-passwd (format "%s Weblog password? " org2blog/wp-blog-name))) org2blog/wp-categories-list (mapcar (function (lambda (category) (cdr (assoc "categoryName" category)))) (metaweblog-get-categories org2blog/wp-server-xmlrpc-url org2blog/wp-server-userid org2blog/wp-server-pass org2blog/wp-server-blogid)) org2blog/wp-tags-list (mapcar (function (lambda (tag) (cdr (assoc "slug" tag)))) (wp-get-tags org2blog/wp-server-xmlrpc-url org2blog/wp-server-userid org2blog/wp-server-pass org2blog/wp-server-blogid)) org2blog/wp-pages-list (mapcar (function (lambda (pg) (cons (cdr (assoc "page_title" pg)) (cdr (assoc "page_id" pg))))) (wp-get-pagelist org2blog/wp-server-xmlrpc-url org2blog/wp-server-userid org2blog/wp-server-pass org2blog/wp-server-blogid))) (setq org2blog/wp-logged-in t) (message "Logged in"))
org2blog/wp-login("wordpress")
(if org2blog/wp-logged-in nil (org2blog/wp-login blog-name))
(let ((blog-name (org2blog/wp-get-blog-name))) (if (and blog-name (not (equal blog-name org2blog/wp-blog-name))) (progn (org2blog/wp-logout))) (if org2blog/wp-logged-in nil (org2blog/wp-login blog-name)))
org2blog/wp-correctly-login()
org2blog/wp-post-buffer(t)
org2blog/wp-post-buffer-and-publish()
call-interactively(org2blog/wp-post-buffer-and-publish record nil)
command-execute(org2blog/wp-post-buffer-and-publish record)
execute-extended-command(nil "org2blog/wp-post-buffer-and-publish")
call-interactively(execute-extended-command nil nil)