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

你现在又不用vue,暂时别管它,不影响使用。我这里就是npm install了两回,莫名其妙就好了。

这么说我现在可以在emacs里试试用起来了?

我node切换到10.15.1解决了上面的错误,然后安装依赖又报错创建dist文件夹失败,权限不行,我又管理员运行了msys2, 我直接npm install没有问题

> [email protected] postinstall D:\Software\msys2\home\Hiller\.emacs.d\site-lisp\emacs-application-framework
> node install-node-apps.js

npm WARN [email protected] No description

audited 6 packages in 1.34s
found 0 vulnerabilities

npm WARN [email protected] No description

audited 249 packages in 2.316s
found 0 vulnerabilities

npm WARN [email protected] No description

audited 1 package in 1.407s
found 0 vulnerabilities

npm WARN [email protected] requires a peer of bufferutil@^4.0.1 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] requires a peer of utf-8-validate@^5.0.2 but none is installed. You must install peer dependencies yourself.
npm WARN [email protected] No description

audited 67 packages in 1.65s
found 0 vulnerabilities

npm WARN optional SKIPPING OPTIONAL DEPENDENCY: vue-loader-v16@npm:vue-loader@^16.1.0 (node_modules\@vue\cli-service\node_modules\vue-loader-v16):
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Invalid dependency type requested: alias
npm WARN @vue/[email protected] requires a peer of @vue/compiler-sfc@^3.0.0-beta.14 but none is installed. You must install peer dependencies yourself.
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\webpack-dev-server\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules\watchpack-chokidar2\node_modules\fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"})

audited 1301 packages in 6.748s
found 0 vulnerabilities


> [email protected] build D:\Software\msys2\home\Hiller\.emacs.d\site-lisp\emacs-application-framework\app\vue-demo
> vue-cli-service build


-  Building for production...
 DONE  Compiled successfully in 1939ms18:04:05

  File                                 Size               Gzipped

  dist\js\chunk-vendors.983c3185.js    89.66 KiB          32.14 KiB
  dist\js\app.c43f4a86.js              2.88 KiB           1.32 KiB
  dist\css\app.606858ee.css            0.27 KiB           0.20 KiB

  Images and other types of assets omitted.

 DONE  Build complete. The dist directory is ready to be deployed.
 INFO  Check out deployment instructions at https://cli.vuejs.org/guide/deployment.html

audited 54 packages in 24.814s
found 0 vulnerabilities

但是这时候执行 node ./install-eaf-win32.js是下面的情况

然后出现了下面的错误(上面的帖子里见到过你回复这个问题的,所以这个东西怎么手动安装呢?我pip和npm都没搜到,这是啥东西)

-  Building for production...
installing k-lite-codec-pack basic ...
The process cannot access the file because it is being used by another process.
{ Error: Command failed: D:\Software\msys2\tmp\K-Lite_Codec_Pack_1595_Basic.exe /verysilent /nocancel /norestart
The process cannot access the file because it is being used by another process.

    at checkExecSyncError (child_process.js:616:11)
    at execSync (child_process.js:653:13)
    at installCodecPack (D:\Software\msys2\home\Hiller\.emacs.d\site-lisp\emacs-application-framework\install-eaf-win32.js:82:5)
    at process._tickCallback (internal/process/next_tick.js:68:7)
  status: 1,
  signal: null,
  output:

cc

(use-package eaf
  :load-path "~/.emacs.d/site-lisp/emacs-application-framework" ; Set to "/usr/share/emacs/site-lisp/eaf" if installed from AUR
  :init
  (use-package epc :defer t :ensure t)
  (use-package ctable :defer t :ensure t)
  (use-package deferred :defer t :ensure t)
  (use-package s :defer t :ensure t)
  :custom
  (eaf-browser-continue-where-left-off t)
  :config
  (eaf-setq eaf-browser-enable-adblocker "true")
  (eaf-bind-key scroll_up "C-n" eaf-pdf-viewer-keybinding)
  (eaf-bind-key scroll_down "C-p" eaf-pdf-viewer-keybinding)
  (eaf-bind-key take_photo "p" eaf-camera-keybinding)
  (eaf-bind-key nil "M-q" eaf-browser-keybinding)) ;; unbind, see more in the Wiki

使用这个配置,然后open browser就录屏那样,没啥反应。eaf-open 打开一个png也是这样没反应,是因为我的依赖环境还有问题?

是这个东西吗,我下载安装了,需

要配置什么环境变量么?

前排提醒EAF还是最好别用msys2里面的python,pip里面的包是针对原生win的,有的在msys2下根本装不了,我一个多月前尝试EAF的时候就是从python官网另外下了一个装上,然后 eaf里面手动吧python路径设成那个python 的路径,配置好之后没有任何问题。

改过了,卸载了msys2的pip(坑我很久了),换了anaconda的python3.8,bahsrc里面配置了python3.8的环境变量。安装pip的依赖成功了。

这个手工安装就好了。装好不需要管什么环境变量,它自己的安装包会处理好。

话说我觉得你没有必要全都defer。尤其是现在你还没跑起来的时候。

你给的这点信息我也看不出什么,*eaf* 里面有调试信息,你看看那上面怎么说。如果你依赖都装对了,我估计是你defer epc之后eaf没找到。

手工安装的意思就是你把install-eaf-win32.js里面的代码拆开来自己一个一个执行。它虽然是js,实际上还是一个脚本而已。

我发现出现python进程异常关闭是因为执行eaf.py中的下面这句

    app = QApplication(sys.argv + ["--disable-web-security"] + hardware_acceleration_args)

我用raise Exception(sys.argv)可在emacs的 *eaf* 中看到如下输出,不知能否帮看是是什么问题。用远程桌面是可以正常打开浏览器的。

  File "e:/emacs/.emacs.d/.local/straight/build-27.1/eaf/eaf.py", line 507, in <module>
    raise Exception(sys.argv)
Exception: ['e:/emacs/.emacs.d/.local/straight/build-27.1/eaf/eaf.py', '1920', '995', '', '', '', 'e:/emacs/.emacs.d/eaf/', '9999', '{"eaf-camera-save-path":"~/Downloads","eaf-browser-enable-plugin":"true","eaf-browser-enable-adblocker":"true","eaf-browser-enable-autofill":"false","eaf-browser-enable-javascript":"true","eaf-browser-remember-history":"true","eaf-browser-default-zoom":"1.0","eaf-browser-font-family":"","eaf-browser-blank-page-url":"https://www.google.com","eaf-browser-scroll-behavior":"auto","eaf-browser-download-path":"~/Downloads","eaf-browser-aria2-proxy-host":"","eaf-browser-aria2-proxy-port":"","eaf-browser-dark-mode":"follow","eaf-browser-pc-user-agent":"Mozilla/5.0 (X11; Linux x86_64; rv:85.0) Gecko/20100101 Firefox/85.0","eaf-browser-phone-user-agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 11_0 like Mac OS X) AppleWebKit/604.1.38 (KHTML, like Gecko) Version/11.0 Mobile/15A5370a Safari/604.1","eaf-browser-chrome-history-file":"~/.config/google-chrome/Default/History","eaf-browser-unknown-url-scheme-policy":"AllowUnknownUrlSchemesFromUserInteraction","eaf-pdf-dark-mode":"follow","eaf-pdf-default-zoom":"1.0","eaf-pdf-dark-exclude-image":"true","eaf-pdf-scroll-ratio":"0.05","eaf-terminal-dark-mode":"follow","eaf-terminal-font-size":"13","eaf-terminal-font-family":"","eaf-markdown-dark-mode":"follow","eaf-mindmap-dark-mode":"follow","eaf-mindmap-save-path":"~/Documents","eaf-mindmap-edit-mode":"false","eaf-jupyter-font-size":"13","eaf-jupyter-font-family":"","eaf-jupyter-dark-mode":"follow","eaf-marker-letters":"ASDFHJKLWEOPCNM","eaf-emacs-theme-mode":"light","eaf-emacs-theme-background-color":"#fbf8ef","eaf-emacs-theme-foreground-color":"#655370"}']

Process *eaf* exited abnormally with code 1

我手动安装并且注释了安装脚本中安装 k-lite的函数。 eaf报错:

Traceback (most recent call last):
  File "d:/Software/msys2/home/Hiller/.emacs.d/site-lisp/emacs-application-framework/eaf.py", line 25, in <module>
    from app.browser.buffer import AppBuffer as NeverUsed # noqa
  File "d:\Software\msys2\home\Hiller\.emacs.d\site-lisp\emacs-application-framework\app\browser\buffer.py", line 22, in <module>
    from PyQt5 import QtCore, QtWidgets
ModuleNotFoundError: No module named 'PyQt5'

Process *eaf* exited abnormally with code 1

但是我在cmd中是正常的,

并且emacs中 getenv PATH 里面也有D:anaconda的路径。

请问下,这情况我可能从哪方面排查问题呢?

emacs 中 (executable-find "python") 看看是哪个。肯定是两个不一致产生的。

这样看不出什么。这个地方只能说明eaf进程没启动成功。

你看看python是不是在PATH环境变量最前面?如果你的系统上面有几个python,那最好把你用来运行eaf的那个python放在最前面。最保险的办法是直接设置eaf-python-command变量,指定你的python的路径。

谢谢,经过一番折腾,终于解决了。最后是通过升级显卡驱动解决的。windows下用emacs真是问题多。

我靠,你怎么排查到显卡驱动的?

1 个赞

atio6axx.dll这个动态链接库像ati显卡驱动,猜出来的。

弄成了就别再折腾了。 :joy:

真能折腾,哈哈哈哈

想问一个外行问题, 在EAF里可以流畅地使用图形设计类软件吗?比如 krita, gimp, blender之类的? 我是mac系统没法测试, 很好奇