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

if try to exit editing buffer with Ctrl+X Ctrl+S, will invoke edit frame again. #131

Closed zw963 closed 4 years ago

zw963 commented 6 years ago

Relation to https://github.com/stsquad/emacs_chrome/pull/130#issuecomment-347216549

Thanks

zw963 commented 6 years ago

Hi, I tried C-c C-c, it worked as i expected, maybe this just a misusage.

becuase I have a hook (maximize new frame) in after-make-frame-function, so that maybe weird when press C-x C-s, frame is poped and maximize.

zw963 commented 5 years ago

I rebind C-x C-s to `edit-server-down', so it worked now.

Thanks

zw963 commented 5 years ago

Hi, i try to fallback restore to default keybinding, i found this issue still exist.

so, i think there still exist some issue about C-x C-s, i am wonder why when i save current buffer, edit-server.el need relaunch my buffer frame.

Previous i think this maybe issue about maximum frame function, but when i comment maximum frame code, this issue still exist.

Following is recorder gif:

121.gif

dakra commented 5 years ago

I think C-x C-s is supposed to open the frame/window again as it's usually just a 'save' and not save+close. C-c C-c should do what you want.

stsquad commented 5 years ago

Yeah - it's a save (i.e. update the textarea) and keep editing. But given the way the edit server works it needs to start a new edit session.

zw963 commented 5 years ago

@stsquad , i have a question, why we need update the textarea frequently when we save emacs buffer?

in my point of view, i think, only need save after press C-x C-c .

pjones commented 5 years ago

This behavior causes a complete hang when using EXWM.

I'm not exactly sure what's going on but if edit-server.el makes any synchronous calls that trigger a GUI then EXWM can't map the window any everything hangs.

Since C-c C-c works, I think I'm going to remap C-x C-s to save the buffer or a noop since it hangs my Xorg session. But untangling the mess of edit-server-done would be nice.