From mboxrd@z Thu Jan 1 00:00:00 1970 From: Johann Spies Subject: Re: org-indent-mode corrupted most of a big org file Date: Fri, 6 Dec 2013 16:41:28 +0200 Message-ID: References: <8738mb2rhq.fsf@gmail.com> <87y542147z.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=001a11c3ef34348ea704ecdea476 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:34207) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Voway-0005jH-Mc for emacs-orgmode@gnu.org; Fri, 06 Dec 2013 09:41:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vowaw-0002PZ-Bd for emacs-orgmode@gnu.org; Fri, 06 Dec 2013 09:41:32 -0500 Received: from mail-ie0-x22a.google.com ([2607:f8b0:4001:c03::22a]:52611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vowaw-0002P8-3v for emacs-orgmode@gnu.org; Fri, 06 Dec 2013 09:41:30 -0500 Received: by mail-ie0-f170.google.com with SMTP id qd12so1337837ieb.15 for ; Fri, 06 Dec 2013 06:41:28 -0800 (PST) In-Reply-To: <87y542147z.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: Johann Spies , Rainer Stengele , emacs-orgmode@gnu.org --001a11c3ef34348ea704ecdea476 Content-Type: text/plain; charset=ISO-8859-1 Hello Alexander, Thanks for your attention. The message I sent earlier was of my experience on my work computer. I have now tried the same on my home computer. The files on both edited was in /home/js/Dropbox/orgmode. I have also edited ~/.emacs and saved it. that is strange. I cannot remember doing something else besides putting > the mentioned code into my init file. I can only think of these > "trivial" reason why this does not work for you: > > - Did you evaluate the code or restarted your emacs? > I have killed and restarted emacs. How do I evaluate (reload) .emacs when emacs is running? > - Are the files you are editing somewhere under /home/js/? > - Did you really edit and save a file since adding the code to your init > file? > - In case you are editing files under version control: Did you turn on > vc-make-backup-files? > > HTH, > -- > Alexander Baier > > On 13-12-03 09:33 Johann Spies wrote: > > Thanks for sharing this. However, after adding this to my ~/.emacs I do > not > > see anything appearing in my .emacs.d/backup directory. > > > > #+begin_src emacs-lisp > > (setq make-backup-files t) > > (setq backup-directory-alist '(("/home/js/*" . > "/home/js/.emacs.d/backup"))) > > (setq backup-by-copying t ; don't use symlinks > > delete-old-versions t ; don't ask me about deleting backups > > kept-new-versions 20 > > kept-old-versions 5 > > version-control t) ; use versioned backups > > #+end_src > > > > > > > > Regards > > Johann > > > > > > On 2 December 2013 17:37, Alexander Baier wrote: > > > >> On 13-12-02 12:21 Rainer Stengele wrote: > >> > 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 > >> > > >> > > >> > >> FWIW, I have the following snippet in my init file, that uses emacs' > >> build-in backup machanism to save me from such things. As emacs stuffs > >> them all in one central location, I do not have to worry about polluting > >> my filesystem. > >> > >> #+begin_src emacs-lisp > >> (setq make-backup-files t) > >> (setq backup-directory-alist '(("/home/delexi/*" . > >> "/home/delexi/.emacs.d/backup"))) > >> (setq backup-by-copying t ; don't use symlinks > >> delete-old-versions t ; don't ask me about deleting backups > >> kept-new-versions 20 > >> kept-old-versions 5 > >> version-control t) ; use versioned backups > >> #+end_src > >> > >> If you want to make backups from files under version control, you also > >> have to set the following: > >> > >> #+begin_src emacs-lisp > >> (setq vc-make-backup-files t) > >> #+end_src > >> > >> This already saved me a couple of times. > >> > >> Regards, > >> -- > >> Alexander Baier > >> > >> > > -- Because experiencing your loyal love is better than life itself, my lips will praise you. (Psalm 63:3) --001a11c3ef34348ea704ecdea476 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hello Alexander,

Thanks for yo= ur attention.=A0 The message I sent earlier was of my experience on my work= computer.

I have now tried the same on my home computer.=A0 T= he files on both edited was in /home/js/Dropbox/orgmode.

I have also edited ~/.emacs and saved it.

<= div>
that is strange. =A0I cannot remember doing something else besides putting<= br> the mentioned code into my init file. =A0I can only think of these
"trivial" reason why this does not work for you:

- Did you evaluate the code or restarted your emacs?
<= br>I have killed and restarted emacs.=A0 How do I evaluate (reload) .emacs = when emacs is running?
=A0
- Are the files you are editing somewhere under /home/js/?
- Did you really edit and save a file since adding the code to your init =A0 file?
- In case you are editing files under version control: Did you turn on
=A0 vc-make-backup-files?

HTH,
--
=A0Alexander Baier

On 13-12-03 09:33 Johann Spies wrote:
> Thanks for sharing this. However, after adding this to my ~/.emacs I d= o not
> see anything appearing in my .emacs.d/backup directory.
>
> #+begin_src emacs-lisp
> =A0 (setq make-backup-files t)
> =A0 (setq backup-directory-alist '(("/home/js/*" . "= ;/home/js/.emacs.d/backup")))
> =A0 (setq backup-by-copying t =A0 =A0 =A0; don't use symlinks
> =A0 =A0 =A0 =A0 delete-old-versions t =A0 =A0; don't ask me about = deleting backups
> =A0 =A0 =A0 =A0 kept-new-versions 20
> =A0 =A0 =A0 =A0 kept-old-versions 5
> =A0 =A0 =A0 =A0 version-control t) =A0 =A0 =A0 ; use versioned backups=
> #+end_src
>
>
>
> Regards
> Johann
>
>
> On 2 December 2013 17:37, Alexander Baier <lexi.baier@gmail.com> wrote:
>
>> On 13-12-02 12:21 Rainer Stengele wrote:
>> > 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.<= br> >> > WHy so late? Using the agenda I only saw the todos and did no= t 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 wa= s the
>> reason somehow.
>> > Anyway I had to spend a fair amount of work to get the old fi= le format
>> from
>> > subversion and insert the changes since the corruption.
>> >
>> > This is just a warning to have backups at hand before changin= g to
>> org-indent mode.
>> > Then immediately and check often the contents of the file unt= il you are
>> sure all is running well.
>> >
>> > Maybe someone has an idea.
>> >
>> > I will try to convert again later but then be much more caref= ul.
>> >
>> > Rainer
>> >
>> >
>>
>> FWIW, I have the following snippet in my init file, that uses emac= s'
>> build-in backup machanism to save me from such things. =A0As emacs= stuffs
>> them all in one central location, I do not have to worry about pol= luting
>> my filesystem.
>>
>> #+begin_src emacs-lisp
>> =A0 (setq make-backup-files t)
>> =A0 (setq backup-directory-alist '(("/home/delexi/*"= .
>> "/home/delexi/.emacs.d/backup")))
>> =A0 (setq backup-by-copying t =A0 =A0 =A0; don't use symlinks<= br> >> =A0 =A0 =A0 =A0 delete-old-versions t =A0 =A0; don't ask me ab= out deleting backups
>> =A0 =A0 =A0 =A0 kept-new-versions 20
>> =A0 =A0 =A0 =A0 kept-old-versions 5
>> =A0 =A0 =A0 =A0 version-control t) =A0 =A0 =A0 ; use versioned bac= kups
>> #+end_src
>>
>> If you want to make backups from files under version control, you = also
>> have to set the following:
>>
>> #+begin_src emacs-lisp
>> =A0 (setq vc-make-backup-files t)
>> #+end_src
>>
>> This already saved me a couple of times.
>>
>> Regards,
>> --
>> =A0Alexander Baier
>>
>>




--
Because exp= eriencing your loyal love is better than life itself,
my lips will prai= se you.=A0 (Psalm 63:3)
--001a11c3ef34348ea704ecdea476--