emacs+w3m awesomeness

in #emacs4 years ago

Making w3m inside emacs just a bit better.

I have for several days had some notion that I wanted to make w3m
inside emacs do one particular thing, I have this setup where I am
running a raspberry pi as a torrent node. It consumes very little
electricity and is therefore ideal. But I do not like that I have to
connect to the node to add a new torrent, I wanted to make it possible
to add a new torrent from a external machine, say from inside emacs on
my main machine. I first made it possible in w3m outside emacs, with
that done Time to make emacs do it. the command for doing it in a
plain w3m mode is.

shell.png

extbrowser is just w3m's way of running external commands, sh -c
runs everythin after it in the shell.

This was really great, but it still left me a bit unsatisfied, why can
it not work inside emacs? So then I spend several hours trying to
read about this, but surprisingly nobody else has this problem, so I
had to begin to hack something together myself. So I did just that,
turns out it was a bit easier than I thought

elisp.png

turns out that this is all the code that is needed to do this. In
fact I still do not know why there needs to be two arguments to
run-ssh but if there is only one something breaks.

You do neet to replace $USER with the login for the machine and $HOST
with the IP for the machine.

Coin Marketplace

STEEM 0.28
TRX 0.13
JST 0.032
BTC 60793.50
ETH 2910.51
USDT 1.00
SBD 3.59