unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: autorevert and vc
Date: 28 Mar 2004 23:24:03 -0500	[thread overview]
Message-ID: <m1d66wgutj.fsf-monnier+emacs@empanada.iro.umontreal.ca> (raw)
In-Reply-To: <200403290352.i2T3qTP07266@raven.dms.auburn.edu>

> As I already said before, the one part of the recent changes to
> autorevert.el (prior to the ones I made) which I did not check are
> the vc-part of those changes.  There seem to be bugs, or at the very
> least nuisance features, associated with them.

I'd suggest to completely take them out.
Their implementation is so ugly that it's best to start over from scratch.

If you don't want to take it all out, at least please remove:

 	(if (eq revert 'vc)
 	    (vc-mode-line buffer-file-name))))))

It seems to be redundant and probably results from the fact that the
original author tried to fix a problem and didn't notice when he updated his
code that the current version does

	;; `preserve-modes' avoids changing the (minor) modes.  But we
	;; do want to reset the mode for VC, so we do it explicitly.
	(vc-find-file-hook)

just before which fixes the same problem.

Another thing: why on earth do

  (and (boundp 'vc-mode)
       (string-match "[0-9]" (or vc-mode ""))))

rather than 

  (and (boundp 'vc-mode) (stringp vc-mode)) ?

Also all the CVS-related code needs to be moved to vc-cvs.el.

Finally, I think the idea of doing a `revert' of the file when the file has
not changed is just plain wrong.  If you want to update the VC-state, then
update just the VC-state, but don't additionally revert the buffer.

In other words the VC-state-refresh code should be completely separate
from the file-buffer-refresh code since both can change independently.
It can still all be in autorevert.el, but a refresh of one shouldn't
necessarily force a refresh of another (currently a refresh of the buffer
text forces a refresh of the VC-state, which is OK only because we don't
kow how to check staleness of the VC-state so we use staleness of the
buffer-text as a heuristic that the VC-state might also be stale).


        Stefan

  reply	other threads:[~2004-03-29  4:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-29  3:52 autorevert and vc Luc Teirlinck
2004-03-29  4:24 ` Stefan Monnier [this message]
2004-03-29  4:43   ` Luc Teirlinck
2004-03-30  2:27   ` Luc Teirlinck
2004-03-30 19:56     ` Stefan Monnier
2004-04-01 10:27     ` Jari Aalto
2004-04-01 16:46       ` Luc Teirlinck
2004-03-30 15:17   ` Luc Teirlinck
2004-03-30 20:51     ` Andre Spiegel
2004-03-31  0:24       ` Stefan Monnier
2004-03-31  2:02         ` Luc Teirlinck
2004-03-31  2:15           ` Luc Teirlinck
2004-03-31  7:19           ` Stefan Monnier

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m1d66wgutj.fsf-monnier+emacs@empanada.iro.umontreal.ca \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).