A re-implementation of the fantastic idea in zachcurry/emacs-anywhere.
(use-package emacs-everywhere :straight (:host github :repo "tecosaur/emacs-everywhere"))
(Soon to be) present as the
:app everywhere module.
On Linux, ensure you have the following dependencies:
Invoke the Emacs Everywhere executable†. I recommend doing this by binding a shortcut to:
emacsclient --eval "(emacs-everywhere)"
A new Emacs frame will appear, within which you can type away to your heart’s content. It will remember which window you have focused.
emacs-everywhere-insert-selection is a hook in
emacs-everywhere-init-hooks, and will insert the last text selection into your new buffer. To clear this, type
C-SPC before anything else.
Once you’ve finished and want to insert the text into the window you triggered Emacs Everywhere from, just press
C-c C-c or
C-x 5 0 to close the frame and paste the content into the window (as long as
emacs-everywhere-paste-p is non-nil).
If you do not wish to paste the buffer content into the original window,
C-c C-k still copies the content to the clipboard, but never pastes.
† This requires the Emacs daemon to be running, but that’s super easy. Just call
emacs --daemon and you’re sorted!