Skip to content

Latest commit

 

History

History
17 lines (15 loc) · 629 Bytes

2021-04-03-2209 Turn org subheading into a new note.org

File metadata and controls

17 lines (15 loc) · 629 Bytes

Turn org subheading into a new note

A quick and easy function to turn the current Org heading into a new note.

(defun efls/zd-org-to-note ()
  "Create new Zetteldeft note from current Org heading.
The heading becomes the title, entry text becomes note content.
Doesn't remove the original Org heading."
  (interactive)
  (let ((title (substring-no-properties (org-get-heading t t t t)))
        (content (substring-no-properties (org-get-entry))))
    (zetteldeft-new-file title)
    (insert content)
    (when (featurep 'evil) (evil-normal-state))))