News for hackers. Stuff that matters.
Re:EWW: Emacs Web Wowser by NelsonMinar on Friday September 11, 2020 @11:22AM (#24443773)
The article notes that this browser was originally written by Lars Ingebrigtsen, probably best known for Gnus. Lars is still hacking away on emacs regularly, you can see his blog posts about his work here: https://lars.ingebrigtsen.no/category/emacs/
Re:EWW: Emacs Web Wowser by VWWHFSfQ on Thursday September 10, 2020 @11:25PM (#24438874)
Good to see some competition in the browser wars. Badly needed.
Re:EWW: Emacs Web Wowser by userbinator on Friday September 11, 2020 @12:17AM (#24439145)
This one competes with the other text-based ones out there, and I'd almost call it a "HTML viewer" instead of "web browser" due to the limited features it has --- it's basically HTML-only with no CSS support, so far more limited than even Dillo or NetSurf; but works well for viewing documentation and other primarily text-based and "content-focused" sites.
Re:EWW: Emacs Web Wowser by na85 on Friday September 11, 2020 @01:46AM (#24439536)
>I'd almost call it a "HTML viewer" instead of "web browser"

Ahh but it's not a browser. It's a wowser.

Re:EWW: Emacs Web Wowser by jsf01 on Thursday September 10, 2020 @11:42PM (#24438980)
A highly specialized browser for emacs from 2013 is hardly competition against consumer browsers. I don’t think they’re directly comparable either.
Re:EWW: Emacs Web Wowser by fmakunbound on Thursday September 10, 2020 @11:52PM (#24439031)
I’m sure grandpa was being facetious
Re:EWW: Emacs Web Wowser by II2II on Friday September 11, 2020 @11:22AM (#24443775)
On the other hand, it is nice when the competition brings something completely different to the table. It serves the needs of people who would never have those needs served by consumer oriented browsers.

While this may not be competition in the "winner takes all" sense, eww is does have to consider what those consumer browsers are offering in the context of its domain of application. If it doesn't, it will lose those users and it's reason for being.

Re:EWW: Emacs Web Wowser by iamnotarobotman on Friday September 11, 2020 @01:18AM (#24439418)
I guess eww is for those who are infatuated by their editors, rather than getting things done with it, when the rest of the world just uses Chrome.
Re:EWW: Emacs Web Wowser by d0mine on Friday September 11, 2020 @02:31PM (#24445836)
Here's a practical use-case eww: reading technical articles (e.g., grom google search) without a context switch to a different application: a single key chord to start a typing a query (counsel-web-suggest), then choose the desired link , then read it in eww — all without leaving emacs (while using the same commands that work throughout emacs).
Re:EWW: Emacs Web Wowser by NelsonMinar on Friday September 11, 2020 @11:20AM (#24443763)
Yes. I predict as many as 0.01% of web users will be using EWW in the year 2025
Re:EWW: Emacs Web Wowser by wjohnsto on Friday September 11, 2020 @11:48AM (#24444037)
I think that's a pretty lofty goal/estimate.
Re:EWW: Emacs Web Wowser by codygman on Thursday September 10, 2020 @11:53PM (#24439036)
Related, xwidget browser in emacs with keyboard navigation, etc:

https://github.com/BlueFlo0d/xwwp/tree/xwwp-ace-dev

Re:EWW: Emacs Web Wowser by ginko on Friday September 11, 2020 @04:51AM (#24440487)
I wanted to try that a while ago but didn't get it to work.
Re:EWW: Emacs Web Wowser by johanvts on Friday September 11, 2020 @12:55AM (#24439309)
This looks promising. Thanks for sharing.
Re:EWW: Emacs Web Wowser by pmoriarty on Thursday September 10, 2020 @11:27PM (#24438886)
I've been using emacs-w3m for a long time, but I haven't used eww. If someone who's used both could compare the two, I'd be grateful.
Re:EWW: Emacs Web Wowser by defanor on Friday September 11, 2020 @02:26AM (#24439733)
- Not sure if it's still the case in most recent versions, but apparently w3m used to be snappier (I suspect there is some blocking still happening in eww, or maybe it's just that it loads emacs/elisp more).

- w3m just ignores colours, while eww applies the ones it recognizes, though in newer versions it can be disabled (it seemed like a major misfeature to me, but YMMV, and it's not that relevant anymore).

- Being written in elisp, eww is more hackable and generally fits a bit better into emacs.

Both render reasonable HTML subsets fine, can load images and handle forms.

Re:EWW: Emacs Web Wowser by nanna on Friday September 11, 2020 @09:47AM (#24442737)
> w3m just ignores colours, while eww applies the ones it recognizes, though in newer versions it can be disabled

Agreed! And to do so:

(setq shr-use-colors nil)

Edit: Colors in eww come from the Simple HTML Renderer (shr.el), so you need to disable its respective variable.

Re:EWW: Emacs Web Wowser by TeMPOraL on Friday September 11, 2020 @06:06AM (#24440977)
> it seemed like a major misfeature to me

Webpage-provided colors may not play well with the color scheme you're using (AFAIR, eww doesn't "reset" to black-on-white, but keeps your current color theme for things not explicitly styled), and may cause problems on the terminal (e.g. with low-contrast text getting rounded off to the color of its background). So the ability to disable styling is useful.

Re:EWW: Emacs Web Wowser by defanor on Friday September 11, 2020 @06:22AM (#24441079)
Indeed, that's what I meant: the colourisation seemed like a misfeature to me, while the newly added ability to disable colours resolved it. Probably didn't state it quite clearly above.
Re:EWW: Emacs Web Wowser by nickdrozd on Friday September 11, 2020 @08:10AM (#24441814)
EWW is a little too austere for general browsing IMO, but it's more than useful enough to make up for it in a few situations.

1. Copying large sections of text. Say I'm reading a tutorial or something with code blocks, and I want to run them. If I'm in a "real" browser, I have to click and drag to copy the text to my editor, and clicking and dragging sucks. Instead, I can open the page in EWW, then set the mark and search (C-SPC and C-s) for a more pleasant copying experience. (I realize this sounds petty, but it makes for a little less hassle in my life.)

2. One-off scraping tasks. This is a powerful technique, and it's my go-to example in a "but can your editor do this" discussion. For details, see https://nickdrozd.github.io/2018/10/17/web-scraping.html

Re:EWW: Emacs Web Wowser by liability on Friday September 11, 2020 @12:31PM (#24444471)
I use eww for reading long articles. It works well with read-aloud.el which I also use with nov.el when reading epubs.

(Incidentally eww and nov.el both use shr.el for rendering HTML.)

Re:EWW: Emacs Web Wowser by dredmorbius on Friday September 11, 2020 @11:17AM (#24443727)
For w3m, you can open rendered content directly in vim, making saving or incorporating into other texts particularly easy.

(Assuming the page renders at all, of course.)

Re:EWW: Emacs Web Wowser by johanvts on Friday September 11, 2020 @12:54AM (#24439301)
I use it every now and then, but I think its missing a few things to be really great.

1. Its slow. I don't know if it just "feels" slow due to lack of visuals or if it is really slow. I suspect it loads a lot of things that never gets rendered anyway.

2. It needs some smarter focusing. Each page normally has a few screens of garbled menus etc. to scroll past before getting to the content. Maybe filtering out some html tags would be enough.

Re:EWW: Emacs Web Wowser by josteink on Friday September 11, 2020 @01:17AM (#24439412)
> It needs some smarter focusing. Each page normally has a few screens of garbled menus etc. to scroll past before getting to the content. Maybe filtering out some html tags would be enough.

There’s (of course) an Elisp command for this. I cant’t remember it’s name now though.

Re:EWW: Emacs Web Wowser by Symbiote on Friday September 11, 2020 @01:29AM (#24439467)
It is literally the fourth thing mentioned in the linked documentation.
Re:EWW: Emacs Web Wowser by johanvts on Friday September 11, 2020 @03:52AM (#24440145)
Thank you! (Press 'R')
Re:EWW: Emacs Web Wowser by mark_l_watson on Friday September 11, 2020 @08:42AM (#24442095)
Ha. I was just playing around with EWW a few weeks ago.

In the old times, the 1980s, I would use Emacs to read email. So convenient and fast. I should set that up again for the fun of it.

I am using Emacs less now because I use VSCode more often now just because it is easier. The thing that keeps me using Emacs is how well it works with mosh and tmux for doing development in fast remote servers. This is also getting easier with VSCode.

Re:EWW: Emacs Web Wowser by throwaway_pdp09 on Friday September 11, 2020 @09:57AM (#24442863)
I am using emacs with OmniSharp which... sort of works. It gives context-sensitive help when it's in the mood. It allows me to stay in emacs a little more )I don't like visual studio).

Point is, maybe have a look at OmniSharp.

Re:EWW: Emacs Web Wowser by na85 on Friday September 11, 2020 @10:04AM (#24442942)
Are you on Linux? I found that on mac, omnisharp "just works" whereas on Linux it would only offer completion if the file has previously been visited that session.

I always meant to file a bug but never did.

Re:EWW: Emacs Web Wowser by throwaway_pdp09 on Friday September 11, 2020 @10:14AM (#24443064)
Nope, windows. And if you update a file it sometimes doesn't update the info that changed in the file (even if the file is in a buffer), which is frustrating.
Re:EWW: Emacs Web Wowser by hpoe on Thursday September 10, 2020 @11:34PM (#24438919)
So I've been learning Emacs for a bit now and was just thinking about trying to figure out how to web browsing in emacs as a browser is the only other program I need right now. Gotta give this a try see how it works.
Re:EWW: Emacs Web Wowser by ews on Thursday September 10, 2020 @11:40PM (#24438960)
Make sure you also try Xwidget browsing, which has become my de factor browser while at work https://emacsnotes.wordpress.com/2018/08/18/why-a-minimal-br...
Re:EWW: Emacs Web Wowser by psibi on Friday September 11, 2020 @02:56AM (#24439865)
Is there any way to get Xwidget based browser apart from trying to compiling Emacs (for a Linux environment) ?

Also, if it's only available via the compile yourself route - how long does the compilation take in a 4-core Intel based system ?

Re:EWW: Emacs Web Wowser by auganov on Friday September 11, 2020 @04:04AM (#24440210)
Less than 30 minutes. Pretty simple to follow too.
Re:EWW: Emacs Web Wowser by konjin on Friday September 11, 2020 @01:04AM (#24439347)
It works badly in most cases. Hacker News and Google are at the limit of what's usable. For a very lose definition of limit.
Re:EWW: Emacs Web Wowser by mickeyp on Friday September 11, 2020 @03:14AM (#24439951)
It works well for documentation and general reading, especially if you press `R` to engage readability mode, that attemps to strip out all but the main body of text.
Re:EWW: Emacs Web Wowser by mullikine on Friday September 11, 2020 @06:13AM (#24441026)
i really enjoy using eww browser for at least 30% of my browsing. it's very hackable -- you can easily hook into its code to make handlers for different urls, load differently, render differently per website, etc.. i usually open up eww when i want to properly digest a website too, or create a bookmark or link to a part of a website. eww is great!
Re:EWW: Emacs Web Wowser by mrspeaker on Friday September 11, 2020 @07:57AM (#24441706)
Recently I've been prioritizing sites that don't use require JavaScript, and therefore have been using Eww a lot more (I'll still often escape out to Firefox).

But I love that I can write lisp macros to scrape out data - it's like a cooler GreaseMonkey... though I haven't found a good jQuery-like way to get at elements... any ideas?

Re:EWW: Emacs Web Wowser by mullikine on Friday September 11, 2020 @08:01AM (#24441740)
firstly, it is possible to get the javascript-generated dom in eww:

https://www.reddit.com/r/emacs/comments/heaoiu/weekly_tipstr...

as for looking into elements -- i would probably access the dom and put it through xpath or something. sounds like a challenge

Re:EWW: Emacs Web Wowser by aasasd on Friday September 11, 2020 @05:32AM (#24440746)
I keep wondering if there's something for Emacs to open warc, maff, htz or mhtml. For the purposes of archiving web pages.
Re:EWW: Emacs Web Wowser by abdullahkhalids on Friday September 11, 2020 @04:51AM (#24440485)
post a comment on HN using Eww. :-)
Re:EWW: Emacs Web Wowser by abdullahkhalids on Friday September 11, 2020 @04:52AM (#24440494)
I tried to post a comment here using Eww. But only the last line of the comment was posted, as above. (this one is from Firefox)
Re:EWW: Emacs Web Wowser by rukuu001 on Friday September 11, 2020 @01:36AM (#24439492)
I can’t think of a more perfect name
Re:EWW: Emacs Web Wowser by mlang23 on Friday September 11, 2020 @04:10AM (#24440236)
EWW is a godsent, very cool. Nice replacement for emacs-w3, which was very slow to render.
Re:EWW: Emacs Web Wowser by noufalibrahim on Friday September 11, 2020 @12:54AM (#24439302)
This is more like a novelty feature to showcase the "power" of elisp. I haven't tried it but it's not really going to compare with normal browsers like chrome and even FF. There might be some use cases for things like viewing well structured HTML documentation or browsing a few sites but apart from that, I'm not sure what the value is.

I'm a long time Emacs users and it's quite frustrating to see how hard it is to use ecosystems of modern languages/frameworks like vue etc. I'm not that familiar with the ecosystem so it might my fault but this is my impression. I actually shifted to vscode to do this. If energy like this were spent there, I think it'd help adoption and usage much more.

Re:EWW: Emacs Web Wowser by konjin on Friday September 11, 2020 @01:03AM (#24439341)

    Posting from Emacs
    ==================

    It works well enough to post in hacker news. You just need to
    enter all the text in another buffer first, add a line of blank
    spaces at the top, and then kill and yank into the text area. As
    far as I can tell you can copy the way that org-mode deals with
    src-blocks to automate it, but this works well enough for me for
    now.

    It even works in emacspeak, which is kind of amazing. I have a
    blind accessible webbrowser inside an editor without even trying.

    (define identity
      (lambda (x)
        x))

    Even the scheme and paredit-modes work. Essentially it lets you
    author plain text emails as HN comments.

    +--------------------------+-------------------------------+
    |Pros                      |Cons                           |
    +--------------------------+-------------------------------+
    |You can make things look  |You can waste a lot of time.   |
    |amazing.                  |                               |
    +--------------------------+-------------------------------+
    |You can use whatever text |You have to choose what format |
    |mode you think is best.   |you like best: org vs md vs    |
    |                          |rest.                          |
    +--------------------------+-------------------------------+
Re:EWW: Emacs Web Wowser by josteink on Friday September 11, 2020 @01:12AM (#24439385)
It’s also good for documentation and stuff like Stack overflow.

You don’t need JS for all web-content.

Re:EWW: Emacs Web Wowser by fiddlerwoaroof on Friday September 11, 2020 @02:36AM (#24439773)
I found tide-mode with RJSX to be mostly equivalent to VSCode (It uses the same language server as vscode, so feature-wise, it’s very close).

I had a really weird experience here: I liked VSCode, and almost switched to VSCode for JS and emacs for everything else. On a whim, I found tide-mode and tried it out. I thought “this works pretty well, but it seems slower than VSCode, and more flaky”. Then, I switched back to VSCode for a while and I realized that it had almost all the same issues I had in emacs (I forget what they are, it’s been a while). So, I left VSCode and have been using emacs happily do JS for the last couple years.

Re:EWW: Emacs Web Wowser by taeric on Friday September 11, 2020 @01:56AM (#24439584)
I find it sad that "well structured HTML" is listed as a clear outlier.
Re:EWW: Emacs Web Wowser by noufalibrahim on Friday September 11, 2020 @02:27AM (#24439738)
I do too. But I think that ship has sailed.
Re:EWW: Emacs Web Wowser by mssdvd on Friday September 11, 2020 @02:10AM (#24439669)
Have you ever tried LSP?