help-emacs-windows
[Top][All Lists]
Advanced

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

Re: [h-e-w] NTemacs and SourceSafe


From: Roman Belenov
Subject: Re: [h-e-w] NTemacs and SourceSafe
Date: Tue, 06 Dec 2005 10:32:34 +0300
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (windows-nt)

address@hidden 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

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