all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Karl Chen" <quarl.newsgroup@REMOVE_ME_quarl.org>
Subject: Re: global-auto-revert mode doesn't revert fully
Date: Tue, 14 May 2002 22:13:07 -0700	[thread overview]
Message-ID: <absqp3$31l$1@agate.berkeley.edu> (raw)
In-Reply-To: GW27ZR00.G1Z@nsmail.west.quiq.com

I agree that that's an annoying bug. Here's a fix.

Add this to your .emacs:

(defun vc-reload-version-info ()
  "Re-read a file's version information after an external edit.

Meant to be added as to `after-revert-hook'."
  (when (vc-backend buffer-file-name)
    (vc-file-setprop buffer-file-name 'vc-workfile-version
                     (vc-call workfile-version buffer-file-name))
    (vc-mode-line buffer-file-name)
    (force-mode-line-update)
    )
  t)

(add-hook 'after-revert-hook 'vc-reload-version-info)

--
Karl Chen


"Luke Blanshard" <luke@quiq.com> wrote in message
news:GW27ZR00.G1Z@nsmail.west.quiq.com...
> 1. Turn on global-auto-revert-mode.
> 2. Open a CVS-controlled file in Emacs.
> 3. Do a CVS update outside of Emacs that brings out a newer version of
>    the file.
> 4. Emacs will revert the contents of the buffer, but not the version
>    number (as displayed in the mode line).  If you do any VC
>    operations from within Emacs against that file, the VC commands
>    will use the original version of the file as if it was current.

      parent reply	other threads:[~2002-05-15  5:13 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-13 17:16 global-auto-revert mode doesn't revert fully Luke Blanshard
2002-05-13 23:58 ` Stefan Monnier
2002-05-15  5:13 ` Karl Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='absqp3$31l$1@agate.berkeley.edu' \
    --to=quarl.newsgroup@remove_me_quarl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.