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: Wed, 04 Dec 2013 12:26:37 +0100 Message-ID: <529F116D.7050907@online.de> References: <87vbz5uioy.fsf@gmail.com> 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]:34789) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoAbP-0005Vj-FG for emacs-orgmode@gnu.org; Wed, 04 Dec 2013 06:26:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VoAbJ-0000WX-9x for emacs-orgmode@gnu.org; Wed, 04 Dec 2013 06:26:47 -0500 Received: from moutng.kundenserver.de ([212.227.17.8]:63229) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VoAbI-0000WL-Ul for emacs-orgmode@gnu.org; Wed, 04 Dec 2013 06:26:41 -0500 In-Reply-To: <87vbz5uioy.fsf@gmail.com> 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: Nicolas Goaziou Cc: emacs-orgmode@gnu.org Am 04.12.2013 09:25, schrieb Nicolas Goaziou: > Hello, > > Rainer Stengele writes: > >> 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. > For the sake of correctness, `org-indent-mode' cannot corrupt a file. It > only modifies two text properties, `line-prefix' and `wrap-prefix', > never the contents of the file. > > Something else corrupted that file. `org-indent-mode' possibly made it > harder to notice, but you're looking after the wrong culprit. > > > Regards, > Good to know. But the indent-mode made it quite easy to mess up most of the file. I think I tried somehow to delete the now no more needed whitespace and messed things up without noticing it. I am afraid there is no easy way to "convert" a non org-indent-mode to a nice formatted org-indent-file. For smaller files I went through them page by page and left shifted lists and items manually. As far as I remember even Bernt Hansen did the work manually after switching. Maybe someone has a suggestion. Regards, Rainer