when installing activtiy-watch-mode from melpa on a vanilla emacs (nothing else installed) an error happens, the debugger gives the following stack trace:
Debugger entered--Lisp error: (void-function json-encode) json-encode(((hostname . "l191") (client . "emacs-activity-watch") (type . "app.editor.activity"))) activity-watch--create-bucket() activity-watch--call() activity-watch--save() apply(activity-watch--save nil) timer-event-handler([t 23741 49114 0 2 activity-watch--save nil nil 0])
Adding a (require 'json) with the requirements fixes this error.
Steps to reproduce
Make new emacs home
mkdir emhome
export HOME=path/to/emhome
(setq debug-on-error t)
(global-activity-watch-mode)
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(package-selected-packages (quote (activity-watch-mode))))
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
)`
Start emacs in shell with modifed home and open a file
Hello
when installing activtiy-watch-mode from melpa on a vanilla emacs (nothing else installed) an error happens, the debugger gives the following stack trace:
Debugger entered--Lisp error: (void-function json-encode) json-encode(((hostname . "l191") (client . "emacs-activity-watch") (type . "app.editor.activity"))) activity-watch--create-bucket() activity-watch--call() activity-watch--save() apply(activity-watch--save nil) timer-event-handler([t 23741 49114 0 2 activity-watch--save nil nil 0])
Adding a (require 'json) with the requirements fixes this error.Steps to reproduce
`(setq package-archives '(("gnu" . "https://elpa.gnu.org/packages/") ("melpa" . "https://melpa.org/packages/"))) (package-initialize)
(let ((pkgs-to-install (seq-remove 'package-installed-p '(activity-watch-mode json)))) (when pkgs-to-install (package-refresh-contents) (dolist (pkg pkgs-to-install) (package-install pkg))))
(setq debug-on-error t) (global-activity-watch-mode) (custom-set-variables ;; custom-set-variables was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. '(package-selected-packages (quote (activity-watch-mode)))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. ;; Your init file should contain only one such instance. ;; If there is more than one, they won't work right. )`