[EMAIL PROTECTED] writes:

> However, where the file change is caused by a SourceSafe check-in
> (which updates change history comments in a source file), emacs does
> not detect the change.  This is even though the file timestamp is seen
> to change.

I didn't use history comments feature, so in my case only read only status was
changed on check-in; anyway, I wanted the buffer to become read-only too and
did this by simple advice:

(defadvice verify-visited-file-modtime (after verify-read-only-state activate)
  "Verify that read-only state of file on disk corresponds to read-only state 
of the buffer"
  (setq ad-return-value
        (and ad-return-value
             (let* ((buffer (ad-get-arg 0)) (file (buffer-file-name buffer)))
               (or (null file) (and (boundp 'edebug-active) edebug-active)
                   (save-excursion
                     (set-buffer buffer)
                     (or (backup-file-name-p file)
                         (equal (null buffer-read-only)
                                (file-writable-p file)))))))))

I still don't know why the buffer is not reverted in your case (when timestamp
is changed), but it can try this code anyway.
                                
PS Browsing autorevert customizations reveals auto-revert-check-vc-info
option; it may help you.
                                

-- 
                                                        With regards, Roman.


Reply via email to