From: Nordlöw <per.nordlow@gmail.com>
To: help-gnu-emacs@gnu.org
Subject: Version Control in Speedbar (speedbar-vc)
Date: Thu, 05 Jul 2007 16:02:55 -0000 [thread overview]
Message-ID: <1183651375.443622.286390@n2g2000hse.googlegroups.com> (raw)
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
reply other threads:[~2007-07-05 16:02 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
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=1183651375.443622.286390@n2g2000hse.googlegroups.com \
--to=per.nordlow@gmail.com \
--cc=help-gnu-emacs@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.
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).