[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [h-e-w] Problems in buffer saving

From: WJCarpenter
Subject: Re: [h-e-w] Problems in buffer saving
Date: Wed, 7 Jan 2004 13:29:11 -0800

>> I'm using GNU Emacs 21.3 on Windows 2000 professional and I have a
>> very strange problem with emacs' buffer saving functionality. I use
>> Emacs as an external editor for my Visual C++ 6.0 ide and always
>> after saving a buffer, Visual C++ fails to use the source browser
>> on this file even after restarting the whole ide. If I edit the
>> file with any other editor (notepad, ultra edit or even xemacs)
>> this problem does not occur.

I know next to nothing about VC++, but I'm always on the lookout for
an opportunity to tell an anecdote.

About a thousand years ago, I was looking into a similar problem in an
editor escape from a product I was working on.  Our product didn't see
updates made by emacs, but it saw updates made by vi.  (Some smug
creeps were trying to use this as evidence that vi did things the
"right" way and emacs did them the "wrong" way.)

I eventually discovered that our product was deciding if a change had
been made by the editor escape by looking for a timestamp change on a
temp file it passed to the editor.  Since the file was already opened,
for better performance, it used fstat() instead of stat() to check.
(In the age of 1 MIPS minicomputers, stuff like that seemed to
matter.)  vi was changing the file in-place (same inode number) while
emacs was renaming the file to a backup name and then making the
changes in a new copy (same filename).  fstat(), in effect, works off
the inode number and not the filename and never saw the emacs changes.

Perhaps something analogous is going on for you.  If not, well, at
least I got to tell my anecdote.  :-)
address@hidden (WJCarpenter)    PGP 0x91865119
38 95 1B 69 C9 C6 3D 25    73 46 32 04 69 D6 ED F3

reply via email to

[Prev in Thread] Current Thread [Next in Thread]