atomic-chrome
atomic-chrome copied to clipboard
Lost buffer and browser text field contents after `C-c C-c`
This is what I see in the browser console:
Got message: Objectaction: "select-field"tabId: 7126__proto__: Object
content.js:150 GhostText: selectField()
content.js:82 GhostText: There are multiple textarea elements on this page.
Click on the one you want to use.
content.js:154 GhostText: detector.focusEvent()
content.js:206 GhostText: reportFieldData()
content.js:39 Got message: Objectaction: "enable-field"tabId: 7126__proto__: Object
content.js:176 GhostText: enableField()
content.js:82 GhostText: Connected! You can switch to your editor
content.js:206 GhostText: reportFieldData()
1000Error in event handler: TypeError: Cannot read property 'length' of undefined
at Function.fromPlainJS (<URL>)
at <URL>
content.js:39 Got message: Objectaction: "disable-field"tabId: 7126__proto__: Object
content.js:132 GhostText: disableField()
content.js:82 GhostText: Disconnected!
<a href="https://github.com/GhostText/GhostText/issues?state=open" target="_blank">Report issues</a> | <a href="https://chrome.google.com/webstore/detail/sublimetextarea/godiecgffnchndlihlpaajjcplehddca/reviews" target="_blank">Leave review</a>
Screenshot:

Does it make sense that, no matter what, atomic-chrome shouldn't kill buffers? At most it should bury them? And additionally, maybe it makes sense to persist buffers in files?
| atomic-chrome | 20180617.724 (2.0.0) |
| Emacs | 26.3 |
| Chrome | 78.0.3904.87 |
I added the following to my Emacs configuration:
(use-package atomic-chrome
:config
(setq atomic-chrome-url-major-mode-alist
'(("github\\.com" . gfm-mode)))
(atomic-chrome-start-server)
(defun mpereira/prevent-buffer-kill ()
(interactive)
(emacs-lock-mode 'kill))
(add-hook 'atomic-chrome-edit-mode-hook #'mpereira/prevent-buffer-kill))
mpereira/prevent-buffer-kill causes the buffer to not be killed on C-c C-c, requiring me to click the GhostText button to disconnect instead. For me, this inconvenience is worth not risking losing buffers.
In my environment, text field don't lost contents by C-c C-c .
| atomic-chrome | 20180617.724 |
| Emacs | 26.3 |
| Chrome | 79.0 |
| GhostText | 17.12.11.910 |