reddit / emacs

Emacs Web Wowser

BilboBaggings123 · 2022-12-14 19:53
[removed]
nv-elisp · 2022-12-14 20:02
You've posted this six times in a row.
MitchellMarquez42 · 2022-12-14 20:24
Eww is theoretically perfect, it doesn't send _any_ data, everything is stored inside your emacs directory. However, it's also horrible at web layouts. I also use Brave (for now) and what I end up doing is this: Sway window manager with the line exec emacsclient -nc -a """" At the end of the config file. Run sway from a terminal or something and fullscreen the window on that workspace this autostarts emacs in client mode too. Then run M-& brave-browser RET to start a Brave that tiles with Emacs and dies when it does. Note that all existing Brave windows have to be closed or it'll just open a new tab. When Sway dies the emacs server will crash due to the "longstanding GTK bug". This cleans the session up nicely imo. It's not perfect, and there are other workarounds - stuff like EXWM if you're prepared to replace the whole desktop. There's also `xwidget-webkit` in some builds of Emacs that provides a full embedded browser, but isn't always available and can sometimes break the running Emacs.
MitchellMarquez42 · 2022-12-14 20:30
That could very well be a Reddit bug - I've had it "fail" to post a comment, so I posted it again, it failed again - next day it turns out that they all posted anyways.
BilboBaggings123 · 2022-12-14 23:08
Cool! If you run brave like that, does that mean you have acess to emacs hotkeys and macros and stuff while using brave?
BilboBaggings123 · 2022-12-14 23:11
Oh sorry!!! I didnt mean to! I had issues where it said i wasnt allowed to post but then i saw i was trying to post to r/artix (im not sure if that subreddit even exists) instead of r/artixlinux I'll see if i can find them and delete them
BilboBaggings123 · 2022-12-14 23:19
I've gone back and deleted all of them except this one and another one where a conversation was open. sorry about that, it happened by accident!
MitchellMarquez42 · 2022-12-14 23:41
Generally no, but there are probably extensions you can install. I use the Vimium extension because I'm addicted to vim keys.
andyjda · 2022-12-15 00:08
About `xwidget-webkit`, do you have any experience running a Chrome-based browser like Brave with it? I'd be very interested in that. From my understanding `xwidget` is limited to the Webkit browser-engine. But I don't know much about browsers or compatibility; I just know that Chrome-based browsers use a different engine (Blink). About how it "can sometimes break the running Emacs," I assume you're on MacOS? If so, this is most likely due to memory leaks that [I am (very very slowly) working on](https://github.com/andyjda/emacs/tree/xwidget-patches). If you can share your experience with that (or have any advice) that'd be great! 😊
MitchellMarquez42 · 2022-12-15 00:20
I didn't know that running a chrome-based browser in it was possible! Is it? As for the breaking, no. I'm vaguely aware of the Mac memory leak but this was a different problem. I believe what happened is I: - opened a url - split the window - tried to open another url or switch buffers or something - tried to change the window configuration again (turned a horizontal split into a vertical one) - webkit surface wasn't resizing, gaping hole in the display - key commands weren't doing anything and emacs display was frozen I have no idea how common this is or if there's a simple way to avoid it. Admittedly I was pushing it. I don't use the xwidget browser much because I restart emacs all the time.
andyjda · 2022-12-15 01:01
Oh no I was asking you if it’d be possible to run non-WebKit browsers 😆 I guess “probably not” is still the correct answer. And that’s interesting. Was this issue on Mac? If it was I could make a note to look into it if and when I fix the memory leaks. I’ve never experienced it but it does sound like something along the lines of the other issues the maintainers mentioned
MitchellMarquez42 · 2022-12-15 06:31
This was on Linux, I believe either fedora or arch. >I was asking you if it’d be possible to run non-WebKit browsers 😆 And I was asking _you_ cause it sounded cool and I had no idea if it was possible. Actually, on a related note: how does the xwidget feature work? Is it actually related to X? Can we define new widgets with elisp?
BilboBaggings123 · 2022-12-15 09:12
Okay cool! So you are able to use vim hotkeys in brave?
MitchellMarquez42 · 2022-12-15 09:36
Yes. Here's the extension: https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en There are others that do similar but I use this one.
BilboBaggings123 · 2022-12-15 12:52
Thanks!
andyjda · 2022-12-17 22:11
It’s not strictly related to X, it can theoretically work with GTK+ (on Linux) and NS (on Mac) widgets. I think a component in C is necessary to implement new widgets: that’s how the WebKit widgets are built. This is because you have the generic widget code, but then you’re still going to have to interface with your specific widget, and you can’t do that directly via emacs lisp (This is all just based on my limited understanding by snooping around the code for a bit)