From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Wales Subject: Re: Backspacing into folded items Date: Fri, 3 Sep 2010 08:44:54 -0700 Message-ID: References: <4C7598F2.7050200@os.inf.tu-dresden.de> <4C80FADF.5030607@easy-emacs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Received: from [140.186.70.92] (port=41864 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrYRs-0001fB-Ez for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 11:45:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrYRq-0007ks-Tf for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 11:45:03 -0400 In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Lennart Borgman Cc: Bastien , Martin Pohlack , Emacs developers , emacs-orgmode@gnu.org, David Abrahams Dunno what is best, but when a solution is found, the following should probably be tested to ensure that it is able to reverse the non-editability: (let ((buffer-invisibility-spec)) On 2010-09-03, Lennart Borgman wrote: > On Fri, Sep 3, 2010 at 3:40 PM, Andreas R=F6hler > wrote: >> >> Hi, >> >> posting forwarded herewith describes a design inconvenience, wich affect= s >> common hide-show- and outline-modes too. >> >> As too different solutions have been proposed, let me suggest >> "setting read-only property" rather than "use of a modification hook". >> >> Setting hidden text read-only should be more simple, straitforward - as >> presumably hiding some code had some reasons. > > > I recently filed a bug report about that hidden text in org-mode nodes > did not get visible when you start to edit them. It turned out I was > mistaken, I did not have reveal-mode on as I believed. However the > plan is to make reveal-mode default: > > http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D6950 > > How would making the text read-only or add a modification hook > interact with the kind of problem reported in the bug above? > > >> Editing hidden code is an error, which should be signaled rather than >> cured >> via hook. >> >> >> Andreas >> >> -- >> https://code.launchpad.net/~a-roehler/python-mode >> https://code.launchpad.net/s-x-emacs-werkstatt/ >> >> >> Am 26.08.2010 00:28, schrieb Martin Pohlack: >>> >>> Hi David, >>> >>> On 25.08.2010 11:22, David Abrahams wrote: >>>> >>>> I've gotten myself in trouble several times today by backspacing after >>>> an org-link that ends a headline. That's a typical pattern for >>>> editing an org-link, right? Well it turns out that if the item is >>>> folded, then the backspace writes over the end of the un-folded item >>>> but **appears to have no effect**, and you can easily hit backspace >>>> several times to test your sanity before you realize that something is >>>> wrong, badly corrupting your file. >>> >>> I have had similar such accidents, but not involving links. You >>> probably backspaced into the "..."? >>> >>>> Seems to me that attempts to edit a folded item should either: >>>> >>>> a) restrict changes to the item's headline, or >>>> b) unfold the item and do nothing >>>> >>>> Is there a way to set that up? >>> >>> Just two quick ideas from me here: >>> * You could add a modification hook to all hidden areas to unfold them >>> on modification, or >>> * You could set the read-only property for all hidden areas. This coul= d >>> be setup at the same location where hiding is done. >>> >>> See also here: >>> >>> http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.ht= ml#Special-Properties >>> >>> I proposed a patch for image overlay which show a related problem here: >>> http://patchwork.newartisans.com/patch/31/ >>> >>> Cheers, >>> Martin >>> >> >> >> >> > > _______________________________________________ > Emacs-orgmode mailing list > Please use `Reply All' to send replies to the list. > Emacs-orgmode@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-orgmode > --=20 Q: How many CDC "scientists" does it take to change a lightbulb? A: "You only think it's dark." [CDC has denied a deadly serious disease for 25 years] =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Retrovirus: http://www.wpinstitute.org/xmrv/index.html -- PLEASE DONATE =3D=3D=3D I would like to see the original Lo et al. 2010 NIH/FDA XMRV paper.