From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Outline and org-mode don't insert text into folded sections logically Date: Sat, 29 Oct 2011 16:10:32 +0200 Message-ID: <877h3n7usn.fsf@gnu.org> References: <1315077299.1785.YahooMailClassic@web121520.mail.ne1.yahoo.com> <837h5nh1df.fsf@yahoo.it> <877h3xibb0.fsf@gnu.org> <81ehy5uy0t.fsf@gmail.com> <87wrbxdter.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([140.186.70.92]:39271) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK9bR-0005kB-S8 for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 10:09:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RK9bP-0003ld-SF for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 10:09:41 -0400 Received: from mail-ww0-f49.google.com ([74.125.82.49]:63168) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RK9bP-0003lS-DA for emacs-orgmode@gnu.org; Sat, 29 Oct 2011 10:09:39 -0400 Received: by wwe3 with SMTP id 3so179283wwe.30 for ; Sat, 29 Oct 2011 07:09:38 -0700 (PDT) In-Reply-To: (suvayu ali's message of "Sun, 23 Oct 2011 04:18:00 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: suvayu ali Cc: emacs-orgmode@gnu.org, Kelly Dean --=-=-= Content-Type: text/plain Hi Suvayu, suvayu ali 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! --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-Prevent-self-insert-command-in-invisible-regions.patch >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 --=-=-= Content-Type: text/plain -- Bastien --=-=-=--