Re: file disappear unexpectedly

From: Wei Xie <wxie_at_purdue.edu>
Date: Wed, 1 Jul 2009 18:02:43 -0400


Hi Valeri

I did that in the following and there's no loss of files.

  1. edit one file. e.g. oo.C in the first console
  2. open the same file in the 2nd console, I got the following message from vi as attached.
  3. neglect the message and hit return, then one will open the same file in two different consoles.
  4. go back to the first console and make some changes and save it.
  5. go to the 2nd console and quite the vi
  6. check the file and it's still in the directory with the changes made.

Note that as I mentioned before, when using ROOT, the file w/o the function name does NOT have the problem, e.g.

   {

       cout<<" hello"<<endl;
   }

But the file has the function name has the problem, e.g.

    void oo()
    {
      cout<<" hello"<<endl;
    }

This difference does not appear in above exercises. So I feel it does related to ROOT.

This is not a serious problem anyway.

Cheers
--Wei

Fine, Valeri wrote:

>> I used the good-old "vi" and had such problem. Using a different

> editor
>> like emacs, it's OK.

>
> Then it probably the "vi" issue rather ROOT.
>
> Did you try to open some text file with two different "vi"'s
> simultaneously?
>
> By the way, my favorite "free" editor for Windows is "notepad++"
> http://notepad-plus.sourceforge.net/uk/site.htm
>
> Valeri
>
>> Cheers
>> --Wei
>>
>> Bertrand Bellenot wrote:
>>> Hi,
>>>
>>> I cannot reproduce the problem... (using joe editor in cygwin)
>>> But anyway, on Windows, it is often not possible to change a macro

> being
>> used by ROOT.
>>> But this is a OS (Windows) issue...
>>>
>>> Cheers,
>>> Bertrand.
>>>
>>> -----Original Message-----
>>> From: owner-roottalk_at_root.cern.ch

> [mailto:owner-roottalk_at_root.cern.ch]
>> On Behalf Of Wei Xie
>>> Sent: Wednesday, July 01, 2009 04:03
>>> To: roottalk (Mailing list discussing all aspects of the ROOT

> system.)
>>> Subject: [ROOT] file disappear unexpectedly
>>>
>>> This happens for VC++9.0 version of root. Following the following

> steps,
>>> the file being edited disappears unexpectedly.
>>>
>>> 1. open the first console (cygwin), and edit any simple code in it,

> e.g.
>>>    void oo()
>>>    {
>>>        cout<<"hello"<<endl;
>>>    }
>>>
>>> 2. open the second console, start ROOT and run the macro, e.g.
>>>
>>>     .x oo.C
>>>
>>> 3. Don't quit ROOT after running the command.
>>>
>>> 4. go to the first console and make some changes on oo.C and save

> it.
>>> 6. go to the second console, and type ".q" to quit ROOT.
>>>
>>> 7. check the oo.C now in the directory and it disappeared. Note that

> the
>>> same problem won't happen with the following code, i.e. w/o "void

> oo()"
>>> { >>> cout<<"hello"<<endl; >>> } >>>

>
-- 
Dept. of Physics, Purdue Univ.
525 Northwestern Ave., West Lafayette, IN 47907

http://www.physics.purdue.edu/people/faculty/wxie.shtml
Tel: 765-494-8743, Fax: 765-494-0706
_______________________________________________________

E325: ATTENTION Found a swap file by the name ".oo.C.swp" owned by: wxie dated: Wed Jul 1 17:51:34 2009 file name: ~wxie/oo.C modified: no user name: wxie host name: D2SLGPD1 process ID: 3304 (still running) While opening file "oo.C" (1) Another program may be editing the same file. If this is the case, be careful not to end up with two different instances of the same file when making changes. Quit, or continue with caution. (2) An edit session for this file crashed. If this is the case, use ":recover" or "vim -r oo.C" to recover the changes (see ":help recovery"). If you did this already, delete the swap file ".oo.C.swp" to avoid this message. Swap file ".oo.C.swp" already exists! [O]pen Read-Only, (E)dit anyway, (R)ecover, (Q)uit, (A)bort:

Received on Thu Jul 02 2009 - 00:02:53 CEST

This archive was generated by hypermail 2.2.0 : Thu Jul 02 2009 - 05:50:03 CEST