fregante / GhostText

👻 Use your text editor to write in your browser. Everything you type in the editor will be instantly updated in the browser (and vice versa).
https://GhostText.fregante.com
MIT License
3.25k stars 116 forks source link

CodeMirror 6 / jupyter notebook 7 issues #295

Closed flamingbear closed 8 months ago

flamingbear commented 8 months ago

edit: I wrote all of this, but just discovered is a codeMirror 6 issue. I can recreate on your test page with code mirror 6. So possibly an emacs client bug? The issue I had installing GhostText with sublime is that the download link on https://packagecontrol.io/packages/GhostText just points back to itself. If you could test on CodeMirror6 or give me instructions on how to get the plugin for sublime. I can test myself.

Thanks Matt


Setup

Browser: Chrome Editor: Emacs (I tried to install sublime + GhostText but couldn't download the GhostText plugin) Target: edit ~Jupyter Notebook 7 cells~ This is a codeMirror 6 issue. I can recreate on your test page with code mirror 6. So possibly an emacs client bug?

Description

Editing with GhostText on jupyter notebook 7 cells works only the first time.

I've been using GhostText with Emacs and Jupyter Notebook 6 for a while. Thank you! It is amazing.

Jupyter has updated the way they are doing things in their latest version. What I see when I try to use GhostText is the first time I edit a cell, the contents are correctly shuttled to my editor, when I type I can see the contents changing in both the editor and the browser cell. After I disconnect, the cell contents match what was in the editor.

This is the only time that particular cell will work with GhostText (without reloading the browser). On each activation of the browser text area after, the editor only gets sent the content that was in the cell when it disconnected the first time. I have looked at the console and the background page. The "got message from script" shows the same json object each time, whether I have updated the cell in the browser or the editor. No changes from the editor are ever returned to the browser. Likewise the console message "sending X characters" doesn't change, even though I have edited the text area.

I understand that this points to a jupyter issue. Since my GhostText works for everything else, including writing this bug. But I would love help on how I might determine what is going on so that I can continue to use this tool.

I am happy to provide further help, but will wait until I hear that someone can look at this.

Thanks Matt

fregante commented 8 months ago

Thank you for the report. I opened a new issue with a simpler repro:

flamingbear commented 8 months ago

Thanks, I had to leave before I could clean up this report. Appreciate you opening a new one.