From 442f30b74f3f4eb888b63cb5d2cd04542952f84a Mon Sep 17 00:00:00 2001 From: Bastien Guerry Date: Sat, 22 Oct 2011 15:50:52 +0200 Subject: [PATCH] Prevent `self-insert-command' in invisible regions. * org.el (org-self-insert-command): Throw an error when the user is trying to use self-insert-command in invisible regions. --- lisp/org.el | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index d82ae0c..627faa3 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -17328,6 +17328,9 @@ If the cursor is in a table looking at whitespace, the whitespace is overwritten, and the table is not marked as requiring realignment." (interactive "p") (cond + ((eq (car (get-char-property-and-overlay + (point) 'invisible)) 'outline) + (error "Attempt to edit an invisible part of the buffer")) ((and org-use-speed-commands (setq org-speed-command (run-hook-with-args-until-success -- 1.7.6.1