从今天开始,Emacs里面可以运行任何你想要的程序 (Linux & Windows & Mac & BSD)

我不用windows,可以在github上提一下issue

先不提交issue了,我在wsl2下的eaf还没正常,实在是超出能力范围了 以下是eaf-open-browser debug 错误:

[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Detaching after fork from child process 54]
[New Thread 0x7fffe26f4700 (LWP 55)]
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-jacklisp'
[New Thread 0x7fffe1a2d700 (LWP 56)]
[New Thread 0x7fffe109c700 (LWP 57)]
[New Thread 0x7fffd3fff700 (LWP 58)]
[Detaching after fork from child process 59]
EAF process starting...
[New Thread 0x7fffd366e700 (LWP 71)]
[New Thread 0x7fffd2cdd700 (LWP 72)]
[Detaching after fork from child process 73]
[New Thread 0x7fffd234c700 (LWP 74)]
[New Thread 0x7fffd19bb700 (LWP 75)]
[New Thread 0x7fffd102a700 (LWP 76)]
[Thread 0x7fffd19bb700 (LWP 75) exited]
[Thread 0x7fffd234c700 (LWP 74) exited]
[Thread 0x7fffd102a700 (LWP 76) exited]
[New Thread 0x7fffd102a700 (LWP 77)]
[Detaching after fork from child process 78]
[Detaching after fork from child process 79]
[New Thread 0x7fffd234c700 (LWP 82)]
[New Thread 0x7fffd19bb700 (LWP 83)]
[New Thread 0x7fffbbfff700 (LWP 84)]
[New Thread 0x7fffbb66e700 (LWP 85)]
[New Thread 0x7fffbacdd700 (LWP 86)]
[New Thread 0x7fffba34c700 (LWP 87)]
[New Thread 0x7fffb99bb700 (LWP 88)]
[New Thread 0x7fffb902a700 (LWP 89)]
[New Thread 0x7fff9ffff700 (LWP 90)]
[New Thread 0x7fff9f66e700 (LWP 91)]
[New Thread 0x7fff9ecdd700 (LWP 92)]
[New Thread 0x7fff9e34c700 (LWP 93)]
[New Thread 0x7fff9d9bb700 (LWP 94)]
[New Thread 0x7fff9d02a700 (LWP 95)]
[New Thread 0x7fff83fff700 (LWP 96)]
[New Thread 0x7fff8366e700 (LWP 97)]
[New Thread 0x7fff82cdd700 (LWP 98)]
[New Thread 0x7fff8234c700 (LWP 99)]
QQuickWidget: Failed to make context current
Session is not restored, as no data present in session file.

Thread 1 "python3" received signal SIGSEGV, Segmentation fault.
0x00007ffff39006e4 in QOpenGLContext::shareGroup() const () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#0  0x00007ffff39006e4 in QOpenGLContext::shareGroup() const () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#1  0x00007ffff3c21025 in  () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#2  0x00007ffff3c2122f in QOpenGLFunctions::initializeOpenGLFunctions() () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#3  0x00007fffebafa9c9 in QSGBatchRenderer::Renderer::Renderer(QSGDefaultRenderContext*) () at /lib/x86_64-linux-gnu/libQt5Quick.so.5
#4  0x00007fffebb2b1e6 in QSGDefaultRenderContext::createRenderer() () at /lib/x86_64-linux-gnu/libQt5Quick.so.5
#5  0x00007fffebb92200 in QQuickWindowPrivate::syncSceneGraph() () at /lib/x86_64-linux-gnu/libQt5Quick.so.5
#6  0x00007fffebc5e3b3 in QQuickRenderControl::grab() () at /lib/x86_64-linux-gnu/libQt5Quick.so.5
#7  0x00007fffeb8dffbc in  () at /lib/x86_64-linux-gnu/libQt5QuickWidgets.so.5
#8  0x00007ffff3f2ef17 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#9  0x00007ffff3f2f423 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff3f2e4a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff3f322d8 in QWidgetPrivate::render(QPaintDevice*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff3f327f3 in QWidget::render(QPainter*, QPoint const&, QRegion const&, QFlags<QWidget::RenderFlag>) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff420f62a in QGraphicsProxyWidget::paint(QPainter*, QStyleOptionGraphicsItem const*, QWidget*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff4215529 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff4226abe in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007ffff4229511 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007ffff422a1f0 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff422a742 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff424e9f9 in QGraphicsView::paintEvent(QPaintEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007ffff46df92b in  () at /usr/lib/python3/dist-packages/PyQt5/QtWidgets.cpython-38-x86_64-linux-gnu.so
#21 0x00007ffff3f352b6 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007ffff3fe2d52 in QFrame::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007ffff424d421 in QGraphicsView::viewportEvent(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#24 0x00007ffff46e10db in  () at /usr/lib/python3/dist-packages/PyQt5/QtWidgets.cpython-38-x86_64-linux-gnu.so
#25 0x00007ffff6fe464b in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#26 0x00007ffff3ef2a55 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007ffff3efc0f0 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007ffff47f9bf6 in  () at /usr/lib/python3/dist-packages/PyQt5/QtWidgets.cpython-38-x86_64-linux-gnu.so
#29 0x00007ffff6fe493a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#30 0x00007ffff3f2df4a in QWidgetPrivate::sendPaintEvent(QRegion const&) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#31 0x00007ffff3f2e799 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff3f2f423 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff3f2e4a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007ffff3f2f423 in QWidgetPrivate::paintSiblingsRecursive(QPaintDevice*, QList<QObject*> const&, int, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007ffff3f2e4a4 in QWidgetPrivate::drawWidget(QPaintDevice*, QRegion const&, QPoint const&, int, QPainter*, QWidgetBackingStore*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#36 0x00007ffff3f04bfc in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#37 0x00007ffff3f053da in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#38 0x00007ffff3f538dc in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#39 0x00007ffff3f542d0 in  () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#40 0x00007ffff3ef2a66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#41 0x00007ffff3efc0f0 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#42 0x00007ffff47f9bf6 in  () at /usr/lib/python3/dist-packages/PyQt5/QtWidgets.cpython-38-x86_64-linux-gnu.so
#43 0x00007ffff6fe493a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#44 0x00007ffff38c4de6 in QGuiApplicationPrivate::processExposeEvent(QWindowSystemInterfacePrivate::ExposeEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#45 0x00007ffff38c5014 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#46 0x00007ffff389f35b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#47 0x00007fffe2d0c32e in  () at /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#48 0x00007ffff65c117d in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#49 0x00007ffff65c1400 in  () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#50 0x00007ffff65c14a3 in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#51 0x00007ffff703c565 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#52 0x00007ffff6fe34db in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#53 0x00007ffff6feb246 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#54 0x00007ffff47ba9c1 in  () at /usr/lib/python3/dist-packages/PyQt5/QtWidgets.cpython-38-x86_64-linux-gnu.so
#55 0x00000000005f188a in PyCFunction_Call ()
#56 0x00000000005f2406 in _PyObject_MakeTpCall ()
#57 0x000000000056cb23 in _PyEval_EvalFrameDefault ()
#58 0x0000000000565972 in _PyEval_EvalCodeWithName ()
#59 0x0000000000686053 in PyEval_EvalCode ()
#60 0x00000000006753d1 in  ()
#61 0x000000000067544f in  ()
#62 0x0000000000675507 in PyRun_FileExFlags ()
#63 0x000000000067758a in PyRun_SimpleFileExFlags ()
#64 0x00000000006ae99e in Py_RunMain ()
#65 0x00000000006aed29 in Py_BytesMain ()
#66 0x00007ffff7dde0b3 in __libc_start_main (main=0x4ebd20 <main>, argc=10, argv=0x7fffffffddf8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdde8) at ../csu/libc-start.c:308
#67 0x00000000005f62ee in _start ()

Process *eaf* finished

是不是你的输入法造成的?外置输入法?

你是说闪屏吗?wsl2下的闪屏是内置输入法emacs-rime造成的,Windows下的eaf 用外置输入法没这个问题

编译没问题了,但是部分插件仍使用不了,有可能是使用pip install pyqt5造成的问题,包括terminialjupytermusic-player(老版本的music可以使用的)、system-monitor

eaf-open-mindmapeaf-open(pdf mp4 image)、eaf-open-browser一直没问题 :+1:

eaf-open-jupyter minibuffer提示“please install qtconsole first” ,但是已经安装了qtconsole(pip install qtconsole

以上是windows使用过程遇到的问题。

windows有安装脚本,先跑一遍

今天加了一个补丁 Skip youtube ad. · emacs-eaf/emacs-application-framework@c529728 · GitHub

EAF浏览器现在可以自动跳过所有youtube的广告了。

4 个赞

最近下班在学习 d3.js, 我现在已经迫不及待可以用 d3.js + EAF 创造出一些真正好玩并且实用的工具了。

5 个赞

期待,我觉得EAF是很有希望产生杀手级的应用的 :+1:

1 个赞

eaf 可以通过eaf-proxy-type 设置代理,现在想中途修改代理为直接连接,有办法不重启eaf 做到么(有些网页挂代理之后访问会有限制)。

这块是qt代码,可以动态调整。

需要写补丁才行。

emacs-pgtk 下 eaf-open-browser 打开了一个新的窗口,没在emacs内部打开

不支持pgtk, 请用xwayland

刚写了一个补丁,你看能接收不

代理设置函数统一一下吧,不要用两份代码

postgui的装饰器应该不需要,只有子线程调用图形API才需要postgui装饰器

嗯嗯我再改改

好了 紫薯布丁

合并了,proxy_string 是一个全局变量,我推送了一个新补丁来修复问题。

大佬,想向您请教下,windows下现在emacs eaf 最佳操作应该是如何? 目前我是wsl2 + vcxsrv, 但是vcxsrv配置如果开启 native openGL, 就没法用eaf(demo可以打开) (但是我不太懂的是 firefox可以正常使用), 如果禁用openGL 好像能正常使用,但是浏览网页是真的卡…

当vcxsrv开启openGL后具体报错如下:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-leo'
EAF process starting...
QQuickWidget: Failed to make context current
Session is not restored, as no data present in session file.

Process *eaf* segmentation fault

这个QQuickWidget查了一晚上 大概也就知道应该是和openGL有关,实在不知道怎么解决了…

我推荐用mobaxterm。我用这个没遇到什么问题,没做什么特别设置。

我现在用的是wsl1+archwsl+mobaxterm。调用的是Windows下的eaf。

Wsl2下面直接用Linux下的eaf就可以。我没有长时间使用,所以不好给你什么建议。但是我确认过eaf在wsl2用mobaxterm的默认设置可以流畅运行。