• OT Edit with Emacs: Text not written back to text filed

    From Loris Bennett@21:1/5 to All on Thu Apr 3 11:41:57 2025
    Hi,

    I am using the Firefox extension 'Edit with Emacs' to enter text into
    text fields on web pages. This generally works well.

    However, with one web-based ticket system I am obliged to use, the Emacs
    client window opens OK and I can enter text, but when I then close the
    client window, the changed text does not appear in the text field.

    One difference between this text field and others where the extension
    works, is that the field seems to convert text into HTML on the fly. I
    type

    X

    into the text field and then click on the 'Edit with Emacs' button, an
    Emacs frame containing

    <p>X</p>

    opens. If I edit that to

    <p>XYZ</p>

    and close the frame, I still get just

    X

    in the text field.

    Does anyone have any idea how I could debug and/or solve this issue?

    Cheers,

    Loris

    --
    This signature is currently under constuction.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Ethan Carter@21:1/5 to Loris Bennett on Thu Apr 3 18:51:02 2025
    "Loris Bennett" <loris.bennett@fu-berlin.de> writes:

    Hi,

    I am using the Firefox extension 'Edit with Emacs' to enter text into
    text fields on web pages. This generally works well.

    However, with one web-based ticket system I am obliged to use, the Emacs client window opens OK and I can enter text, but when I then close the
    client window, the changed text does not appear in the text field.

    One difference between this text field and others where the extension
    works, is that the field seems to convert text into HTML on the fly. I
    type

    X

    into the text field and then click on the 'Edit with Emacs' button, an
    Emacs frame containing

    <p>X</p>

    opens.

    This behavior is likely solely caused by the web application itself.

    If I edit that to

    <p>XYZ</p>

    and close the frame, I still get just

    X

    in the text field.

    This is likely due to the fact that when you close the client window,
    nothing happens on the text field. That is, your XYZ didn't overwrite
    the previous X you wrote there.

    Does anyone have any idea how I could debug and/or solve this issue?

    I think your greatest problem is why isn't the text field updating.
    Ideally you'd be able to put the blame correctly---is it EMACS or is it
    the web application?

    I never used the extension, but it seems that it takes the text typed in
    the text field and sends it to the edit server on EMACS that's listening
    on port 9292. When you close the client window, the edit server is
    likely sending the buffer text back on the same TCP connection.

    If EMACS is sending the text back to the extension on the browser, then
    there's no EMACS fault at all here. Debugging this can always be done
    by editing the Lisp code on EMACS. You can read the source code, and
    add some (message ...) calls there to see on your *Messages* buffer
    what's being sent to the extension (via the TCP connection).

    Perhaps a better idea would be to put a program between the edit server
    on EMACS and the extension that would log all the traffic. I don't know
    if an SSH tunnel would be able to do it all by itself.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)