From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Newsgroups: gmane.emacs.orgmode,gmane.emacs.devel Subject: Re: Backspacing into folded items Date: Fri, 03 Sep 2010 15:40:47 +0200 Message-ID: <4C80FADF.5030607@easy-emacs.de> References: <4C7598F2.7050200@os.inf.tu-dresden.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1283521433 18610 80.91.229.12 (3 Sep 2010 13:43:53 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 3 Sep 2010 13:43:53 +0000 (UTC) Cc: David Abrahams , Martin Pohlack , Bastien , Emacs developers To: emacs-orgmode@gnu.org Original-X-From: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Fri Sep 03 15:43:51 2010 Return-path: Envelope-to: geo-emacs-orgmode@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OrWYY-0008SK-PP for geo-emacs-orgmode@m.gmane.org; Fri, 03 Sep 2010 15:43:51 +0200 Original-Received: from localhost ([127.0.0.1]:57455 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrWYY-0003Yp-CQ for geo-emacs-orgmode@m.gmane.org; Fri, 03 Sep 2010 09:43:50 -0400 Original-Received: from [140.186.70.92] (port=45846 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrWW9-0002Gw-H2 for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 09:41:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrWW4-0000k4-Nf for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 09:41:20 -0400 Original-Received: from moutng.kundenserver.de ([212.227.17.10]:56959) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OrWW4-0000jj-Ah; Fri, 03 Sep 2010 09:41:16 -0400 Original-Received: from [192.168.178.27] (brln-4db9ec37.pool.mediaWays.net [77.185.236.55]) by mrelayeu.kundenserver.de (node=mreu2) with ESMTP (Nemesis) id 0M94Cf-1P3rNN3BGv-00CwtN; Fri, 03 Sep 2010 15:41:13 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.11) Gecko/20100711 Thunderbird/3.0.6 In-Reply-To: <4C7598F2.7050200@os.inf.tu-dresden.de> X-Provags-ID: V02:K0:jVE6qQv1JXVVSi5jJwQTpQ3OVdeOGr+PSg9V2C4XDYG fAV/oSGpJoPDfOeqVaZUrnWX9XdT0vnk8XLv6DRMgYQ5Ud4HpX l1J/fUCIWK1F72p8Suhpq7QBVmobjbG90cxlIeDKYTbk+EF29E 7IlLLZbgROEOOxE8XgFhVeLYTxMdhM+7c2vMTcksdRayqrDXzP +T/rmNsga70bxSyrSEEeA8CAxF4pDifcOldaq4gFLk= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-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 Xref: news.gmane.org gmane.emacs.orgmode:29706 gmane.emacs.devel:129645 Archived-At: Hi, posting forwarded herewith describes a design inconvenience, wich affects 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. 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 could > be setup at the same location where hiding is done. > > See also here: > http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html#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 From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-1?Q?Andreas_R=F6hler?= Subject: Re: Backspacing into folded items Date: Fri, 03 Sep 2010 15:40:47 +0200 Message-ID: <4C80FADF.5030607@easy-emacs.de> References: <4C7598F2.7050200@os.inf.tu-dresden.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from [140.186.70.92] (port=45846 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OrWW9-0002Gw-H2 for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 09:41:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OrWW4-0000k4-Nf for emacs-orgmode@gnu.org; Fri, 03 Sep 2010 09:41:20 -0400 In-Reply-To: <4C7598F2.7050200@os.inf.tu-dresden.de> 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: emacs-orgmode@gnu.org Cc: David Abrahams , Martin Pohlack , Bastien , Emacs developers Hi, posting forwarded herewith describes a design inconvenience, wich affects 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. 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 could > be setup at the same location where hiding is done. > > See also here: > http://www.gnu.org/software/emacs/elisp/html_node/Special-Properties.html#Special-Properties > > I proposed a patch for image overlay which show a related problem here: > http://patchwork.newartisans.com/patch/31/ > > Cheers, > Martin >