public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Windows 7? Two different versions of a file depending on how it is accessed
@ 2011-06-26 14:40 Andrew Hancock
  2011-06-26 15:20 ` Andrew Hancock
  0 siblings, 1 reply; 2+ messages in thread
From: Andrew Hancock @ 2011-06-26 14:40 UTC (permalink / raw)
  To: cygwin

I am seeing two different versions of a file depending on how I access
it.  Specifically, the file "C:\Program Files (x86)\Vim\_vimrc" uses
plain text to provide startup specifications for the text editor gvim.
 This is the standalone installation for Windows, not the one the one
that comes with Cygwin.  However, that is just the problem context.
The real issue is that I see two different versions of that file.  The
first version is the original one that came with the installation.  I
modified it by adding the lines:

   set guioptions-=m
   set guioptions-=T

I got a warning that the file is read-only.  It isn't according
read-only to "ls -l", but I thought that the discrepancy must have
been due to Windows 7's more complicated security (which I haven't
completely figured out).  I forced the save with "w!", tested it by
restarting gvim, and found that the settings did not take.  I wondered
whether the file actually contained the above two lines that I added.

It turns out that it depends on how the file is accessed.  If I access
the file using notepad or windows-based gvim, the two added lines are
not present (same thing if I use Windows's "more" from cmd.exe).  On
the other hand, if I access the file using vim or less from cygwin's
bash shell, the two added lines *are* present.  After googling about
different versions of files on Windows 7, I found that one possible
cause might be the backups that the OS makes.  However, I confirmed
that this particular file has no backups.

Right now, I am not sure whether this is a Windows 7 problem or a
cygwin problem (or more likely, an interaction between them).  Can
anyone suggest a next possible course of action?  I don't want to
force both copies to be the same by simply editting the file using the
Windows-base gvim.  This hides a problem that will doubtlessly come
back and cause great grief.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Windows 7? Two different versions of a file depending on how it is accessed
  2011-06-26 14:40 Windows 7? Two different versions of a file depending on how it is accessed Andrew Hancock
@ 2011-06-26 15:20 ` Andrew Hancock
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Hancock @ 2011-06-26 15:20 UTC (permalink / raw)
  To: cygwin

Sorry, this thread has been superseded by "Divergent file system
contents, Cygwin versus Windows 7"
(http://article.gmane.org/gmane.os.cygwin/127335).  During the thick
of troubleshooting, I lost track of the fact that I posted this
earlier understanding of the problem.

On Sun, Jun 26, 2011 at 10:40 AM, Andrew Hancock <andymhancock@gmail.com> wrote:
> I am seeing two different versions of a file depending on how I access
> it.  Specifically, the file "C:\Program Files (x86)\Vim\_vimrc" uses
> plain text to provide startup specifications for the text editor gvim.
>  This is the standalone installation for Windows, not the one the one
> that comes with Cygwin.  However, that is just the problem context.
> The real issue is that I see two different versions of that file.  The
> first version is the original one that came with the installation.  I
> modified it by adding the lines:
>
>   set guioptions-=m
>   set guioptions-=T
>
> I got a warning that the file is read-only.  It isn't according
> read-only to "ls -l", but I thought that the discrepancy must have
> been due to Windows 7's more complicated security (which I haven't
> completely figured out).  I forced the save with "w!", tested it by
> restarting gvim, and found that the settings did not take.  I wondered
> whether the file actually contained the above two lines that I added.
>
> It turns out that it depends on how the file is accessed.  If I access
> the file using notepad or windows-based gvim, the two added lines are
> not present (same thing if I use Windows's "more" from cmd.exe).  On
> the other hand, if I access the file using vim or less from cygwin's
> bash shell, the two added lines *are* present.  After googling about
> different versions of files on Windows 7, I found that one possible
> cause might be the backups that the OS makes.  However, I confirmed
> that this particular file has no backups.
>
> Right now, I am not sure whether this is a Windows 7 problem or a
> cygwin problem (or more likely, an interaction between them).  Can
> anyone suggest a next possible course of action?  I don't want to
> force both copies to be the same by simply editting the file using the
> Windows-base gvim.  This hides a problem that will doubtlessly come
> back and cause great grief.
>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-26 15:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-26 14:40 Windows 7? Two different versions of a file depending on how it is accessed Andrew Hancock
2011-06-26 15:20 ` Andrew Hancock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).