diff options
author | Leon Rische <leon.rische@me.com> | 2020-07-03 14:57:01 +0200 |
---|---|---|
committer | Leon Rische <leon.rische@me.com> | 2020-07-03 14:57:01 +0200 |
commit | af7b174f4ba5211c3307b9797d9eb64d06707f01 (patch) | |
tree | 46c5dee9748c7432aec9501c4c3df29d0e17daa7 /org-fc.el | |
parent | 23312e4eb456df67eea5954d5aa206fad300d59d (diff) |
Add a scope argument to `org-fc-map-cards`
Diffstat (limited to 'org-fc.el')
-rw-r--r-- | org-fc.el | 14 |
1 files changed, 10 insertions, 4 deletions
@@ -1142,11 +1142,17 @@ Only parent headings of the current heading remain visible." ;;; Updating Cards -(defun org-fc-map-cards (fn) - "Call FN for each flashcard headline in the current buffer. -FN is called with point at the headline and no arguments." +(defun org-fc-map-cards (fn &optional scope) + "Call FN for each flashcard headline in SCOPE. +FN is called with point at the headline and no arguments. +If SCOPE is nil, it defaults to the full buffer. +Other useful values are: +- tree +- region" (org-map-entries - (lambda () (if (org-fc-entry-p) (funcall fn))))) + (lambda () (if (org-fc-entry-p) (funcall fn))) + nil + scope)) ;;;###autoload (defun org-fc-update () |