l3kn / org-fc

Spaced Repetition System for Emacs org-mode
https://www.leonrische.me/fc/index.html
GNU General Public License v3.0
259 stars 31 forks source link

org-fc stop working after update #60

Closed ram535 closed 3 years ago

ram535 commented 3 years ago

This is my configuration:

(use-package org-fc
  :straight
  (org-fc
   :type git :host github :repo "l3kn/org-fc"
   :files (:defaults "awk" "demo.org"))
  :custom
  (org-fc-directories '("~/org/roams")))

This is the error message when starting emacs:

Error (use-package): org-fc/:catch: Symbol’s function definition is void: case

emacs -debug-init message:

Debugger entered--Lisp error: (void-function case)
  (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args))))
  (let ((value (car-safe (prog1 args (setq args (cdr args)))))) (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args)))))
  (let ((keyword (car-safe (prog1 args (setq args (cdr args)))))) (if (symbolp keyword) nil (error "Junk in args %S" args)) (if args nil (error "Keyword %s is missing an argument" keyword)) (let ((value (car-safe (prog1 args (setq args (cdr args)))))) (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args))))))
  (while args (let ((keyword (car-safe (prog1 args (setq args (cdr args)))))) (if (symbolp keyword) nil (error "Junk in args %S" args)) (if args nil (error "Keyword %s is missing an argument" keyword)) (let ((value (car-safe (prog1 args (setq args ...))))) (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args)))))))
  (let (defcustom-args property reader) (while args (let ((keyword (car-safe (prog1 args (setq args ...))))) (if (symbolp keyword) nil (error "Junk in args %S" args)) (if args nil (error "Keyword %s is missing an argument" keyword)) (let ((value (car-safe (prog1 args ...)))) (case keyword (:property (setq property value)) (:reader (setq reader value)) (t (setq defcustom-args (cons value defcustom-args)) (setq defcustom-args (cons keyword defcustom-args))))))) (if property nil (error "Missing keyword :property")) (let ((property-symbol (intern (concat (symbol-name symbol) "-property")))) (list 'progn (cons 'defcustom (cons symbol (cons standard (cons doc defcustom-args)))) (list 'defcustom property-symbol property (format "Headline property for `%s'" symbol) ':type ''string ':group (plist-get defcustom-args :group)) (list 'defun symbol nil (format "Getter for `%s'" symbol) (list 'if-let (list (list 'value (cons ... ...))) '(read value) symbol)))))
  (closure (t) (symbol standard doc &rest args) (let (defcustom-args property reader) (while args (let ((keyword (car-safe ...))) (if (symbolp keyword) nil (error "Junk in args %S" args)) (if args nil (error "Keyword %s is missing an argument" keyword)) (let ((value ...)) (case keyword (:property ...) (:reader ...) (t ... ...))))) (if property nil (error "Missing keyword :property")) (let ((property-symbol (intern (concat ... "-property")))) (list 'progn (cons 'defcustom (cons symbol (cons standard ...))) (list 'defcustom property-symbol property (format "Headline property for `%s'" symbol) ':type ''string ':group (plist-get defcustom-args :group)) (list 'defun symbol nil (format "Getter for `%s'" symbol) (list 'if-let (list ...) '... symbol))))))(org-fc-algo-sm2-ease-min 1.3 "Lower bound for a cards ease." :type 'float :group 'org-fc :property "FC_SM2_EASE_MIN")
  (org-fc-property org-fc-algo-sm2-ease-min 1.3 "Lower bound for a cards ease." :type 'float :group 'org-fc :property "FC_SM2_EASE_MIN")
  eval-buffer(#<buffer  *load*-519315> nil "/home/last/.emacs.d/straight/build/org-fc/org-fc-a..." nil t)  ; Reading at buffer position 2623
  load-with-code-conversion("/home/last/.emacs.d/straight/build/org-fc/org-fc-a..." "/home/last/.emacs.d/straight/build/org-fc/org-fc-a..." nil t)
  require(org-fc-algo-sm2)
  eval-buffer(#<buffer  *load*-690040> nil "/home/last/.emacs.d/straight/build/org-fc/org-fc.e..." nil t)  ; Reading at buffer position 27624
  load-with-code-conversion("/home/last/.emacs.d/straight/build/org-fc/org-fc.e..." "/home/last/.emacs.d/straight/build/org-fc/org-fc.e..." t t)
  require(org-fc nil t)
  (not (require 'org-fc nil t))
  (if (not (require 'org-fc nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-fc) :error))
  (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(org-fc-directories '("~/org/roams") nil nil "Customized with use-package org-fc"))) (if (not (require 'org-fc nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-fc) :error)))
  (condition-case err (progn (let ((custom--inhibit-theme-enable nil)) (if (memq 'use-package custom-known-themes) nil (custom-declare-theme 'use-package 'use-package-theme nil) (enable-theme 'use-package) (setq custom-enabled-themes (remq 'use-package custom-enabled-themes))) (custom-theme-set-variables 'use-package '(org-fc-directories '("~/org/roams") nil nil "Customized with use-package org-fc"))) (if (not (require 'org-fc nil t)) (display-warning 'use-package (format "Cannot load %s" 'org-fc) :error))) ((debug error) (funcall use-package--warning58 :catch err)))
  eval-buffer(#<buffer  *load*> nil "/home/last/.emacs.d/init.el" nil t)  ; Reading at buffer position 32960
  load-with-code-conversion("/home/last/.emacs.d/init.el" "/home/last/.emacs.d/init.el" t t)
  load("/home/last/.emacs.d/init" noerror nomessage)
  startup--load-user-init-file(#f(compiled-function () #<bytecode 0xf94cfab52d7d307>) #f(compiled-function () #<bytecode 0x81a386fa1b19353>) t)
  command-line()
  normal-top-level()
l3kn commented 3 years ago

This might be related to the deprecation of cl.el, which version of Emacs are you using? I'm working on an update to org-fc and I'll include a fix for this.

ram535 commented 3 years ago

GNU Emacs 28.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.22.30, cairo version 1.15.10) of 2020-03-09

l3kn commented 3 years ago

I've replace all uses of case with the most recent commit, can you check if that fixes your issue?

ram535 commented 3 years ago

It fixed the issue. Thanks.