From mboxrd@z Thu Jan 1 00:00:00 1970 From: suvayu ali Subject: Re: Outline and org-mode don't insert text into folded sections logically Date: Sun, 23 Oct 2011 04:18:00 +0200 Message-ID: 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=0015174bf23692574804afedebcf Return-path: Received: from eggs.gnu.org ([140.186.70.92]:52964) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHndp-0002mK-CN for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 22:18:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RHndn-0005yk-7O for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 22:18:25 -0400 Received: from mail-bw0-f41.google.com ([209.85.214.41]:60117) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RHndm-0005ye-Rh for emacs-orgmode@gnu.org; Sat, 22 Oct 2011 22:18:23 -0400 Received: by bkbzu5 with SMTP id zu5so7495748bkb.0 for ; Sat, 22 Oct 2011 19:18:21 -0700 (PDT) In-Reply-To: <87wrbxdter.fsf@gnu.org> 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: Bastien Cc: emacs-orgmode@gnu.org, Kelly Dean --0015174bf23692574804afedebcf Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Hi Bastien, A few comments. I have also attached a small test file. On Sat, Oct 22, 2011 at 15:53, Bastien wrote: > > Here is a dummy patch that prevents the user from editing invisible > parts of the buffer. =C2=A0It doesn't prevent query-and-replace commands. > > Can people test it and comment it? > > Maybe throwing an error is a bit too much. =C2=A0Maybe preventing all > kind of edition in invisible parts of the buffer is too much as > well -- looking forward reading comments on this. > Using org-reveal might be better. I see that org-reveal works for lists but not for headlines or folded src_blocks (is that a regression?). If not, something with similar functionality for headlines and src_blocks would be great. Now about something more subtle and open to subjective opinion. In the example file, if you go to the beginning of a folded headline / list / src_block and hit C-e, this should take you to the end of the ellipsis. Now attempting to edit should either throw an error or unfold the item (depending on whether you have the patch as is or with my proposal). However if you press the cursor key to the right once after the C-e in the last step, then you end up after the ellipsis and inserting text is possible. The inserted text is placed right above the next entry. So in the attached test file, if you do this with the first headline the inserted text will be right before the second headline. In my opinion this means the problem would still exist. I don't understand overlays very well, but I was thinking if it could be resolved by adding a new line to the ellipsis. I customised org-ellipsis accordingly, although this didn't solve the problem it made it more obvious when I edited the folded entry inadvertently. I am not sure what would be an appropriate solution here. If there was a way to determine if you are inside a folded entity instead of testing for invisibility of `point' it might be better (maybe test if there is an overlayed ellipsis?). > Thanks, Hope these comments help. --=20 Suvayu Open source is the future. It sets us free. --0015174bf23692574804afedebcf Content-Type: text/x-org; charset=US-ASCII; name="invisible-test.org" Content-Disposition: attachment; filename="invisible-test.org" Content-Transfer-Encoding: base64 X-Attachment-Id: f_gu3emomo1 IytTVEFSVFVQOiBvdmVydmlldwoKKiBUaGlzIGlzIDFzdCBoZWFkbGluZQoqKiBTb21lIHN1Yi1o ZWFkaW5nCkZvbGxvd2VkIGJ5IHNvbWUgdGV4dAoKKyBNYXliZSBhIGxpc3Qgc29tZSBtdWx0aWxp bmUgY29udGVudCwgbGV0cyBzYXkgYSBjb2RlIGJsb2NrLgogICMrYmVnaW5fc3JjIHNoIDpldmFs IG5vCiAgICBlY2hvICJUaGlzIGlzICRVU0VSIHRlc3Rpbmcgb3JnIgogICMrZW5kX3NyYworIFNl Y29uZCBpdGVtIGluIHRoZSBsaXN0CgoqIFRleHQgaW5zZXJ0ZWQgYmVmb3JlIHRoZSAybmQgaGVh ZGxpbmUKV2l0aCBzb21lIHRleHQgdW5kZXJuZWF0aAoK --0015174bf23692574804afedebcf--