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.

Home Page:https://chrome.google.com/extensions/detail/ljobjlafonikaiipfkggjbhkghgicgoh

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use edit-server when using command+tab

parhamdoustdar opened this issue · comments

Hi,

I'm using the latest MacOS and Emacs 29.0.50. Here is how I try to use edit-server:

  1. I have edit-server-new-frame set to nil. I use Emacspeak, so a buffer would be a lot easier for me to use than a new frame.
  2. I do C-u -x edit-server-start.
  3. Then, I go to a text box, and I press Command+e. I'm blind, so I don't see what happens on the screen, but when I use COmmand+tab to go to the Emacs window and edit the buffer, this is what the *Messages* buffer says:
accept from 127.0.0.1

Got HTTP ‘POST’ request of url ‘/foreground’, processing in buffer ‘ *edit-server*-948322’...
Processed headers, length: 11, url: nil, file: nil
sending edit-server response
Editing done, sent HTTP OK response.

It seems like when I press Command+tab, since I leave the text box, edit-server sends the response. So, I feel like I'm supposed to use this package in a form I don't quite understand.

Could you give me any pointers?

Thanks!

Ahh I think we have a documentation or UI errror. That is because Command+e issues a foreground command which was added to bring Emacs to the foreground with the contents of the clipboard. The command that activates the editing is Alt+e by default.

I've just realised the keyboard shortcut isn't enabled by default - it in the extension configuration tab under settings/configuration/interface and the check boxes for the enabling the various methods to invoke the editor. The default method is to click the edit button that floats near each text box which I'm guessing isn't super accessible for visually impaired users.

If you have any suggestions for how to improve accessibility please let me know and I'll do my best to improve it.

Ah, I think I was not using Chrome's interface for setting the keystroke to activate the extension correctly. Now that I tried again, pressing the key that I assigned to "Activate extension" makes it all work.

Awesome! This extension is going to help me a lot with VoiceOver's shortcomings in Chrome! You made me life so much easier 😍

Hmm interesting. I've just posted a test branch which cleaned this up a bit but as you point out the default active-extension seems to DTRT which is slightly confusing to me as I'm not sure the path it takes. I'm going to keep this open until it's all cleared up. Do keyboard shortcuts get surfaced to you by chrome itself or could we improve the documentation somewhere?

I think the least confusing way is ticking the box that says to open Emacs after pressing Alt+enter (I think making it say Option+enter when the platform is MacOS might be useful BTW).

The only reason I added a keystroke to activate the extension is that some text boxes use Option+enter for a functionality of their own, like creating a newline or newline with indent, or something like that. However, I'm just using Option+enter everywhere now and it hasn't caused an issue yet.