On Jul 7, 2008, at 9:44 AM, Carsten Dominik wrote:
(defun outline-delete-invisible ()
"Delete all text covert by overlays with `invisible' property
`outline'."
(interactive)
(let ((ovls (overlays-in (point-min) (point-max))) o)
(while (setq o (pop ovls))
(and (eq (overlay-get o 'invisible) 'outline))
(delete-region (overlay-start o) (overlay-end o)))))
Do I need to mention that this will be a dangerous operation, deleting
lots of invisible text? You might find out only ater it is too late
to recover.
Even much more dangerous then I thought, the command shown above
actually deletes anything covered by overlays, not only outline
overlays. Just one misplaced parenthesis......
Here is the corrected version.
(defun outline-delete-invisible ()
"Delete all text covered by overlays with `invisible' property
`outline'."
(interactive)
(let ((ovls (overlays-in (point-min) (point-max))) o)
(while (setq o (pop ovls))
(and (eq (overlay-get o 'invisible) 'outline)
(delete-region (overlay-start o) (overlay-end o))))))
_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
Emacs-orgmode@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode