Open Firefox URL in eww


A small step for man,
even smaller for mankind.

[2021-01-26 Tue] {eww firefox microoptimization}

This article shows a convenient way to open the current url of firefox in the Emacs Web Wouser aka eww.


By Foot

You don't need this shortcut. You can do the steps by foot.

  • copy the URL in firefox C-l C-c
  • switch to Emacs
  • M-x eww C-y RET

And eww trys to open the URL.

Take a Shortcut

With the preparation below you get the following.

  • In firefox type C-l e.

And eww trys to open the URL.

This flow saves some work. The e above activates a suitable bookmarklet. Find the bookmarklet below.


The functionality is based on org-protocol.

  • Make sure org-protocol is active. See the documentation about org-protocol for more.

Preparation   code

Preparation on the Emacs Side

Activate the following code. E.g. place the code in an Emacs config file.

(add-to-list 'org-protocol-protocol-alist
               :protocol "eww"
               :function mw-start-eww-for-url))

The above code defines subprotocol eww.

The function for interpreting the data is

(defun mw-start-eww-for-url (plist)
  "Raise Emacs and call eww with the url in PLIST."
  (eww (plist-get plist :url))

Preparation on the Firefox Side

Create a bookmarklet which refers the subprotocol eww defined above in the code section.

  • Example bookmarklet used by the author.
    • Name : eww
    • Location : javascript:location.href='org-protocol://eww?url='+encodeURIComponent(location.href)
    • Tags : eww
    • Keyword : e


Please use the features of gitlab for comments etc. See e.g. .

Share under CC BY-SA 4.0.


Author: Marco Wahl (


Emacs 28.0.50 (Org mode 9.4.4)