EWW: Emacs Web Wowser
gnu.org
gnu.org
Ahh but it's not a browser. It's a wowser.
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.
- 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.
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.
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.
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
(Incidentally eww and nov.el both use shr.el for rendering HTML.)
(Assuming the page renders at all, of course.)
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.
There’s (of course) an Elisp command for this. I cant’t remember it’s name now though.
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.
Point is, maybe have a look at OmniSharp.
I always meant to file a bug but never did.
Also, if it's only available via the compile yourself route - how long does the compilation take in a 4-core Intel based system ?
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?
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
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.
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. |
+--------------------------+-------------------------------+You don’t need JS for all web-content.
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.