abingham / traad

An JSON+HTTP server for the rope Python refactoring library
MIT License
107 stars 20 forks source link

Allow async-call handler to properly revert buffers #26

Closed abingham closed 10 years ago

abingham commented 12 years ago

The switch to asynchronous calls has broken the support for reverting buffers after changes have been made. It would be nice if a buffer could be associated with an async call, and that buffer reverted when the call finishes. I'm not certain, but I think that this will require a macro since the async handler (likely a lambda) will need some way to "remembering" the buffer to revert. Need to ponder this...

monsanto commented 12 years ago

Why would this require a macro? Just create a closure, using lexical bindings (either with Emacs 24 or with cl).

abingham commented 12 years ago

"Require" in this case is a code word for "I don't know much about emacs lisp" :) You're right that a closure should do the trick, but that's probably something I learned after I wrote this ticket.

abingham commented 11 years ago

It appears that the emacs xmlrpc library does not provide return values for asynchronous calls. I was hoping to return lists of modified resources for refactorings and then use these to refresh buffers, but I guess I'll need to just find some heuristic (at least for the elisp client.)