~l3kn/org-fc

973a16a9561f1ed2fd7e4c5c614b5e5d15715b12 — Leon Rische 5 months ago e31fada main
Make audio play command interactive
2 files changed, 10 insertions(+), 0 deletions(-)

M docs/extensions.org
M org-fc-audio.el
M docs/extensions.org => docs/extensions.org +3 -0
@@ 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)~.


M org-fc-audio.el => org-fc-audio.el +7 -0
@@ 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))))