jxq0 / org-tidy

🧹 An Emacs minor mode to automatically tidy org-mode property drawers
GNU General Public License v3.0
98 stars 7 forks source link

When use org-capture, can't press backspace to delete heading text in capture-buffer #16

Closed owensys closed 9 months ago

owensys commented 9 months ago

message tip is

org-tidy-protected-text-edit: Property drawer is protected in org-tidy mode [5 times]

my org-capture use custom function to insert heading

(defun eye-find-project-path()
  "find location to insert task item,
can not use save-excursion"
  (let* ((proj-files (directory-files (concat org-directory "/projs") t "proj-.*.org$"))
         (select-file (ivy-read "Select project file:" proj-files))
         )
    (find-file select-file)
    (beginning-of-buffer)
    (if (search-forward "* todolist" nil t)
        (progn
          (org-end-of-subtree)
          (newline))
      (progn
        (end-of-buffer)
        (newline)
        (insert "* todolist")
        (newline)
        ))
    ))

(setq org-capture-templates
        '(;; ("i" "Inbox" entry (file+headline eye-org-inbox-path)
          ;;  "** %i%?")
          ("j" "Journal" plain (function eye-find-journal-path)
           "** %i%?")
          ("p" "Project" plain (function eye-find-project-path)
           "** TODO %i%?")
          ))
jxq0 commented 9 months ago

@owensys You can set org-tidy-protect-overlay to nil.