reddit / emacs

Local markdown preview using xwidget-webkit

cfclrk 路 2022-10-20 10:42
Hey Emacs friends! I'm putting together a little package to preview markdown files similarly to how they are rendered on GitHub. Previously I've used [grip](https://github.com/joeyespo/grip) (and [grip-mode](https://github.com/seagle0128/grip-mode)), which are awesome, but I wanted a little more room for customization and to avoid hitting the GitHub API on every change. This package does the rendering locally if your Emacs has xwidget support. I'd *really* appreciate any feedback anyone has! [https://github.com/cfclrk/markdown-xwidget](https://github.com/cfclrk/markdown-xwidget)
akuszyk 路 2022-10-22 10:22
This looks awesome by the way. It didn't work first time for me, but I've filed a GitHub issue (will respond to your comments when I re-test). Really looking forward to trying it out 馃憤
Thaodan 路 2022-10-23 00:47
Can't you render markdown similarly like Org-mode does or just use the inbuild browser? I don't the html should be so complicated that it needs an external browser. Also xwidget is X11 only which means is kinda a step backwards.
cfclrk 路 2022-10-24 14:07
You can! `markdown-mode` already has `markdown-live-preview-mode` which uses eww by default. This package for people who want to render markdown more like how GitHub does, or more similar to the experience VSCoders get out of the box. > xwidget is X11 only which means is kinda a step backwards. A step backwards from what? eww?
vaxdar 路 2022-10-25 05:49
I think the step backwards refers to wayland support. It appears that xwidgets actually does support wayland on the pgtk build now though (and I just tried it and it worked): https://www.reddit.com/r/emacs/comments/rs30b6/xwidgets\_support\_pgtk\_now/