Comment by ~l3kn on ~l3kn/org-fc
I guess only parsing the org files directly would work in this case.
I'll look into ways of making the indexer more abstract to support this, in addition to your use case with encrypted files it would also be useful for people wanting to try out org-fc without the additional setup of installing gawk.
Comment by ~l3kn on ~l3kn/org-fc
Thanks, that's a good improvement!
I've noticed that there's sometimes review data in my clipboard but I didn't look into causes or alternatives.
Comment by ~l3kn on ~l3kn/org-fc
REPORTED
RESOLVED CLOSED"~l3kn" outgoing@sr.ht writes:
[...]
Does this resolve the issue for you and can I close this ticket?
Yeah this issue has been resolved, as we are closing this ticket, I think it should also be renamed to/add something with
org-indent
since I gave it a misleading name(if possible?) as well as removing my email from the devel mailing list
Comment by ~l3kn on ~l3kn/org-fc
In my org-mode version, the description of the variable
org-indent-mode
reads as though it should not be set manually but rather changed using(org-indent-mode ...)
.It's buffer-local in my org-mode version, maybe in your case it made org-fc think indent-mode was enabled even if it was not.
Does this resolve the issue for you and can I close this ticket?
"~l3kn" outgoing@sr.ht writes:
So with
(org-indent-mode nil)
, you can do reviews but with(org-indent-mode t)
and the no-oporg-fc-indent
, the error is gone but the review still doesn't work? That's very odd.Yeah, in my config I had
(setq org-indent-mode t)
, changing this tonil
fixed my issue[...]
When I find the time, I'll check out the org-mode changelog to see if something changed in the indentation functions org-fc is using.
Okay, thank you for your quick support!
Comment by ~l3kn on ~l3kn/org-fc
So with
(org-indent-mode nil)
, you can do reviews but with(org-indent-mode t)
and the no-oporg-fc-indent
, the error is gone but the review still doesn't work? That's very odd.In my config, I got a hook that sets
(org-indent-mode 1)
in all org-mode buffers and I don't thinkt
versus1
as the argument should make a difference.When I find the time, I'll check out the org-mode changelog to see if something changed in the indentation functions org-fc is using.
"~l3kn" outgoing@sr.ht writes: [...]
Weird that seems to come from
org-indent
, I can't replicate this by disablingorg-indent-mode
in my Emacs.Thank you for your indication to the right direction!
After setting
org-indent-mode nil
everything works properly.Maybe you can replicate it with
org-indent-mode t
? Everytime I enableorg-indent-mode
I can reproduce this. Hope this helps.
org-fc-indent
is a workaround anyway so you could try rewriting(defun org-fc-indent ())
into a function that just does nothing. I tested this out and it produces no errors, although I can't do reviews afterwards.I have used org-fc with Emacs 28, maybe this is caused by a different org-mode version? My
org-version
is 9.6.5.My
org-version
is 9.5.5
Comment by ~l3kn on ~l3kn/org-fc
Weird that seems to come from
org-indent
, I can't replicate this by disablingorg-indent-mode
in my Emacs.
org-fc-indent
is a workaround anyway so you could try rewriting(defun org-fc-indent ())
into a function that just does nothing.I have used org-fc with Emacs 28, maybe this is caused by a different org-mode version? My
org-version
is 9.6.5.
"~l3kn" outgoing@sr.ht writes:
I've just pushed a change the should allow reviewing the
buffer
context through the dashboard.Using the code
org-fc-review-next-card
you provided, thenM-x org-fc-demo
prompts me with aFlashcards are already being reviewd. Resume yes or no
->yes
returns anarrayp
errorDebugger entered--Lisp error: (wrong-type-argument arrayp nil) org-indent-set-line-properties(1 0 t) org-indent-add-properties(1720 2427) (let ((el (org-element-at-point))) (org-indent-add-properties (org-element-property :begin el) (org-element-property :end el))) (if org-indent-mode (let ((el (org-element-at-point))) (org-indent-add-properties (org-element-property :begin el) (org-element-property :end el)))) org-fc-indent() (save-current-buffer (set-buffer (find-file path)) (if resuming nil (if buffer (set (make-local-variable 'org-fc-reviewing-existing-buffer) t) (set (make-local-variable 'org-fc-reviewing-existing-buffer) 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 (org-fc-type-setup-fn type) position))) (run-hooks 'org-fc-after-setup-hook) (let ((flip-fn (org-fc-type-flip-fn type))) (if (or (eq step 'rate) (null flip-fn) (eq flip-fn #'org-fc-noop)) (org-fc-review-rate-mode 1) (org-fc-review-flip-mode 1))))) (let ((buffer (find-buffer-visiting path))) (save-current-buffer (set-buffer (find-file path)) (if resuming nil (if buffer (set (make-local-variable 'org-fc-reviewing-existing-buffer) t) (set (make-local-variable 'org-fc-reviewing-existing-buffer) 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 (org-fc-type-setup-fn type) position))) (run-hooks 'org-fc-after-setup-hook) (let ((flip-fn (org-fc-type-flip-fn type))) (if (or (eq step 'rate) (null flip-fn) (eq flip-fn #'org-fc-noop)) (org-fc-review-rate-mode 1) (org-fc-review-flip-mode 1)))))) (let* ((card (car-safe (let* ((v org-fc-review--session) (x (eieio-oref v ...))) (prog1 x (eieio-oset v 'cards (cdr 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 (make-local-variable 'org-fc-reviewing-existing-buffer) t) (set (make-local-variable 'org-fc-reviewing-existing-buffer) 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 (org-fc-type-setup-fn type) position))) (run-hooks 'org-fc-after-setup-hook) (let ((flip-fn (org-fc-type-flip-fn type))) (if (or (eq step ...) (null flip-fn) (eq flip-fn ...)) (org-fc-review-rate-mode 1) (org-fc-review-flip-mode 1))))))) (if (not (null (eieio-oref org-fc-review--session 'cards))) (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))))))) (message "Review Done") (org-fc-review-quit)) org-fc-review-next-card(resuming) (progn (org-fc-review-edit-mode -1) (org-fc-review-next-card 'resuming)) (if org-fc-review--session (progn (org-fc-review-edit-mode -1) (org-fc-review-next-card 'resuming)) (message "No session to resume to")) org-fc-review-resume() (progn (org-fc-review-resume)) (if (yes-or-no-p "Flashcards are already being reviewed. Resume? ") (progn (org-fc-review-resume))) (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 buffer)) org-fc-review-buffer() (save-current-buffer (set-buffer (find-file path)) (org-fc-review-buffer)) (let ((path (expand-file-name "demo.org" org-fc-source-path))) (save-current-buffer (set-buffer (find-file path)) (org-fc-review-buffer))) org-fc-demo() funcall-interactively(org-fc-demo) call-interactively(org-fc-demo record nil) command-execute(org-fc-demo record) execute-extended-command(nil "org-fc-demo" #("org-fc-demo\n org-fc-demo ..." 11 12 (read-only nil) 12 13 (read-only nil face ivy-current-match help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight display ((space :relative-width 0.1))) 13 14 (read-only nil help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight face (ivy-current-match :inherit all-the-icons-blue :family "FontAwesome" :height 1.0) font-lock-face (:family "FontAwesome" :height 1.14 :inherit all-the-icons-blue) display (raise -0.06) rear-nonsticky t) 14 15 (read-only nil face ivy-current-match help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight) 15 25 (read-only nil help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight face (ivy-current-match ivy-minibuffer-match-face-2)) 25 84 (read-only nil face ivy-current-match help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight) 84 116 (read-only nil help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight face (ivy-current-match all-the-icons-ivy-rich-doc-face)))) funcall-interactively(execute-extended-command nil "org-fc-demo" #("org-fc-demo\n org-fc-demo ..." 11 12 (read-only nil) 12 13 (read-only nil face ivy-current-match help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight display ((space :relative-width 0.1))) 13 14 (read-only nil help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight face (ivy-current-match :inherit all-the-icons-blue :family "FontAwesome" :height 1.0) font-lock-face (:family "FontAwesome" :height 1.14 :inherit all-the-icons-blue) display (raise -0.06) rear-nonsticky t) 14 15 (read-only nil face ivy-current-match help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight) 15 25 (read-only nil help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight face (ivy-current-match ivy-minibuffer-match-face-2)) 25 84 (read-only nil face ivy-current-match help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight) 84 116 (read-only nil help-echo (format (if tooltip-mode "mouse-1: %s\nmouse-3: %s" "mouse-1: %s mouse-3: %s") ivy-mouse-1-tooltip ivy-mouse-3-tooltip) mouse-face ivy-minibuffer-match-highlight face (ivy-current-match all-the-icons-ivy-rich-doc-face)))) call-interactively(execute-extended-command nil nil) command-execute(execute-extended-command)
I get the same error when running
org-fc-dashboard
from insidedemo.org