diff options
Diffstat (limited to 'org-drill.el')
| -rw-r--r-- | org-drill.el | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/org-drill.el b/org-drill.el index f98bbfe..5037d73 100644 --- a/org-drill.el +++ b/org-drill.el @@ -3986,8 +3986,13 @@ shuffling is done in place." (cond ((and (>= ch ?0) (<= ch ?5)) (let ((current-box + ;; Default to 0 if the property isn't set — `org-entry-get' + ;; returns nil and `string-to-number' would error on nil. + ;; Box 0 is sensible: a downgrade stays at 0, a promotion + ;; goes to 1. (string-to-number - (org-entry-get (point) "DRILL_LEITNER_BOX" nil)))) + (or (org-entry-get (point) "DRILL_LEITNER_BOX" nil) + "0")))) (cond ((or (= ch ?0)) (message "Refiled down to box: 1") |
