From: Tom Tromey <tromey@redhat.com>
To: emacs-devel@gnu.org
Subject: Patch: vc-dired-hook -vs- vc-call
Date: Sun, 06 Jan 2008 09:42:18 -0700 [thread overview]
Message-ID: <m3bq7yvrbp.fsf@fleche.redhat.com> (raw)
Yesterday I tried vc-dired on a mercurial-managed working directory.
Once it was showing I typed 'v t'. To my surprise I got an error
trace:
require(vc-nil)
vc-find-backend-function(nil dired-state-info)
vc-call-backend(nil dired-state-info "/home/tromey/Mercurial/trunk/libcpp/ChangeLog.rej")
vc-dired-hook()
vc-dired-toggle-terse-mode()
call-interactively(vc-dired-toggle-terse-mode nil nil)
I don't really understand this fully, I'm afraid. vc-backend returns
nil for this file, because it has 'vc-backend as 'none. This may be a
bug in vc-hg, I'm not sure; this file is ignored, not unregistered.
Anyway, this patch fixed it for me. It seemed a bit better to use
vc-responsible-backend here.
Tom
2008-01-06 Tom Tromey <tromey@redhat.com>
* vc.el (vc-dired-hook): Use vc-responsible-backend.
Index: lisp/vc.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc.el,v
retrieving revision 1.508
diff -u -r1.508 vc.el
--- lisp/vc.el 6 Jan 2008 16:02:38 -0000 1.508
+++ lisp/vc.el 6 Jan 2008 16:55:12 -0000
@@ -2417,7 +2417,9 @@
(forward-line 1)))
;; Either we're in non-terse mode or it's out of date
((not (and vc-dired-terse-mode (vc-up-to-date-p filename)))
- (vc-dired-reformat-line (vc-call dired-state-info filename))
+ (vc-dired-reformat-line
+ (vc-call-backend (vc-responsible-backend filename)
+ 'dired-state-info filename))
(forward-line 1))
;; Remaining cases are under version control but uninteresting
(t
reply other threads:[~2008-01-06 16:42 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=m3bq7yvrbp.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--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 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.