parasurv@webspace ~ $

Blog: Site updates Linux Free Software Culture Health Watches collection Learning: Emacs Journal Linux Wiki Personal: Contact About me

Shorts: Microblog Linkblog Important: Read Watch Listen Other pages: Old games stuff

Edit browser textfarea with Emacs

Created: 2022-02-10

Updated: 2022-02-11 - added the solution for xmonad shifting and floating.

As with all things computer related tasks, Emacs people want to do everything in Emacs. Here is a solution how to do edit textfields in Emacs.

I will be the first to say that I don't know how this all work, but it does, and that's enough for me at the moment.

First: Install browser extension

Download the browser extensions:

After installing it, you don't have to do anything, other than maybe check some of the options there.

Second: Setup Emacs

We need to install a package, called edit-server. If you are using MELPA, you can install it from there.

(require 'edit-server)

Test it in your browser

I tested this with my current favorite social site, misskey. And it works nicely. In the browser you just click on the purple edit button, and it opens up a new Emacs window. You type the text you want, then press C-x C-#, and it closes it, and put the text in the textfield. Pretty simple, and amazing stuff.

Xmonad and the edit-server buffer window

Since I use Emacs on a specific workspace (I send every Emacs window to that workspace by default), at first I had problems, because it didn't go to the first workspace where I use my web browser. But I found a solution for that. As usual, "xprop" command is for the rescue.

Add this to your ManageHook section, where you have your doShift and doFloat stuff:

, title =? "Edit with Emacs FRAME" --> doShift ( myWorkspaces !! 0 )

Note, that here the number at the end is 0, but it's your first workspace.

If you want to buffer window floated, add this to the same section:

, title =? "Edit with Emacs FRAME"  --> doFloat

Hosted on Neocities and created with Emacs, the world best text editor, operating system. This website doesn't track you. I don't use any javascript or other scripts. I don't store any information about the visitors. It's just pure old fashioned HTML. Some parts of the site is not up-to-date design wise. I may or may not update them in the future. I don't really support mobile stuff, but I bet if you disable the little CSS I have, you can read the site perfectly.