Browse files

Only install elpa packages when we're online.

Also workaround elpa bug regarding inf-ruby.
  • Loading branch information...
1 parent 336a185 commit d17299b49df190e8f17a38c02b4fb7bb8ff4460a @technomancy technomancy committed Dec 27, 2008
Showing with 14 additions and 5 deletions.
  1. +2 −0 TODO
  2. +12 −5 starter-kit-elpa.el
@@ -11,6 +11,8 @@ to write/finish:
* ri
* submit ruby fixes to flymake
+which-func-mode in ruby?
Bug fixes:
get jabber.el to automatically disconnect when suspending/hibernating (via dbus)
ruby-compilation.el should auto-kill the buffer on successful test runs; only leave it open on error/fail
17 starter-kit-elpa.el
@@ -30,18 +30,25 @@
"Libraries that should be installed by default.")
+;; Work around a bug in ELPA
+(ignore-errors (load "elpa/inf-ruby-2.0/inf-ruby-autoloads"))
(defun starter-kit-elpa-install ()
"Install all starter-kit packages that aren't installed."
(dolist (package starter-kit-packages)
- (unless (member package package-activated-list)
+ (unless (or (member package package-activated-list)
+ (functionp package))
(message "Installing %s" (symbol-name package))
(package-install package))))
+(defun esk-online? ()
+ (some (lambda (iface) (unless (equal "lo" (car iface))
+ (member 'up (first (last (network-interface-info
+ (car iface)))))))
+ (network-interface-list)))
;; On your first run, this should pull in all the base packages.
-;; But you might not be online, so ignore errors.
- (message "Checking base list of packages...")
- (starter-kit-elpa-install))
+(when (esk-online?) (starter-kit-elpa-install))
(provide 'starter-kit-elpa)

0 comments on commit d17299b

Please sign in to comment.