Readit News logoReadit News
Rediscover · 4 years ago
Emacs-w3m is tied with lynx as my favorite browser (with telnet and wget both in second place).

Using emacspeak with it allows me to keep my eyes on the lab table (in case something goes exothermic too quickly) while still having the ability to pull up references. Same about reading [hearing] HN while in sketchy areas.

The other post about invoking w3m from lynx is worth investigating if You are not familiar with such. Look for "EXTERNAL" in your .lynxrc. I especially like having it "git clone" the page or link I'm on. Reality is that I heavily abuse the EXTERNAL stuff.

I've been noodling about the implementation of adding functionality to w3m and lynx so there is a separate fetch-page func but report a different User-Agent header (eg, "Mozilla"). I've encountered many pages that don't allow access until I change the "lynx-*" header (bastards).

Semi-OT: I'm addicted to lynx's multi-bookmarks feature (26 different bookmark files for easing the organization of your links), and about 15 years ago I wrote some elisp so emacs-w3m has the same functionality (and same bookmarks files).

shiomiru · 4 years ago
> I've been noodling about the implementation of adding functionality to w3m and lynx so there is a separate fetch-page func but report a different User-Agent header (eg, "Mozilla"). I've encountered many pages that don't allow access until I change the "lynx-*" header (bastards).

Wouldn't this feature suffice? https://github.com/tats/w3m/blob/master/doc/README.siteconf

Rediscover · 4 years ago
Fantastic!!

Thank You for directing that to me! And that repo (I've been using the .jp one).

I'm an idiot - I don't know how I missed that.

every · 4 years ago
I have the ability to pop into w3m from lynx[0] to view tables when necessary. I also have the option to call the x-www-browser script from lynx for the full graphical/js/css treatment, such as posting this comment from my account. But most of the time, lynx is more than adequate for my modest needs...

[0] https://lynx.invisible-island.net/

rkta · 4 years ago
I don't know if using your own keymap in a howto is a great idea... I'd stick with the defaults or just name the commands.

And yes, w3m rocks.

marttt · 4 years ago
Something like Plan 9's Mothra browser for the Unix console would be great. Support for images, mousing, a small command language and good shell integration.

I like and use w3m a lot (I found the link and posted it here :), but maybe it already has a little too many settings to mess with. Then again, the lynx browser has more than 100, so YMMV.

In this light, Mothra is refreshingly simple: http://man.cat-v.org/plan_9_2nd_ed/1/mothra

rkta · 4 years ago
It has a little too many settings/features for my taste. Unfortunately removing things doesn't attract user - adding things does.

I never used mothra, but heard a lot of good things about the plan 9 tools. They got the advantage, that they could start afresh. I'm curious how much work it would be to port it to a *nix system.

tjoff · 4 years ago
I thoroughly agree, although... I think one of the main reasons for why I'm not using w3m more is because the keybindings feel so alien to me.

Might try his to give w3m another shot.

rkta · 4 years ago
Yes, the defaults are a bit strange. Might be a little late to change them now.

IMHO, the most important thing to improve the user experience is to enable link numbers. With link numbers enabled you can[0] jump to a link by typing the number and then LINK_BEGIN (default '[').

[0]: Technically you can do this without enabling link numbers, but you need count the links yourself.

account-5 · 4 years ago
How does this do with sites that won't render without JavaScript? I browse with noscript and everything block by default. I'm constantly having to turn on JavaScript for sites that are blank until you do.
daneel_w · 4 years ago
It comes to a grinding halt, just as it does with sites that use CSS for both enabling content and for its layout.
inopinatus · 4 years ago
The old-fashioned way: breathe a sigh of relief, and move on to less egregious sites.
shadowgovt · 4 years ago
It's a nice sentiment, but these days it's almost impossible to conduct business with JavaScript disabled. At least business in the parts of the economy I work in.

The moment somebody sends me a Google Drive link (about three times a week), w3m goes back on the shelf and I have to pick up a modern standard-compliant browser.

rkta · 4 years ago
Sites that require JavaScript do not work in w3m, as w3m does not support JS.
ape4 · 4 years ago
I suppose a command line browser could support JavaScript. Of course non trivial to do.
pmoriarty · 4 years ago
I've been using emacs-w3m (which uses w3m under the hood) for many years.

It is sooo nice to have a web browser well integrated in to an editor as powerful as emacs.

neilv · 4 years ago
Agreed. About 20 years ago, I used the Emacs w3m support to let me browse HTML programming language books while coding on a 48 MB RAM laptop.

https://www.neilvandyke.org/w3mnav/

https://www.neilvandyke.org/quack/

https://www.neilvandyke.org/linux-thinkpad-560e/

Getting docs into an efficient "IDE" is still nice. Just yesterday, I was using nov.el to occasionally reference Blandy et al.'s Rust book in Emacs, faster than I could the PDF or in a dedicated ebook reader program.

frogcoder · 4 years ago
Just curious, what are the advantages using w3m instead of eww?
m4lvin · 4 years ago
One example: When I open this page here, in eww all comments have the same left margin and I have no idea what is a reply to what, but with emacs-w3m the nesting structure is visible.
ArtWomb · 4 years ago
emacs-w3m is exactly what I'm searching for. Regex to mine useful data from web sites has become a necessary evil.

Ideal use case would be running webircgateway. Private self hosted irc chan for remote team. Accessed via emacs shell as we share code ;)

jmclnx · 4 years ago
I forgot about this. I just fired up Eww in my emacs session and ycombinator renders great
eadmund · 4 years ago
Eww & emacs-w3m are different though. Both are great in different ways.
abzug · 4 years ago
You can also have WebKit embedded in Emacs.
pmoriarty · 4 years ago
I don't want images, though. I just want plain text.

I also don't want javascript, as it opens me up to all sorts of javascript vulnerabilities and tracking.

emacs-w3m is just text, no images, and javascript, which is exactly what I want.

ramesh31 · 4 years ago
What I really want is something inbetween this and a full fledged browser. Something that will basically allow me to browse the web in Reader mode, with support for images and native video, but without any JS involved.
amelius · 4 years ago
I want a graphics terminal (as opposed to a text terminal) and a browser that opens in that terminal. The terminal should not run a windowing system. But the terminal itself should be able to run inside a windowing system.
calvinmorrison · 4 years ago
I say just run firefox with NoScript for an easier medium... Add on "I don't care about cookies" and you're off to the races.
calgoo · 4 years ago
I have been thinking of using a full headless chrome or firefox (so all pages work) and then share that with a commandline / lite browser. So we render and then re-render the page. The browser would run in a remote computer somewhere and the lite browser connects there. So a chrome/firefox proxy basically .
Aeolun · 4 years ago
I’m fairly certain I’ve read about someone doing this exact thing before.
whiplash451 · 4 years ago
I like this idea. How do you know what to render, though? Do you simply copy-paste the page source (but then what’s the point?) or do you filter the source (but then how do you know what to filter out?)
jefftk · 4 years ago
https://mightyapp.com is the first half of this
mikojan · 4 years ago
Uh you can just disable JavaScript in Firefox' about:config
marginalia_nu · 4 years ago
Not on mobile. They've removed that for some reason on the lines of "but why would you use that?"

Another casualty in the war on user agency.

Alterlife · 4 years ago
I'd recomend qutebrowser. It's not exactly what you're looking for out of the box, but it is very customisable. There's a learning curve but once you're used to it, no need to ever reach out for the mouse.
eadmund · 4 years ago
uMatrix on Firefox gets one pretty close to that ideal, and makes it easy enough to enable JavaScript (and similar stuff) selectively until webapps and broken-by-design websites work.

I strongly recommend it to the technically-inclined.

moonchild · 4 years ago
netsurf?
tomxor · 4 years ago
Just trying this out for the first time.. Posted from vim inside w3m. Just took an 'apt install w3m' and 'w3m news.ycombinator.com'. Many of the default key bindings are vim like, took me a while to realise i had to use 'enter' to edit a form field rather than 'i' though.

Only disadvantage I can tell for HN is lack of comment indentation beyond one level... which might be a deal breaker.

shiomiru · 4 years ago
> Only disadvantage I can tell for HN is lack of comment indentation beyond one level... which might be a deal breaker.

HN indentation works with spacer gifs, so you'll have to enable inline images for that to work. (Press o and tick YES for the Display inline images option.)

EDIT: also if you're using debian you'll also want to install the w3m-img package. Or change the Inline image display method to img2sixel (and install libsixel) if your terminal supports sixels, or to kitty (and install imagemagick) if you're using kitty.

(If your w3m version supports Inline image display method, that is. It's a relatively new feature.)

culi · 4 years ago
> HN indentation works with spacer gifs

... holy shit this website is a living fossil

tomxor · 4 years ago
Thanks!

The option was already enabled but not working, the w3m-img package fixed it... I was only expecting place holders and very surprised to see real images rendered, not sure how it's doing this since i'm using urxvt, which doesn't support images AFAIK... is this layered on top via xorg?

daneel_w · 4 years ago
The picture gallery is apparently under construction still. I wonder if it will ultimately contain a notice advising visitors to proceed by using a normal browser.
rkta · 4 years ago
As w3m is able to display images in the terminal there is no need for such a notice.
capableweb · 4 years ago
Doesn't seem to by default? Haven't used w3m in a looong time, but the submission page says the following about images:

> No images (without terminal hacks). Images viewable externally via keystroke.