[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/org-drill 9555e487d4 143/251: Fix presentation-in-buffer
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/org-drill 9555e487d4 143/251: Fix presentation-in-buffer |
Date: |
Mon, 17 Jan 2022 18:59:10 -0500 (EST) |
branch: elpa/org-drill
commit 9555e487d4a952365638fc567c09439931a60bc3
Author: Phillip Lord <phillip.lord@russet.org.uk>
Commit: Phillip Lord <phillip.lord@russet.org.uk>
Fix presentation-in-buffer
---
org-drill.el | 34 +++++++++++++++++++---------------
1 file changed, 19 insertions(+), 15 deletions(-)
diff --git a/org-drill.el b/org-drill.el
index d829e5766d..dea4af2a97 100644
--- a/org-drill.el
+++ b/org-drill.el
@@ -646,7 +646,10 @@ for review unless they were already reviewed in the recent
past?"
:documentation "An org-drill session object carries data about
the current state of a particular org-drill session." )
+
+(defvar org-drill-current-session nil)
(defvar org-drill-last-session nil)
+(defvar org-drill-presentation-exit-kind nil)
(defvar org-drill-scheduling-properties
'("LEARN_DATA" "DRILL_LAST_INTERVAL" "DRILL_REPEATS_SINCE_FAIL"
@@ -1783,29 +1786,28 @@ Consider reformulating the item to make it easier to
remember.\n"
(defun org-drill-response-rtn ()
(interactive)
- (message "response-rtn")
- (setq drill-typed-answer (buffer-string)
- exit-kind t)
+ (setq drill-typed-answer (buffer-string))
+ (setq org-drill-presentation-exit-kind t)
(org-drill-response-complete))
(defun org-drill-response-quit ()
(interactive)
- (setq exit-kind 'quit)
+ (setq org-drill-presentation-exit-kind 'quit)
(org-drill-response-complete))
(defun org-drill-response-edit ()
(interactive)
- (setq exit-kind 'edit)
+ (setq org-drill-presentation-exit-kind 'edit)
(org-drill-response-complete))
(defun org-drill-response-skip ()
(interactive)
- (setq exit-kind 'skip)
+ (setq org-drill-presentation-exit-kind 'skip)
(org-drill-response-complete))
(defun org-drill-response-tags ()
(interactive)
- (setq exit-kind 'tags)
+ (setq org-drill-presentation-exit-kind 'tags)
(org-drill-response-complete))
(defun org-drill-response-get-buffer-create ()
@@ -1849,15 +1851,17 @@ Consider reformulating the item to make it easier to
remember.\n"
#'org-drill-presentation-minibuffer-timer-function
item-start-time full-prompt)
org-drill-presentation-timer-calls 0)
- (let ((exit-kind)
- (buf
+ (save-window-excursion
+ (let ((buf
(org-drill-response-get-buffer-create)))
- (save-window-excursion
- (select-window
- (display-buffer-below-selected buf nil))
- (recursive-edit)
- (org-drill-presentation-timer-cancel)
- exit-kind))))
+ (select-window
+ (display-buffer-below-selected buf nil))
+ ;; Store the current session in a variable, so that it can
+ ;; be picked up by the when we leave the buffer
+ (setq-local org-drill-current-session session)
+ (recursive-edit)
+ (org-drill-presentation-timer-cancel)
+ org-drill-presentation-exit-kind))))
(cl-defun org-drill-presentation-prompt-for-string (prompt)
"Create a card prompt with a timer and user-specified menu.
- [nongnu] elpa/org-drill 6959903b99 113/251: Explain status of fork, (continued)
- [nongnu] elpa/org-drill 6959903b99 113/251: Explain status of fork, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 507daae5a2 128/251: Remove org-drill-session-qualities, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 0e89d9a638 134/251: Remove more variables, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill a803289de9 137/251: Remove last of earmuff variables, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill df13d89a4c 119/251: Add interactive test functions, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill d37519f54c 147/251: Clean up robot testing, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 9fa9b6eabf 148/251: Robot test all card types, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 500d1475c3 120/251: Add count entries test, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill c1c57adea9 133/251: Remove dormant-entry-count, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill a923ba2c90 145/251: Move exit-kind to slot, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 9555e487d4 143/251: Fix presentation-in-buffer,
ELPA Syncer <=
- [nongnu] elpa/org-drill 0286de5402 139/251: Remove unneed form, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill ba0a346583 125/251: Removed generated file, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill ffc04493f8 136/251: Remove more variables, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill d47080e3bc 121/251: Remove generated file, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill fd3efa233e 127/251: Port to cl-lib, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill c49af4a9b3 155/251: Replace more non-namespaced commands, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 118e76ff9c 154/251: Replace more non-namespaced command, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 20c90836aa 169/251: Speed up robot tests with polling, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 1801524221 178/251: Fix call to format, ELPA Syncer, 2022/01/17
- [nongnu] elpa/org-drill 2f056255e6 192/251: Re-namespace with-hidden-cloze-text, ELPA Syncer, 2022/01/17