summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2022-09-27 20:31:27 +0200
committerLeon Rische <leon.rische@me.com>2022-09-27 20:31:27 +0200
commit973a16a9561f1ed2fd7e4c5c614b5e5d15715b12 (patch)
treee328ad6e1018110f2b7b8ad4f9f796bd41ba53ea
parente31fada906bbcdebc4f0fd88b68f9921264726c0 (diff)
Make audio play command interactive
-rw-r--r--docs/extensions.org3
-rw-r--r--org-fc-audio.el7
2 files changed, 10 insertions, 0 deletions
diff --git a/docs/extensions.org b/docs/extensions.org
index dbe6f22..148e731 100644
--- a/docs/extensions.org
+++ b/docs/extensions.org
@@ -21,6 +21,9 @@ Each time an audio file is played, it's path is stored in
~org-fc-audio-last-file~ and can be replayed using
~org-fc-audio-replay~ or ~org-fc-audio-replay-slow~.
+When browsing cards outside of a review,
+their audio files can be played with ~org-fc-audio-play~.
+
* ~org-fc-keymap-hint~
Can be enabled with ~(require 'org-fc-keymap-hint)~.
diff --git a/org-fc-audio.el b/org-fc-audio.el
index 2774603..bd2569f 100644
--- a/org-fc-audio.el
+++ b/org-fc-audio.el
@@ -76,6 +76,13 @@
"Play the audio of the current card.
Look up the file from PROPERTY. If SPEED is non-nil, play back
the file at the given speed."
+ (interactive
+ (list
+ (completing-read
+ "Type: "
+ `(,org-fc-audio-before-setup-property
+ ,org-fc-audio-after-setup-property
+ ,org-fc-audio-after-flip-property))))
(if-let ((file (org-entry-get (point) property)))
(org-fc-audio-play-file file (or speed 1.0))))