Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Only install elpa packages when we're online.

Also workaround elpa bug regarding inf-ruby.
  • Loading branch information...
commit d17299b49df190e8f17a38c02b4fb7bb8ff4460a 1 parent 336a185
@technomancy authored
Showing with 14 additions and 5 deletions.
  1. +2 −0  TODO
  2. +12 −5 starter-kit-elpa.el
View
2  TODO
@@ -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
View
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."
(interactive)
(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.
-(ignore-errors
- (message "Checking base list of packages...")
- (starter-kit-elpa-install))
+(when (esk-online?) (starter-kit-elpa-install))
(provide 'starter-kit-elpa)
Please sign in to comment.
Something went wrong with that request. Please try again.