Hi Suvayu,

suvayu ali <fatkasuvayu+li...@gmail.com> writes:

> A few comments. I have also attached a small test file.

thanks for the comments.   Can you try the updated patch?
It will take care of unfold the invisible part of the buffer
when trying to edit _in_ it and _right after it_.

As for `org-reveal', please report a bug if it doesn't work
as expected in specific parts of the buffer.

Thanks for your useful comments!

>From 442f30b74f3f4eb888b63cb5d2cd04542952f84a Mon Sep 17 00:00:00 2001
From: Bastien Guerry <b...@altern.org>
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

-- 
 Bastien

Reply via email to