[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] org-indent-mode corrupted most of a big org file
From: |
Rainer Stengele |
Subject: |
Re: [O] org-indent-mode corrupted most of a big org file |
Date: |
Thu, 12 Dec 2013 15:48:36 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.1 |
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
Re: [O] org-indent-mode corrupted most of a big org file, Nicolas Goaziou, 2013/12/04
Re: [O] org-indent-mode corrupted most of a big org file,
Rainer Stengele <=