From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rainer Stengele Subject: Re: org-indent-mode corrupted most of a big org file Date: Thu, 12 Dec 2013 15:48:36 +0100 Message-ID: <52A9CCC4.2000309@online.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:54605) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr7ZH-0000Io-HM for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 09:48:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vr7ZA-0007VR-4B for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 09:48:47 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:55952) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vr7Z9-0007VC-Q2 for emacs-orgmode@gnu.org; Thu, 12 Dec 2013 09:48:40 -0500 In-Reply-To: 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: emacs-orgmode@gnu.org Am 02.12.2013 12:21, schrieb Rainer Stengele: > All, > > last week I played around with org-indent-mode in my biggest (37.000 lines) org file. > 3 days later I detected that most of the file was corrupted. > WHy so late? Using the agenda I only saw the todos and did not recognise the corrupted structures. > Most "*" items had been placed at the beginning of the line and therefore now became headlines. > I do not know how this happened. I am not sure if I myself was the reason somehow. > Anyway I had to spend a fair amount of work to get the old file format from > subversion and insert the changes since the corruption. > > This is just a warning to have backups at hand before changing to org-indent mode. > Then immediately and check often the contents of the file until you are sure all is running well. > > Maybe someone has an idea. > > I will try to convert again later but then be much more careful. > > Rainer > > > Hi, I believe I found the function that "corrupted" most of my buffer. Trying to convert the indented org contents to unindented I "discovered" that delete-whitespace-rectangle did a nice job. Imagine you see something like this, cursor at ^. *** headline0 CLOCK: [2013-10-11 Fr 16:45]--[2013-10-11 Fr 17:00] => 0:15 ^ CLOCK: [2013-10-01 Di 14:30]--[2013-10-01 Di 23:00] => 8:30 CLOCK: [2013-10-01 Di 09:45]--[2013-10-01 Di 10:15] => 0:30 CLOCK: [2013-09-30 Mo 13:30]--[2013-09-30 Mo 17:00] => 3:30 **** headline1 **** headline2 calling delete-whitespace-rectangle results in: *** headline0 CLOCK: [2013-10-11 Fr 16:45]--[2013-10-11 Fr 17:00] => 0:15 CLOCK: [2013-10-01 Di 14:30]--[2013-10-01 Di 23:00] => 8:30 CLOCK: [2013-10-01 Di 09:45]--[2013-10-01 Di 10:15] => 0:30 CLOCK: [2013-09-30 Mo 13:30]--[2013-09-30 Mo 17:00] => 3:30 **** headline1 **** headline2 Looks good. Cycling headline2 shows, that all item lists which began with "*" are now at the beginning of the line and therefore became headlines level 1! That of course is only visible after cycling. The mistake is maybe using the wrong rectangle, but anyway it changes the invisible buffer contents. Rainer