想试支持 XWidget/Webkit 版的 Emacs 的来吧

Posted Emacs

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了想试支持 XWidget/Webkit 版的 Emacs 的来吧相关的知识,希望对你有一定的参考价值。

转自需要*翻*墙*的 EmacsNijia.com , 大体看起来, 要想尝鲜体验 Emacs 中内嵌富文本支持图片的浏览器, 操作简单, 效果满意 --- 当然目前来说可以操控的也简单... 下文 hick 稍微有补充, 增加了 git clone 操作等, 特别鸣谢 EmacsNijia , 点击下面的"阅读原文"具体查看 EmacsNijia 的原文  http://emacsninja.com/posts/on-transcending-borders.html



Reddit reminded me today that the infamous xwidget branch has been finally merged into the emacs-25branch. As usual there hasn’t been any critical or even informational reports about what using it is like, so I decided to see for myself what the fuss is about. Building it is easy enough:

git clone git://git.savannah.gnu.org/emacs.git 
git checkout emacs-25 ./configure --with-x-toolkit=gtk3 --with-xwidgets make

You can then use M-x xwidget-webkit-browse-url and must enter a full URL.www.gnu.org will only display a blank image, http://www.gnu.org/ on the other hand…




That’s more like it.

According to html5test.com things aren’t looking too bad:


想试支持 XWidget/Webkit 版的 Emacs 的来吧


I can even watch YouTube!


Once you do more than basic navigation by clicking links, things begin falling apart. Every time I interacted with a video, the audio volume was turned all the way up and the widget flickered. Searching for another video didn’t work the way you’d expect it either. You can click a text form just fine, but any keys you press are interpreted as potential Emacs commands instead. Instead you hit RET and get the familiarread-stringprompt. Finishing your input will place it into the text form. Except when it doesn’t:


To keep things short, the integration so far is as basic as it gets. On top of that you get reminded once in a while that this is still a hack: Change the window size or scroll off and you get to see extra buffer text reminding you to readjust the widget size with a. What it doesn’t tell you is that you may need to scroll up as well…

Personally, I find the opposite approach of starting out with webkit and piling javascript on top of it until it resembles what you’re after much more promising. It may involve less Lisp than you’ve hoped for, but leads to significantly more usable results.

 

以上是关于想试支持 XWidget/Webkit 版的 Emacs 的来吧的主要内容,如果未能解决你的问题,请参考以下文章

每天坚持一个CSS——社会人

译REM vs EM - 世纪之争

em与rem

EM2工程项目管理软件企业版

链接时间优化与多线程支持冲突

em和rem的概念和用法