REF put logbook deleter in terms of org-ml
This commit is contained in:
parent
261cfa4fb9
commit
2226c6371b
|
@ -966,18 +966,10 @@ don't log changes in the logbook."
|
||||||
(defun org-x-log-delete ()
|
(defun org-x-log-delete ()
|
||||||
"Delete logbook drawer of subtree."
|
"Delete logbook drawer of subtree."
|
||||||
(interactive)
|
(interactive)
|
||||||
(save-excursion
|
(let ((config (org-x-logbook-config)))
|
||||||
;; TODO redefine in terms of org-ml
|
(org-ml-update-this-headline*
|
||||||
(goto-char (org-log-beginning))
|
(->> (org-ml-headline-set-logbook-clocks config nil it)
|
||||||
(when (save-excursion
|
(org-ml-headline-set-logbook-items config nil)))))
|
||||||
(save-match-data
|
|
||||||
(beginning-of-line 0)
|
|
||||||
(search-forward-regexp org-drawer-regexp)
|
|
||||||
(goto-char (match-beginning 1))
|
|
||||||
(looking-at "LOGBOOK")))
|
|
||||||
(org-mark-element)
|
|
||||||
(delete-region (region-beginning) (region-end))
|
|
||||||
(org-remove-empty-drawer-at (point)))))
|
|
||||||
|
|
||||||
(defun org-x-clock-range (&optional arg)
|
(defun org-x-clock-range (&optional arg)
|
||||||
"Add a completed clock entry to the current heading.
|
"Add a completed clock entry to the current heading.
|
||||||
|
|
Loading…
Reference in New Issue