l3kn / org-fc

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

Error after updating #37

Closed ram535 closed 4 years ago

ram535 commented 4 years ago

I am having this error after updating.

Error (use-package): org-fc/:config: Cannot open load file: No such file or directory, org-fc-hydra
(use-package hydra)

(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"))
  :config
  (require 'org-fc-hydra))
l3kn commented 4 years ago

I've moved org-fc-hydra.el to the contrib/ folder. I was expecting that to be handled by :defaults, can you try if :files (:defaults "contrib" "awk" "demo.org") works?

wedens commented 4 years ago

This recipe should work: (:host github :repo "l3kn/org-fc" :files (:defaults "awk" "demo.org" "contrib/*.el"))

l3kn commented 4 years ago

"contrib/*.el" is even better, I've updated the installation instructions.

ram535 commented 4 years ago

With the new instructions, I get this error:

Warning (initialization): An error occurred while loading ‘/home/last/.emacs.d/init.el’:

error: org-fc-keymap-hint.el:0:0: error: scan-error: (Unbalanced parentheses 1915 2368)

To ensure normal operation, you should investigate and remove the
cause of the error in your initialization file.  Start Emacs with
the ‘--debug-init’ option to view a complete error backtrace.
l3kn commented 4 years ago

I've checked the file and there are no unbalanced parentseses anymore. Maybe straight isn't using the most recent commit?

I'll try installing it with a minimal configuration later

wedens commented 4 years ago

@ram535 see https://github.com/l3kn/org-fc/issues/38. It was fixed recently.

ram535 commented 4 years ago

I had to deleted manually the repo and the compile directory and the build-cache.el. And now no errors are shown.

When doing org-fc-demo. image

After typing yes.

image

When doing org-fc-review buffer.

image

yosevu commented 4 years ago

Is there an equivalent way to fix this with just use-package without the :type and :files keywords? I'm not using straight.el and just copied the files to the org-fc root for now.

Error in private config: config.el, (file-missing Cannot open load file No such file or directory org-fc-hydra)

l3kn commented 4 years ago

@ram535 I haven't set up straight.el to replicate this yet, but I've pushed a change that includes the awk output in the lisp error message.

Can you try again with the latest commit and let me know which error you get?

@yosevu I'm not sure, for now I've moved all files from the contrib/ folder to the root folder so the requires should work again.

ram535 commented 4 years ago
Followed link to /home/last/.emacs.d/straight/repos/org-fc/demo.org
org-fc-awk-index-paths: org-fc shell error: gawk: /home/last/.emacs.d/straight/build/org-fc/awk/utils.awk:43:     ts = mktime(time, 1);
gawk: /home/last/.emacs.d/straight/build/org-fc/awk/utils.awk:43:                        ^ 2 is invalid as number of arguments for mktime
l3kn commented 4 years ago

Which version of gawk are you using? (gawk -V)

mktime is documented as taking two arguments: https://www.gnu.org/software/gawk/manual/html_node/Time-Functions.html

ram535 commented 4 years ago

GNU Awk 4.1.4, API: 1.1 (GNU MPFR 4.0.1, GNU MP 6.1.2)

l3kn commented 4 years ago

My gawk version is GNU Awk 5.1.0, API: 3.0 (GNU MPFR 4.0.2, GNU MP 6.2.0)

Is there a way to for you to update your version? If not, we'll have to find a workaround.

Timestamps are parsed in awk because it's notably faster than parsing them in EmacsLisp, but once org-fc has some caching built in that becomes less important.

ram535 commented 4 years ago

It worked after installing gawk 5.1.0 from source.

Just a little detail. When reviewing the demo the hydra doesn't appear like showed in the readme. image

ram535 commented 4 years ago

Never mind. I saw the documentation and saw that I need to add (require 'org-fc-keymap-hint) to see the hydra. Thanks.

l3kn commented 4 years ago

I'm glad it works now.

The image in the review is from a previous version, I'll change it once the demo file is updated.