A pull request to fix up focusing of the new frame on MacOS lead me to re-factor this code so all the frame raising logic is common for the new-frame and re-use frame options. Also: * Clean up tabs * Clean up doc string
In edit-server-accept, set-buffer-multibyte is called, but it's applied to whatever buffer was previously active because the call is not wrapped with `with-current-buffer`. This makes edit-server fail if that previously active buffer is an indirect buffer (set-buffer-multibyte is illegal in an indirect buffer). Rather than add with-current-buffer, though, just remove the call altogether. It is not necessary for the process buffer to be multibyte.
…rame we create as a result of a foreground request.
This is mainly for the benefit of Chromebooks who have a chroot'ed emacs that can run on the main display window. When enabled the /foreground command will make emacs pop up in the front of the display without an edit buffer when there is no text area in focus and the button is clicked.
…rompt on exit Also disable the same advice on server stop, to avoid advice redefinition warnings on server restart. #67
I think this is a bug in Emacs but copy-to-buffer doesn't seem to work on re-used buffers. So I'll copy the returned text into the kill-ring for now.
* match the whole URL (sans trailing RET) * rename the get buffer function There are still a few warts to fix for save-progress to work properly. Namely at the moment after each C-x C-s this will cause additional re-sends of the data back. It still works, it's just ugly.
This should mean we re-use the existing buffer. It's not working for me at the moment and I'm not sure why.
This is part one of incremental save support. When we run C-x C-s (edit-server-save) we add headers to the response. The browser interprets those as an in-progress save and sends a fresh edit request back. At the moment this will create a brand new buffer. However once the edit-server is aware of the x-file parameter we should be able to just bring back the buffer we were editing.
…st plain bugs
Variable `edit-server-client' is not used as buffer local variable; move it's definition and don't set the `permanent-local' property.