diff --git a/Makefile b/Makefile index 506e9b6e..7889ff94 100644 --- a/Makefile +++ b/Makefile @@ -123,7 +123,7 @@ emacs-batch: @echo "" @echo "$(ORG_FILE) ::" @$(EMACS) --batch --eval "(progn\ - (setenv \"OX_HUGO_ELPA\" \"$(OX_HUGO_TMP_DIR)\")\ + (setenv \"OX_HUGO_TMP_DIR\" \"$(OX_HUGO_TMP_DIR)\")\ (setenv \"TEST_ENABLED\" \"$(TEST_ENABLED)\")\ (load-file (expand-file-name \"setup-ox-hugo.el\" \"$(OX_HUGO_TEST_DIR)\"))\ )" $(ORG_FILE) \ @@ -140,7 +140,7 @@ ifeq ("$(EMACS_exists)","") endif @echo "Emacs binary used: $(EMACS)" @$(EMACS) --batch --eval "(progn\ - (setenv \"OX_HUGO_ELPA\" \"$(OX_HUGO_TMP_DIR)\")\ + (setenv \"OX_HUGO_TMP_DIR\" \"$(OX_HUGO_TMP_DIR)\")\ (load-file (expand-file-name \"setup-ox-hugo.el\" \"$(OX_HUGO_TEST_DIR)\"))\ (message \"[Version check] Emacs %s\" emacs-version)\ (message \"[Version check] %s\" (org-version nil :full))\ diff --git a/test/setup-ox-hugo.el b/test/setup-ox-hugo.el index 25cad828..0aa60df9 100644 --- a/test/setup-ox-hugo.el +++ b/test/setup-ox-hugo.el @@ -1,4 +1,4 @@ -;; Time-stamp: <2018-11-01 00:37:59 kmodi> +;; Time-stamp: <2019-01-02 17:54:59 kmodi> ;; Setup to export Org files to Hugo-compatible Markdown using ;; `ox-hugo' in an "emacs -Q" environment. @@ -29,7 +29,7 @@ minimum requirement for `ox-hugo'. So set the environment variable OX_HUGO_DEFAULT_ORG to a value like 1 if using emacs 26 or newer.") -(defvar ox-hugo-elpa (let ((dir (getenv "OX_HUGO_ELPA"))) +(defvar ox-hugo-tmp-dir (let ((dir (getenv "OX_HUGO_TMP_DIR"))) (unless dir (setq dir (let* ((dir-1 (file-name-as-directory (expand-file-name user-login-name temporary-file-directory))) @@ -39,7 +39,7 @@ or newer.") (make-directory dir :parents) dir)) (when ox-hugo-test-setup-verbose - (message "ox-hugo-elpa: %s" ox-hugo-elpa)) + (message "ox-hugo-tmp-dir: %s" ox-hugo-tmp-dir)) (defvar ox-hugo-packages '(toc-org)) (when ox-hugo-install-org-from-elpa @@ -87,13 +87,13 @@ even if they are found as dependencies." (advice-add 'package-compute-transaction :filter-return #'ox-hugo-package-dependency-check-ignore) ;; (advice-remove 'package-compute-transaction #'ox-hugo-package-dependency-check-ignore) -(if (and (stringp ox-hugo-elpa) - (file-exists-p ox-hugo-elpa)) +(if (and (stringp ox-hugo-tmp-dir) + (file-exists-p ox-hugo-tmp-dir)) (progn ;; Load newer version of .el and .elc if both are available (setq load-prefer-newer t) - (setq package-user-dir (format "%selpa_%s/" ox-hugo-elpa emacs-major-version)) + (setq package-user-dir (format "%selpa_%s/" ox-hugo-tmp-dir emacs-major-version)) ;; Below require will auto-create `package-user-dir' it doesn't exist. (require 'package) @@ -141,7 +141,7 @@ to be installed.") (message "Installing `%s' .." p) (package-install p)) (setq ox-hugo-missing-packages '()))) - (error "The environment variable OX_HUGO_ELPA needs to be set")) + (error "The environment variable OX_HUGO_TMP_DIR needs to be set")) ;; Remove Org that ships with Emacs from the `load-path' if installing ;; it from Elpa.