README 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. Servers
  2. =======
  3. Because the Chrome(ium) security model doesn't allow for extensions
  4. spawning processes we can't just exec() the editor process. Instead we
  5. have to implement an "edit server" which listens to XmlHttp requests
  6. on port 9292 (default) and then sends a response when the edit is
  7. complete. We include a couple here:
  8. * pycl.py - Original version, only edit one file at a time
  9. * edit_server.el - An native Emacs Lisp implementation
  10. There is another project called TextAid which does a similar thing to
  11. Edit with Emacs. It's edit server is implemented in perl and be found
  12. at:
  13. * http://opencoder.net/edit-server
  14. As the edit server concept is fairly simple we will try and keep them
  15. compatible with each other.
  16. How it works
  17. ============
  18. The browser sends a request to the edit server of the form:
  19. http://${HOSTNAME}:${HOSTPORT}/${CMD}/${ID}&url=${URL}
  20. HOSTNAME is usually localhost, i.e. 127.0.0.1
  21. HOSTPORT is the server port, in our case defaults to 9292
  22. CMD is the command to the edit server, currently only "edit" is used
  23. ID is the id of the text area that is being edited (e.g. "eta_1")
  24. URL is the (optional) URL of the page the text area is on
  25. After the headers the data is the current contents of the text area
  26. Once the edit is complete the server sends an HTTP 200 (OK) response
  27. with the data containing the new text area text. Any other response
  28. will result in the text area not being updated.
  29. The optional URL allows the edit server to create more identifiable
  30. names for the buffers/temp files to help the user keep track. We may
  31. expand the information passed in future as additional HTTP GET style
  32. parameters.
  33. Customizing the look of Emacs
  34. ============
  35. By default, Emacs opens up a new frame upon an edit request. All the
  36. UI elements are removed to better mimic a bare text box. You can
  37. customize the default behavior by `M-x customize-group [RET]
  38. edit-server [RET]`. Or you can set the variables' values directly in
  39. your ~/.emacs.