emacs-eaf / emacs-application-framework

EAF, an extensible framework that revolutionizes the graphical capabilities of Emacs
GNU General Public License v3.0
3.1k stars 234 forks source link

json-parse-buffer错误 #977

Closed superfpga closed 2 years ago

superfpga commented 2 years ago

1.环境:Debian11/emacs28.1

2.请教一下各位大佬,配置emacs-application-framework后,启动emacs后,遇到了如下的错误,不知道有没有同仁遇到过,试着上网找答案,但是没有结果,没有办法,特来请教,先谢谢了!!!

3.emacs --debug-init启动的错误信息:

Debugger entered--Lisp error: (void-function json-parse-buffer) (json-parse-buffer :object-type 'alist) (progn (insert-file-contents (concat eaf-build-dir "applications.json")) (goto-char 0) (json-parse-buffer :object-type 'alist)) (unwind-protect (progn (insert-file-contents (concat eaf-build-dir "applications.json")) (goto-char 0) (json-parse-buffer :object-type 'alist)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (concat eaf-build-dir "applications.json")) (goto-char 0) (json-parse-buffer :object-type 'alist)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))) (let ((temp-buffer (generate-new-buffer " temp" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents (concat eaf-build-dir "applications.json")) (goto-char 0) (json-parse-buffer :object-type 'alist)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))) (let ((apps-alist (let ((temp-buffer (generate-new-buffer " temp" t))) (save-current-buffer (set-buffer temp-buffer) (unwind-protect (progn (insert-file-contents ...) (goto-char 0) (json-parse-buffer :object-type ...)) (and (buffer-name temp-buffer) (kill-buffer temp-buffer))))))) (cons 'set (mapcar 'eaf--alist-to-defcustom-const (cdr apps-alist)))) eaf--json-to-defcustom-set() (custom-declare-variable 'eaf-apps-to-install (list 'funcall (list 'function #'(lambda nil "" nil))) "List of applications to install" :group 'eaf :type (eaf--json-to-defcustom-set)) eval-buffer(#<buffer load-333212> nil "/home/superman/.emacs.d/site-lisp/emacs-applicatio..." nil t) ; Reading at buffer position 3914 load-with-code-conversion("/home/superman/.emacs.d/site-lisp/emacs-applicatio..." "/home/superman/.emacs.d/site-lisp/emacs-applicatio..." nil t)

(eaf)

apply(# eaf nil) (prog1 (apply orig feature args) (if (and (not already-loaded) (memq feature features)) (progn (let ((time (sanityinc/time-subtract-millis (current-time) require-start-time))) (add-to-list 'sanityinc/require-times (list feature require-start-time time) t))))) (let ((already-loaded (memq feature features)) (require-start-time (and (not already-loaded) (current-time)))) (prog1 (apply orig feature args) (if (and (not already-loaded) (memq feature features)) (progn (let ((time (sanityinc/time-subtract-millis ... require-start-time))) (add-to-list 'sanityinc/require-times (list feature require-start-time time) t)))))) sanityinc/require-times-wrapper(# eaf) apply(sanityinc/require-times-wrapper # eaf) require(eaf) eval-buffer(#<buffer load*-747743> nil "/home/superman/.emacs.d/lisp/init-emacs-applicatio..." nil t) ; Reading at buffer position 236 load-with-code-conversion("/home/superman/.emacs.d/lisp/init-emacs-applicatio..." "/home/superman/.emacs.d/lisp/init-emacs-applicatio..." nil t)

(init-emacs-application-framework)

apply(# init-emacs-application-framework nil) (prog1 (apply orig feature args) (if (and (not already-loaded) (memq feature features)) (progn (let ((time (sanityinc/time-subtract-millis (current-time) require-start-time))) (add-to-list 'sanityinc/require-times (list feature require-start-time time) t))))) (let ((already-loaded (memq feature features)) (require-start-time (and (not already-loaded) (current-time)))) (prog1 (apply orig feature args) (if (and (not already-loaded) (memq feature features)) (progn (let ((time (sanityinc/time-subtract-millis ... require-start-time))) (add-to-list 'sanityinc/require-times (list feature require-start-time time) t)))))) sanityinc/require-times-wrapper(# init-emacs-application-framework) apply(sanityinc/require-times-wrapper # init-emacs-application-framework) require(init-emacs-application-framework) eval-buffer(#<buffer load*> nil "/home/superman/.emacs.d/init.el" nil t) ; Reading at buffer position 4392 load-with-code-conversion("/home/superman/.emacs.d/init.el" "/home/superman/.emacs.d/init.el" t t) load("/home/superman/.emacs.d/init" noerror nomessage) startup--load-user-init-file(#f(compiled-function () #<bytecode 0x14816ca61c9984be>) #f(compiled-function () #<bytecode -0x1f3c686ddc0f9b35>) t) command-line() normal-top-level()

manateelazycat commented 2 years ago

json-parse-buffer Emacs 27 就存在了呀,为啥你没有这个函数?

superfpga commented 2 years ago

json-parse-buffer Emacs 27 就存在了呀,为啥你没有这个函数?

是呀,很奇怪,我也查了是从27开始就有,估计是我编译安装时候没有--with-json,我再试试

superfpga commented 2 years ago

json-parse-buffer Emacs 27 就存在了呀,为啥你没有这个函数?

1.卸载emacs28,重新安装emacs27.2,没有报这个错误了 2.再重新安装emacs28,有编译错误,在分析中,json错误应该就是安装有问题 3.eaf还在试用,谢谢猫哥指点

manateelazycat commented 2 years ago

json-parse-buffer Emacs 27 就存在了呀,为啥你没有这个函数?

1.卸载emacs28,重新安装emacs27.2,没有报这个错误了 2.再重新安装emacs28,有编译错误,在分析中,json错误应该就是安装有问题 3.eaf还在试用,谢谢猫哥指点

Enjoy EAF. ;)

iT-Boyer commented 1 year ago

在emacs30中,使用doom方式加载eaf,出现了同样的问题:Debugger entered--Lisp error: (void-function json-parse-buffer) 配置如下:

(use-package! eaf
  :load-path "~/.emacs.d/emacs-application-framework"
...
)

emacs 版本:

brew info emacs 
=> d12frosted/emacs-plus/emacs-plus@30: stable 30.0.50
/opt/homebrew/Cellar/emacs-plus@30/30.0.50 (4,215 files, 207.2MB) *
  Built from source on 2023-03-14 at 14:54:23 with: --with-xwidgets --with-imagemagick
From: https://github.com/d12frosted/homebrew-emacs-plus/blob/HEAD/Formula/emacs-plus@30.rb
==> Dependencies
Build: make ✔, autoconf ✔, gnu-sed ✔, gnu-tar ✔, awk ✔, coreutils ✔, pkg-config ✔, texinfo ✔, xz ✔
Required: gnutls ✔, librsvg ✔, little-cms2 ✔, jansson ✔, tree-sitter ✔
Optional: imagemagick ✔, dbus ✔, mailutils ✘