Disable Quelpa updates if not connected to the Internet
This commit is contained in:
parent
36a81c2797
commit
165d57ce1b
6
init.org
6
init.org
|
@ -63,8 +63,12 @@ Some background is important to understand my keybinding choices -
|
||||||
:fetcher git
|
:fetcher git
|
||||||
:url "https://github.com/quelpa/quelpa-use-package.git"))
|
:url "https://github.com/quelpa/quelpa-use-package.git"))
|
||||||
(require 'quelpa-use-package)
|
(require 'quelpa-use-package)
|
||||||
|
;; Don't upgrade Quelpa packages if there's no connectivity.
|
||||||
|
;; Courtesy https://emacs.stackexchange.com/a/18515
|
||||||
|
(defun my-internet-up-p (host)
|
||||||
|
(= 0 (call-process "ping" nil nil nil "-c" "1" "-W" "1" host)))
|
||||||
(setq quelpa-checkout-melpa-p nil
|
(setq quelpa-checkout-melpa-p nil
|
||||||
quelpa-upgrade-p t)
|
quelpa-upgrade-p (my-internet-up-p "github.com"))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
* TODO dvorak [60%]
|
* TODO dvorak [60%]
|
||||||
|
|
Loading…
Reference in New Issue