emacs-anywhere icon indicating copy to clipboard operation
emacs-anywhere copied to clipboard

update the content with a keystroke without deleting the frame

Open gambhiro opened this issue 6 years ago • 1 comments

Hello!

I would like to recommend a keystroke to update the content of the original window while still editing.

This is useful where the interaction with the text is much longer -- i.e. when one doesn't just jump into the editor and out.

But even here when writing this issue text. I'd like to:

  • open it in emacs, change to Markdown mode
  • type some text
  • call some function to update the issue text
  • check the Markdown preview, then back to writing mode
  • continue editing in emacs
  • ...
  • close the frame, done

In particular I was thinking of this when using Shadertoy. There, the text input is in a Codemirror enabled area.

gambhiro avatar May 09 '18 13:05 gambhiro

Hi, @gambhiro 👋

I appreciate you taking the time to share this!

The current implementation of Emacs Anywhere depends on tools that are capable of managing windows and sending keystroke events. In theory, it is possible to write a solution for your scenario and hook it as described in the README; However, it would be quite ugly to do this with the current version of Emacs Anywhere!

A good solution to this problem might be to expose a few more automation primitives through Emacs Anywhere for things like window focus, navigating input focus, sending regions of buffers to the window, etc. With the primitives in place, a proper package could use these automation primitives to extend Emacs Anywhere to be smart and dynamic in various contexts. All the user would need to do is use the package!

What do you think?

zachcurry avatar May 09 '18 20:05 zachcurry