~mesaoptimizer

https://mesaoptimizer.com


#41 uA newline between an org heading and the `:PROPERTIES:` line results in org-fc failing to find the card during review 6 months ago

Ticket created by ~mesaoptimizer on ~l3kn/org-fc

The intended behavior would be something like agnosticism to whether there's a newline or not between the heading and the PROPERTIES drawer, since it seems like drawers aren't needed to be immediately after the heading.

Here's a minimum working example:

* not working flashcard :fc:

:PROPERTIES:
:FC_CREATED: 2024-01-17T12:36:02Z
:FC_TYPE:  normal
:ID:       e2948047-7a9e-4f4c-a85e-dec3d0ec8a8d
:END:
:REVIEW_DATA:
| position | ease | box | interval | due                  |
|----------+------+-----+----------+----------------------|
| front    |    0 |   0 |      1.5 | 2024-01-14T00:36:02Z |
:END:
answer

Here's the error message I get after enabling toggle-debug-on-error and running org-fc-review and selecting the buffer option:

Debugger entered--Lisp error: (error "ID e2948047-7a9e-4f4c-a85e-dec3d0ec8a8d not found ...")
  signal(error ("ID e2948047-7a9e-4f4c-a85e-dec3d0ec8a8d not found ..."))
  (condition-case err (let* ((card (car-safe (let* ((v org-fc-review--session) (x ...)) (prog1 x (eieio-oset v ... ...))))) (path (plist-get card :path)) (id (plist-get card :id)) (type (plist-get card :type)) (position (plist-get card :position))) (let* ((v org-fc-review--session)) (eieio-oset v 'current-item card)) (let ((buffer (find-buffer-visiting path))) (save-current-buffer (set-buffer (find-file path)) (if resuming nil (if buffer (set (make-local-variable ...) t) (set (make-local-variable ...) nil)) (org-fc-set-header-line)) (goto-char (point-min)) (org-fc-id-goto id path) (org-fc-indent) (org-reveal) (org-fc-narrow) (org-fc-hide-keyword-times) (org-fc-hide-drawers) (org-fc-show-latex) (org-display-inline-images) (run-hooks 'org-fc-before-setup-hook) (setq org-fc-review--timestamp (time-to-seconds (current-time))) (let ((step (funcall ... position))) (run-hooks 'org-fc-after-setup-hook) (let ((flip-fn ...)) (if (or ... ... ...) (org-fc-review-rate-mode 1) (org-fc-review-flip-mode 1))))))) (error (org-fc-review-quit) (signal (car err) (cdr err))))
  (if (not (null (eieio-oref org-fc-review--session 'cards))) (condition-case err (let* ((card (car-safe (let* (... ...) (prog1 x ...)))) (path (plist-get card :path)) (id (plist-get card :id)) (type (plist-get card :type)) (position (plist-get card :position))) (let* ((v org-fc-review--session)) (eieio-oset v 'current-item card)) (let ((buffer (find-buffer-visiting path))) (save-current-buffer (set-buffer (find-file path)) (if resuming nil (if buffer (set ... t) (set ... nil)) (org-fc-set-header-line)) (goto-char (point-min)) (org-fc-id-goto id path) (org-fc-indent) (org-reveal) (org-fc-narrow) (org-fc-hide-keyword-times) (org-fc-hide-drawers) (org-fc-show-latex) (org-display-inline-images) (run-hooks 'org-fc-before-setup-hook) (setq org-fc-review--timestamp (time-to-seconds (current-time))) (let ((step ...)) (run-hooks 'org-fc-after-setup-hook) (let (...) (if ... ... ...)))))) (error (org-fc-review-quit) (signal (car err) (cdr err)))) (message "Review Done") (org-fc-review-quit))
  org-fc-review-next-card()
  (progn (setq org-fc-review--session (org-fc-make-review-session cards)) (run-hooks 'org-fc-before-review-hook) (org-fc-review-next-card))
  (if (null cards) (message "No cards due right now") (progn (setq org-fc-review--session (org-fc-make-review-session cards)) (run-hooks 'org-fc-before-review-hook) (org-fc-review-next-card)))
  (let* ((index (org-fc-index context)) (cards (org-fc-index-filter-due index))) (if org-fc-shuffle-positions (setq cards (org-fc-index-shuffled-positions cards)) (setq cards (org-fc-index-positions cards))) (if (null cards) (message "No cards due right now") (progn (setq org-fc-review--session (org-fc-make-review-session cards)) (run-hooks 'org-fc-before-review-hook) (org-fc-review-next-card))))
  (if org-fc-review--session (if (yes-or-no-p "Flashcards are already being reviewed. Resume? ") (progn (org-fc-review-resume))) (let* ((index (org-fc-index context)) (cards (org-fc-index-filter-due index))) (if org-fc-shuffle-positions (setq cards (org-fc-index-shuffled-positions cards)) (setq cards (org-fc-index-positions cards))) (if (null cards) (message "No cards due right now") (progn (setq org-fc-review--session (org-fc-make-review-session cards)) (run-hooks 'org-fc-before-review-hook) (org-fc-review-next-card)))))
  org-fc-review((:paths "/home/mesa/org/temp.org" :filter nil))
  funcall-interactively(org-fc-review (:paths "/home/mesa/org/temp.org" :filter nil))
  call-interactively(org-fc-review record nil)
  command-execute(org-fc-review record)
  execute-extended-command(nil "org-fc-review" nil)
  funcall-interactively(execute-extended-command nil "org-fc-review" nil)
  call-interactively(execute-extended-command)
  god-mode-self-insert()
  funcall-interactively(god-mode-self-insert)
  call-interactively(god-mode-self-insert nil nil)
  command-execute(god-mode-self-insert)

And here's the echo area message I get: condition-case: ID e2948047-7a9e-4f4c-a85e-dec3d0ec8a8d not found in /home/mesa/org/temp.org

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

Comment by ~mesaoptimizer on ~l3kn/org-fc

For what its worth, I use OpenBSD and org-fc ran fine on it after installing gawk. I don't recall fiddling with anything to make it work out of the box.

#8 Moderation? 6 months ago

Comment by ~mesaoptimizer on ~mlb/linkhut

I've decided to switch to buku after seeing the kinkspam that this user decided to throw onto the frontpage. Just a heads up.

Also take a look at the tags list on the front page -- it is filled with kink-related tags.