From 2310eea6dfd270881026ecf1707c608eaca69ba0 Mon Sep 17 00:00:00 2001 From: Kaushal Modi Date: Wed, 5 Sep 2018 15:53:57 -0400 Subject: [PATCH] No need to keep GNU Elpa in package-archives when testing This commit was needed because Travis CI started failing as elpa.gnu.org was down. Removing GNU Elpa from package-archive should prevent that unnecessary failure. --- test/setup-ox-hugo.el | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/test/setup-ox-hugo.el b/test/setup-ox-hugo.el index ca836ff..10990a7 100644 --- a/test/setup-ox-hugo.el +++ b/test/setup-ox-hugo.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2018-09-05 13:50:11 kmodi> +;; Time-stamp: <2018-09-05 15:53:44 kmodi> ;; Setup to export Org files to Hugo-compatible Markdown using ;; `ox-hugo' in an "emacs -Q" environment. @@ -99,16 +99,19 @@ even if they are found as dependencies." ;; Below require will auto-create `package-user-dir' it doesn't exist. (require 'package) + ;; Even if we don't need to install Org from Elpa, we need to + ;; add Org Elpa in `package-archives' to prevent the "Package + ;; ‘org-9.0’ is unavailable" error. + ;; + ;; `setq' is used instead of `add-to-list' because we don't need + ;; the default GNU Elpa archive for this test. + (setq package-archives '(("org" . "https://orgmode.org/elpa/"))) ;For latest stable `org' + (let* ((no-ssl (and (memq system-type '(windows-nt ms-dos)) (not (gnutls-available-p)))) (url (concat (if no-ssl "http" "https") "://melpa.org/packages/"))) (add-to-list 'package-archives (cons "melpa" url))) ;For `toc-org' - ;; Even if we don't need to install Org from Elpa, we need to - ;; add Org Elpa in `package-archives' to prevent the "Package - ;; ‘org-9.0’ is unavailable" error. - (add-to-list 'package-archives '("org" . "https://orgmode.org/elpa/")) ;For latest stable `org' - ;; Load emacs packages and activate them. ;; Don't delete this line. (package-initialize)