unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Version Control in Speedbar (speedbar-vc)
@ 2007-07-05 16:02 Nordlöw
  0 siblings, 0 replies; only message in thread
From: Nordlöw @ 2007-07-05 16:02 UTC (permalink / raw)
  To: help-gnu-emacs

Hey again, Emacs Users!

I am trying to get speedbar to display version control context in
project trees being version controlled by CVS, Subversion, Bazaar,
etc. I thought the follow code should do the trick by displaying an
icon beside all directories that have changed. This would make Emacs
+Speedbar attractive to people familiar with GUI-interfaces such as
Tourtoise-SVN. However, I only get an icon to the right of the actual
file that has been changed. This makes it harder to see what has
changed when I am currently viewing from the top of the project tree.
Is there a way to make Speedbar display information in this way?


(defun pnw-speedbar-vc-check-dir-p (directory)
  "Return t if we should bother checking DIRECTORY for version control
files.
This can be overloaded to add new types of version control systems."
  (or
   ;; Local CVS available in Emacs 21
   (and (fboundp 'vc-state)
	(or
	 (file-exists-p (concat directory "CVS/"))
	 (file-exists-p (concat directory ".svn/"))
	 (file-exists-p (concat directory ".bzr/"))
	 (file-exists-p (concat directory ".git/"))
	 ))
   ;; Local RCS
   (file-exists-p (concat directory "RCS/"))
   ;; Local SCCS
   (file-exists-p (concat directory "SCCS/"))
   ;; Remote SCCS project
   (let ((proj-dir (getenv "PROJECTDIR")))
     (if proj-dir
     (file-exists-p (concat proj-dir "/SCCS"))
     nil))
   ;; User extension
   (run-hook-with-args-until-success 'speedbar-vc-directory-enable-
hook
                                     directory)
   ))

(add-hook 'speedbar-vc-directory-enable-hook 'pnw-speedbar-vc-check-
dir-p)

(setq speedbar-verbosity-level 3)


Thanks in advance,
Per Nordlöw

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-07-05 16:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-05 16:02 Version Control in Speedbar (speedbar-vc) Nordlöw

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).