>>>>> On Wed, 23 Aug 2006 12:53:12 +0100, David Reitter <[EMAIL PROTECTED]> 
>>>>> said:

>> The proxy icon is set by giving the corresponding alias record to
>> SetWindowProxyAlias.  But the correspondence between file name and
>> alias record seems to be not persistent.  Actually, the latter
>> takes care of renaming.

> So if you keep alias records, then you refer to the files by FSRef,
> correct?

I'm not sure, but maybe not.  Technical Note TN2078 says:

  Like FSSpecs, FSRefs are not guaranteed to be valid across boots in
  Mac OS 9 or Mac OS X, across processes in Mac OS X, or even across
  separate launches of the same application in Mac OS X, so don't use
  them when you need persistent storage. For persistent storage,
  aliases are still the recommended approach.

  (http://developer.apple.com/technotes/tn2002/tn2078.html)

> Could standard tracking of file changes (e.g. user changes file name
> or moves the file in Finder, Emacs updates its records
> automatically) then be easily implemented?

Yes.  You can see the value that the variable `alias' is bound to
tracks the renamed file in the following code:

  (let* ((file1 (make-temp-file "foo"))
         (file2 (concat file1 "-renamed"))
         (alias (mac-coerce-ae-data 'undecoded-file-name
                                    (encode-coding-string file1 'utf-8)
                                    "alis")))
    (rename-file file1 file2)
    (prog1 (decode-coding-string
            (mac-coerce-ae-data "alis" alias 'undecoded-file-name) 'utf-8)
      (delete-file file2)))

>> Could you try the following patch?  It tries to see if the alias
>> record that is currently set is updated by the current file name.

> I tried it and it seems to work - I can't reproduce the problem
> anymore.

Thanks for testing.  I've installed the change.

                                     YAMAMOTO Mitsuharu
                                [EMAIL PROTECTED]


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to