feat: support updating the story title

Defines an 'org-clubhouse-update-story-title' interactive function. Can
only be invoked if cursor is over the Headline title

fixes string-to-int -> string-to-number (unsupported as of Emacs 26)
This commit is contained in:
Alex Dao 2018-03-26 22:25:30 -04:00 committed by Alex Dao
parent c4096e5dbb
commit 1d7734ce32

View file

@ -585,6 +585,18 @@ If the stories already have a CLUBHOUSE-ID, they are filtered and ignored."
;;; Story updates
;;;
(defun org-clubhouse-update-story-title ()
(interactive)
(when-let (clubhouse-id (org-element-clubhouse-id))
(let* ((elt (org-element-find-headline))
(title (plist-get elt :title)))
(org-clubhouse-update-story-internal
clubhouse-id
:name title)
(message "Successfully updated story title to \"%s\""
title))))
(cl-defun org-clubhouse-update-story-internal
(story-id &rest attrs)
(assert (and (integerp story-id)