I've been hacking on some interesting changes recently. Two notable things:
1) I added Clojure code to get the contents of the wave from the REPL.
I have not yet supported this on the elisp side, though.
2) I've started a new named branch "direct-connect" that abandons the
Clojure REPL with FedOne backend architecture in favor of integrating
directly against the actual JSON Api the wave.google.com uses. Not a
great solution for the long run, but it's actually easier to work with
than the multiple processes and inter-process communication
necessitated by using FedOne. Right now this branch can display your
waves from wave.google.com (main instance only, not sandbox). Having
this data is useful. For example, I can see that just the Wave UI
list needs a lot of work to properly and nicely display.
The new branch's code is often dependent on the numbered JSON fields
which must be the result of a protocol buffer to JSON translation.
It's a bit arbitrary looking in the code, but typically protocol
buffers will not switch field numbers around, so it is actually not as
brittle as it first looks.
Although I intended to keep the UI code the same between different
branches with different backends, I decided to make one change
already, replacing "participants" of a wave, with the single "author"
of a Wave, which I think is more useful information. And it turns out
get can't easily get the complete list of participants from the JSON
API, only the participants on the first wavelet. I intend to backport
that change over to the main FedOne branch.
As usual, if anyone has spare cycles, please let me know if you can
take on some elisp work. Hopefully that work is significantly easier
with the new direct-connect branch.
I checked out the source, added to my path and required it.
I see the `wave-list-mode' but I just get a message that the wave
client is not running. I've set my username and password in customize.
I guessed at the domain. I wasn't sure if I should put my googlewave
id or the email it's linked to, but I don't think I'm even getting
that far.
Debugger entered--Lisp error: (error "Wave client not running")
signal(error ("Wave client not running"))
error("Wave client not running")
(if (and wave-client-auth-cookie wave-client-session) nil (error
"Wave client not running"))
(unless (and wave-client-auth-cookie wave-client-session) (error
"Wave client not running"))
wave-client-assert-connected()
wave-list-mode()
call-interactively(wave-list-mode t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
am I supposed to start the wave client manually, or does this do it?
I'm running M-x wave-list-mode
Ubuntu 9.10, emacs 23
Debugger entered--Lisp error: (void-function string-replace-match)
(string-replace-match "'" text "\"" nil t)
(or (string-replace-match "'" text "\"" nil t) text)
(let ((double-quoted-text ...)) (or (string-replace-match
"\\([{,]\\)\\([[:word:]_]+\\):" double-quoted-text "\\1\"\\2\":" nil
t) double-quoted-text))
(json-read-from-string (let (...) (or ... double-quoted-text)))
(let ((json-object-type ...) (json-key-type nil))
(json-read-from-string (let ... ...)))
wave-client-json-read("{startupData:{gadget_cache:false},userProfile:{id:'518382405360196202819',username:'duck1...@googlewave.com'},sessionData:{contact_path:'/wave/c',csi_base_url:'https://gg.google.com/csi',static_path:'/wave/static',servlet_path:'/wave',sessionid:'GgCpbsiH'},uploadForm:{attachment_url:'https://wave.googleusercontent.com/wave',upload_uri:'https://wave1.google.com/wave',upload_worker:'https://wave1.google.com/wave/static/script/upload.js'},loginData:{}}")
(setq wave-client-session (wave-client-json-read (match-string 1)))
(save-excursion (set-buffer (wave-client-curl
"https://wave.google.com/wave/" ... ...)) (goto-char (point-min))
(search-forward-regexp "__session = \\({.*}\\);var") (setq
wave-client-session (wave-client-json-read ...))
(search-forward-regexp "json = \\({\"r\":\"^d1\".*}\\);")
(wave-client-json-read (match-string 1)))
(let ((auth-cookie ...)) (save-excursion (set-buffer ...) (goto-char
...) (search-forward-regexp "__session = \\({.*}\\);var") (setq
wave-client-session ...) (search-forward-regexp "json =
\\({\"r\":\"^d1\".*}\\);") (wave-client-json-read ...)))
wave-client-get-waves()
(wave-client-extract-waves (wave-client-get-waves))
wave-inbox()
(wave-list-render-wave-list (wave-inbox))
wave-list-mode()
call-interactively(wave-list-mode t nil)
execute-extended-command(nil)
call-interactively(execute-extended-command nil nil)
It appears that function might be coming from XEmacs. Is that what you
are using, or something else? I'm on GNU Emacs 23 (emacs-snapshot on
Karmic)
If you get any other issues, one of thing that may be happening is
that your HTML may look slightly different than mine, for whatever
reasons, and some regexes are thus not matching. But let me know.