stsquad / emacs_chrome

A Chromium/Firefox "clone" of It's All Text for spawning an editor to edit text areas in browsers. Based on David Hilley's original Chromium extension.
https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh
GNU General Public License v3.0
512 stars 91 forks source link

C-x C-s breaks connection to Chrome #70

Open feklee opened 12 years ago

feklee commented 12 years ago

When I press C-x C-s in the editing buffer, then the buffer's contents get sent to Chrome. Great! Afterwards, however, C-x C-s does not work again, and furthermore C-x # doesn't work either.

So, I usually have to 1. manually copy the buffer's contents to Chrome, and 2. manually kill the editing buffer.

This applies to the latest GIT version in conjunction with GNU Emacs 24.2.1 (i386-mingw-nt5.1.2600) of 2012-08-29 on MARVIN.

stsquad commented 12 years ago

Interesting. I'm not seeing the same behaviour although I'll agree the disappearing and re-appearing frame is sub-optimal. Can you run C-h m in the second frame and check it's still got the Edit-Server-Edit minor mode running?

feklee commented 12 years ago

Can you run C-h m in the second frame and check it's still got the Edit-Server-Edit minor mode running?

  • Before hitting C-x C-s:

Enabled minor modes: Auto-Composition Auto-Encryption Column-Number Cua Edit-Server-Edit File-Name-Shadow Font-Lock Global-Edit-Server-Edit Global-Font-Lock Global-Subword Line-Number Menu-Bar Mouse-Wheel Show-Paren Speck Subword Tooltip Transient-Mark

C-x C-s: (edit-server-save) C-x #: (edit-server-done &optional ABORT NOKILL)

So, sorry, no clue.

stsquad commented 11 years ago

Sorry about the delay getting back to you. It all looks as though it should be working then. Next thing to try:

M-x edit-server-stop C-u M-x edit-server-start

And please paste the log after the second failure.

feklee commented 11 years ago

It all looks as though it should be working then.

The problem happens every time. I press C-x C-s, and then the buffer contents get synced back to Chrome. If I then press C-x C-s again, or if I press C-x #, then nothing happens.

Next thing to try:

M-x edit-server-stop C-u M-x edit-server-start

Did that.

And please paste the log after the second failure.

Log after Alt-Enter in Chrome:

Fri Nov 02 22:05:18 2012 Created a new edit-server process
Fri Nov 02 22:05:23 2012  *edit-server*<5>: accept from 127.0.0.1
Fri Nov 02 22:05:23 2012  *edit-server*<5>: Got HTTP `POST' request, processing in buffer ` *edit-server*<5>'...
Fri Nov 02 22:05:23 2012  *edit-server*<5>: Found x-file: undefined
Fri Nov 02 22:05:23 2012  *edit-server*<5>: Processed headers, length: 774, url: github.com/stsquad/emacs_chrome/issues/70, file: undefined

New log entries after the first C-x C-s in Emacs:

Fri Nov 02 22:05:47 2012  *edit-server*<5>: sending edit-server response
Fri Nov 02 22:05:47 2012  *edit-server*<5>: Editing done, sent HTTP OK response.
Fri Nov 02 22:05:48 2012  *edit-server*<5>: accept from 127.0.0.1
Fri Nov 02 22:05:48 2012  *edit-server*<5>: Got HTTP `POST' request, processing in buffer ` *edit-server*<5>'...
Fri Nov 02 22:05:48 2012  *edit-server*<5>: Found x-file: github.com/stsquad/emacs_chrome/issues/70
Fri Nov 02 22:05:48 2012  *edit-server*<5>: Processed headers, length: 1279, url: github.com/stsquad/emacs_chrome/issues/70, file: github.com/stsquad/emacs_chrome/issues/70
Fri Nov 02 22:05:48 2012  *edit-server*<5>: Received 1243 bytes of 1279 ...

Subsequent presses of C-x C-s in Emacs have no effect, and there are no new entries in the log. To be on the save side, I also tried M-x edit-server-save and M-x edit-server-done. Again: no effect, and no new log entries.

The edit server continues running, though. After Alt-Enter in Chrome, I get a new buffer, and there are new entries in the log:

Fri Nov 02 22:10:58 2012  *edit-server*<7>: accept from 127.0.0.1
Fri Nov 02 22:10:58 2012  *edit-server*<7>: Got HTTP `POST' request, processing in buffer ` *edit-server*<7>'...
Fri Nov 02 22:10:58 2012  *edit-server*<7>: Found x-file: undefined
Fri Nov 02 22:10:58 2012  *edit-server*<7>: Processed headers, length: 98, url: mail.google.com/mail/u/0/, file: undefined