Skip to content

Instantly share code, notes, and snippets.

@hlissner
Created August 31, 2026 15:27
Show Gist options
  • Select an option

  • Save hlissner/604f692ee421fb54fd0362f4e3963bae to your computer and use it in GitHub Desktop.

Select an option

Save hlissner/604f692ee421fb54fd0362f4e3963bae to your computer and use it in GitHub Desktop.
Doom Emacs: edit anything in Emacs

< back to index

Important

This gist is temporary until the new documentation (docs.doomemacs.org) and community wiki (wiki.doomemacs.org) have been published.

Warning

This page was copied verbatim from Doom's former Discourse and hasn't been updated or reformatted. It may be outdated and formatting may be broken.

Edit anything in Emacs

It's every Emacs user's dream: to use Emacs for writing any text anywhere, especially in places where you normally couldn't, like text fields in your browser, the Discord chat box, or the Discourse editor---just about anywhere you can think of. Now, it is possible. Here are your options:

Works on Linux and macOS.

This is an Emacs package which adds the autoloaded emacs-everywhere function, which can be called via emacsclient to spawn an Emacs frame to edit text in.

(This is included in Doom's :app everywhere module)

Dependencies

  • Linux
    • xclip
    • xdotool
    • xwininfo
    • xprop
  • macOS
    • None!

Install

Simply enable Doom's :app everywhere module and bind a system keyboard shortcut to the following shell command:

emacsclient --eval "(emacs-everywhere)"

Done.

[notice] :pushpin: A daemon isn't strictly needed (as Doom will start a server when starting Emacs), but you are free to set it up. [/notice]

Configuration

  • When pandoc is installed, org-mode will be used by default. If you want to use org-mode to edit markdown without installing pandoc, you can set the initial major-mode with:

    (setq emacs-everywhere-major-mode-function #'org-mode)
  • Some users may try to set up rules for the emacs-everywhere window using their window manager (e.g. bspwm), but are unable to target it because of the complex title of the frame. You can change this with:

    (setq emacs-everywhere-frame-name-format "emacs-everywhere")

In your browser

Works on any platform.

  1. Install the alpha22jp/atomic-chrome package with the following in your config:

    ;;; add to $DOOMDIR/packages.el
    (package! atomic-chrome)
    
    ;;; add to $DOOMDIR/config.el
    (atomic-chrome-start-server)

    If you want to be especially mindful of startup time, you can defer starting the server until the first time you un-focus Emacs (presumably to focus your browser):

    -(atomic-chrome-start-server)
    +(add-transient-hook! 'focus-out-hook (atomic-chrome-start-server))
  2. Run $ doom sync and restart Emacs.

  3. Install one of the supported browser extensions:

And you're done! Click an the extension's icon in your browser toolbar to edit the focused text area in Emacs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment