about summary refs log tree commit diff
path: root/org-clubhouse.el
diff options
context:
space:
mode:
Diffstat (limited to 'org-clubhouse.el')
-rw-r--r--org-clubhouse.el13
1 files changed, 11 insertions, 2 deletions
diff --git a/org-clubhouse.el b/org-clubhouse.el
index dd5e73ea8215..e82cd48d02a4 100644
--- a/org-clubhouse.el
+++ b/org-clubhouse.el
@@ -997,9 +997,8 @@ which labels to set."
                     "\n")
        ""))))
 
-(defun org-clubhouse-headline-from-story (level story-id)
+(defun org-clubhouse-headline-from-story-id (level story-id)
   "Create a single `org-mode' headline at LEVEL based on the given clubhouse STORY-ID."
-
   (interactive "*nLevel: \nnStory ID: ")
   (let* ((story (org-clubhouse-get-story story-id)))
     (if (equal '((message . "Resource not found.")) story)
@@ -1050,6 +1049,16 @@ resulting stories at headline level LEVEL."
             :action (lambda (s) (funcall cb (get-text-property 0 'story s)))
             :require-match t))
 
+(defun org-clubhouse-headline-from-story (level)
+  "Prompt for a story, and create an org headline at LEVEL from that story."
+  (interactive "*nLevel: ")
+  (org-clubhouse-prompt-for-story
+   (lambda (story)
+     (save-mark-and-excursion
+       (insert (org-clubhouse--story-to-headline-text level story))
+       (org-align-tags)))))
+
+
 (defun org-clubhouse-link ()
   "Link the current `org-mode' headline with an existing clubhouse story."
   (interactive)