Add org-clubhouse-clocked-in-story-id
Add an org-clubhouse-clocked-in-story-id function, for programmatically querying the currently clocked-in clubhouse story ID
This commit is contained in:
		
							parent
							
								
									c033b9161c
								
							
						
					
					
						commit
						24c36b781b
					
				
					 1 changed files with 17 additions and 0 deletions
				
			
		|  | @ -258,6 +258,23 @@ If set to nil, will never create stories with labels") | |||
|   (org-element-extract-clubhouse-id | ||||
|    (org-element-find-headline))) | ||||
| 
 | ||||
| (defun org-clubhouse-clocked-in-story-id () | ||||
|   "Return the clubhouse story-id of the currently clocked-in org entry, if any." | ||||
|   (save-mark-and-excursion | ||||
|     (save-current-buffer | ||||
|       (when (org-clocking-p) | ||||
|         (set-buffer (marker-buffer org-clock-marker)) | ||||
|         (save-restriction | ||||
|           (when (or (< org-clock-marker (point-min)) | ||||
|                     (> org-clock-marker (point-max))) | ||||
|             (widen)) | ||||
|           (goto-char org-clock-marker) | ||||
|           (org-element-clubhouse-id)))))) | ||||
| 
 | ||||
| (comment | ||||
|  (org-clubhouse-clocked-in-story-id) | ||||
|  ) | ||||
| 
 | ||||
| (defun org-element-and-children-at-point () | ||||
|   (let* ((elt (org-element-find-headline)) | ||||
|          (contents-begin (or (plist-get elt :contents-begin) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue