Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to warn against deleting folded subtree in org-mode?

Tags:

emacs

org-mode

I'm editing content in emacs org-mode and using the header structure in both folded and unfolded modes. In editing, though, I'm worried I will accidentally delete a folded subtree containing content.

Is there a way to get org-mode to warn me before deleting a folded subtree containing hidden content?

like image 793
incandescentman Avatar asked Jan 28 '13 22:01

incandescentman


People also ask

What are org mode files?

Org Mode (also: org-mode; /ˈɔːrɡ moʊd/) is a document editing, formatting, and organizing mode, designed for notes, planning, and authoring within the free software text editor Emacs.

How do I use org Mode in Emacs?

To save the document, either press the save icon, or press C-x C-s, call it 1.org. Emacs does not actually understand you are editing an Org document, yet. To enable Org mode on your current document, type M-x org-mode which will enable the Org mode on the current document. Those are minuses, not underscores.


1 Answers

See the following variables to protect hidden trees under some circumstances:

org-catch-invisible-edits
org-ctrl-k-protect-subtree

Note however that those will not protect hidden trees from being killed by, e.g., C-w (kill-region).

like image 160
YoungFrog Avatar answered Oct 13 '22 00:10

YoungFrog