(kill-whole-line) kills folded text if called from column 1
Make sure to unfold text before calling it --
Prevents data loss if user has decided to extract subtree on a folded org headline.
This commit is contained in:
Akash
2024-06-26 00:08:07 +05:30
committed by Dustin Farris
parent bb08be4740
commit f3db974bcc

View File

@ -880,6 +880,7 @@ node."
(org-with-point-at 1 (org-with-point-at 1
(let ((title (nth 4 (org-heading-components))) (let ((title (nth 4 (org-heading-components)))
(tags (org-get-tags))) (tags (org-get-tags)))
(org-fold-show-all)
(kill-whole-line) (kill-whole-line)
(org-roam-end-of-meta-data t) (org-roam-end-of-meta-data t)
(insert "#+title: " title "\n") (insert "#+title: " title "\n")