~l3kn

https://www.leonrische.me

Trackers

~l3kn/org-fc

Last active 3 months ago

#43 org-fc/awk/utils.awk not working on windows 2 months ago

Comment by ~l3kn on ~l3kn/org-fc

Nice that you got it to work!

I now have access to a windows computer and once I have set up Emacs, I can try to reproduce these bugs.

Regarding the error message you're seeing, something similar seems to happen in the org-fc-cache-hashes function when it's used with directories that contain no flashcards. In your case, there are probably some of these in your org-fc-directories list.

#43 org-fc/awk/utils.awk not working on windows 2 months ago

Comment by ~l3kn on ~l3kn/org-fc

If the review history shows up in the dashboard, we at least know that awk is working, maybe there's some issue with find?

The way you are rewriting org-fc-awk--find the paths argument is never used but if the path you set manually is correct, running (org-fc-awk--find '()) by itself should return some list of files.

Will org-fc-awk--pipe work with your redefined commands? It just inserts | characters between the individual arguments so there's a chance that while your overwrites work individually, they won't work when combined by these |.

#38 Support non gawk indexer 3 months ago

Comment by ~l3kn on ~l3kn/org-fc

Currently I have some code that can find all flashcards in a single file.

How many files are you working with? At some point performance will become a problem because opening each file, enabling org-mode and parsing it in Emacs is rather slow.

A variant that allows reviewing only the current buffer would be much easier to implement. Would that already be useful for you or do you want to work with collections of cards spanning >10 or >100 files?

For encrypted files, reviewing them one-by-one (a new review for each buffer) might be the only option.

#43 org-fc/awk/utils.awk not working on windows 3 months ago

Comment by ~l3kn on ~l3kn/org-fc

Where did you get your version of unxutils and when was it last updated? https://en.wikipedia.org/wiki/UnxUtils says it hasn't been updated in 10 years.

#43 org-fc/awk/utils.awk not working on windows 3 months ago

Comment by ~l3kn on ~l3kn/org-fc

If I remember correctly, there are people using org-fc on Windows with MYSYS.

Alternatively if you're not using symlinks, you can remove the "- L" from the find command. As for gawk and srftime, if you want something that works right now, you can just remove the , 1) in the two places it's used in utils.awk and index.awk. Depending on your timezone, that will mess the review statistics in the dashboard but there should be no other effect on org-fc.

Removing strftime from the awk code would have some other benefits but I'm not sure when I'll find the time to look into that.

#43 org-fc/awk/utils.awk not working on windows 3 months ago

Comment by ~l3kn on ~l3kn/org-fc

Ah, I just copied your path into the command but we'll need to use "\" instead of "" in the path. In the current form, it would expect the first "\Us" to be some code for unicode character.

Probably something like this:

(defun org-fc-awk--find (paths)
  (format
   "C:\\Users\\artsi0m\\scoop\\shims\\find.exe -L %s -type f -name \"*.org\" -not -name \".*\" -print0"
   (mapconcat
    (lambda (path) (shell-quote-argument (expand-file-name path)))
    paths " ")))

#43 org-fc/awk/utils.awk not working on windows 3 months ago

Comment by ~l3kn on ~l3kn/org-fc

As a hotfix, you can try overwriting the current code with something like this:

(defun org-fc-awk--find (paths)
  (format
   "C:\Users\artsi0m\scoop\shims\find.exe -L %s -type f -name \"*.org\" -not -name \".*\" -print0"
   (mapconcat
    (lambda (path) (shell-quote-argument (expand-file-name path)))
    paths " ")))

I'm not sure how a more general solution could look like.

#43 org-fc/awk/utils.awk not working on windows 3 months ago

Comment by ~l3kn on ~l3kn/org-fc

Regarding the AWK issue, the documentations lists the function as having 1 to 3 arguments: https://www.gnu.org/software/gawk/manual/html_node/Time-Functions.html#index-strftime_0028_0029-function-_0028gawk_0029

I'd like to remove the date calculations in AWK at some point and pass timestamps from Emacs so the end of a day and the different time-spans can be configured but that will take some time.

The messages look very odd, like one of the commands is interpreting the flags it's getting as files. I suspect it's the find command.

You can try running (shell-command-to-string "find --version") to check if the correct find is being used.

#42 org-fc/:catch: Given parent class eieio-singleton is not a class 3 months ago

Comment by ~l3kn on ~l3kn/org-fc

Thanks for pointing this out! In the Emacs config I was testing this in, eieio-base which provides the eieio-singleton class was already required by another package.

Can you try again? It should be fixed now.

#40 org-fc-review produces "No cards due to review" 4 months ago

Comment by ~l3kn on ~l3kn/org-fc

I've pushed a new version of org-fc that should support different kinds of line endings. You can enable this with (setq org-fc-awk-mixed-line-endings t).

Please let me know if this works for you. With a file where I replaced each "\n" with a "\r\n" setting the variable makes the difference between org-fc not finding any cards and finding the cards but I haven't tried to review them.