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:
		
							parent
							
								
									c4096e5dbb
								
							
						
					
					
						commit
						1d7734ce32
					
				
					 1 changed files with 12 additions and 0 deletions
				
			
		| 
						 | 
					@ -585,6 +585,18 @@ If the stories already have a CLUBHOUSE-ID, they are filtered and ignored."
 | 
				
			||||||
;;; Story updates
 | 
					;;; 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
 | 
					(cl-defun org-clubhouse-update-story-internal
 | 
				
			||||||
    (story-id &rest attrs)
 | 
					    (story-id &rest attrs)
 | 
				
			||||||
  (assert (and (integerp story-id)
 | 
					  (assert (and (integerp story-id)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue