-
Notifications
You must be signed in to change notification settings - Fork 13
pr use package definitions in install test #1050
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,9 @@ | ||
| ;; .emacs | ||
| ;;; -*- mode:emacs-lisp; lexical-binding: t; -*- | ||
|
|
||
| (require 'package) | ||
| (setq package-native-compile t) | ||
| (add-to-list 'package-archives '("gnu-devel" . "https://elpa.gnu.org/devel/")) | ||
| (unless (package-installed-p 'hyperbole) | ||
| (package-refresh-contents) | ||
| (package-install 'hyperbole)) | ||
| (hyperbole-mode 1) | ||
|
|
||
| (message "%s" "Hyperbole successfully installed and activated") | ||
| (unless (locate-library "hyperbole") | ||
| (package-install 'hyperbole)) | ||
|
|
||
| ;;; End of elpa-devel-emacs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,7 @@ | ||
| ;; .emacs | ||
| ;;; -*- mode: emacs-lisp; lexical-binding: t; -*- | ||
|
|
||
| (require 'package) | ||
| (setq package-native-compile t) | ||
| (unless (package-installed-p 'hyperbole) | ||
| (package-refresh-contents) | ||
| (package-install 'hyperbole)) | ||
| (hyperbole-mode 1) | ||
| (unless (locate-library "hyperbole") | ||
| (package-install 'hyperbole)) | ||
|
|
||
| (message "%s" "Hyperbole successfully installed and activated") | ||
| ;;; End elpa-emacs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| ;;; -*- lexical-binding: t; -*- | ||
|
|
||
| (setq package-enable-at-startup nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,65 +1,56 @@ | ||
| ;; .emacs | ||
| ;;; -*- mode: emacs-lisp; lexical-binding: t; -*- | ||
|
|
||
| ;; elpaca | ||
| (defvar elpaca-installer-version 0.5) | ||
| (defvar elpaca-installer-version 0.12) | ||
| (defvar elpaca-directory (expand-file-name "elpaca/" user-emacs-directory)) | ||
| (defvar elpaca-builds-directory (expand-file-name "builds/" elpaca-directory)) | ||
| (defvar elpaca-repos-directory (expand-file-name "repos/" elpaca-directory)) | ||
| (defvar elpaca-sources-directory (expand-file-name "sources/" elpaca-directory)) | ||
| (defvar elpaca-order '(elpaca :repo "https://github.com/progfolio/elpaca.git" | ||
| :ref nil | ||
| :files (:defaults (:exclude "extensions")) | ||
| :build (:not elpaca--activate-package))) | ||
| (let* ((repo (expand-file-name "elpaca/" elpaca-repos-directory)) | ||
| :ref nil :depth 1 :inherit ignore | ||
| :files (:defaults "elpaca-test.el" (:exclude "extensions")) | ||
| :build (:not elpaca-activate))) | ||
| (let* ((repo (expand-file-name "elpaca/" elpaca-sources-directory)) | ||
| (build (expand-file-name "elpaca/" elpaca-builds-directory)) | ||
| (order (cdr elpaca-order)) | ||
| (default-directory repo)) | ||
| (add-to-list 'load-path (if (file-exists-p build) build repo)) | ||
| (unless (file-exists-p repo) | ||
| (make-directory repo t) | ||
| (when (< emacs-major-version 28) (require 'subr-x)) | ||
| (when (<= emacs-major-version 28) (require 'subr-x)) | ||
| (condition-case-unless-debug err | ||
| (if-let ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*")) | ||
| ((zerop (call-process "git" nil buffer t "clone" | ||
| (plist-get order :repo) repo))) | ||
| ((zerop (call-process "git" nil buffer t "checkout" | ||
| (or (plist-get order :ref) "--")))) | ||
| (emacs (concat invocation-directory invocation-name)) | ||
| ((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch" | ||
| "--eval" "(byte-recompile-directory \".\" 0 'force)"))) | ||
| ((require 'elpaca)) | ||
| ((elpaca-generate-autoloads "elpaca" repo))) | ||
| (if-let* ((buffer (pop-to-buffer-same-window "*elpaca-bootstrap*")) | ||
| ((zerop (apply #'call-process `("git" nil ,buffer t "clone" | ||
| ,@(when-let* ((depth (plist-get order :depth))) | ||
| (list (format "--depth=%d" depth) "--no-single-branch")) | ||
| ,(plist-get order :repo) ,repo)))) | ||
| ((zerop (call-process "git" nil buffer t "checkout" | ||
| (or (plist-get order :ref) "--")))) | ||
| (emacs (concat invocation-directory invocation-name)) | ||
| ((zerop (call-process emacs nil buffer nil "-Q" "-L" "." "--batch" | ||
| "--eval" "(byte-recompile-directory \".\" 0 'force)"))) | ||
| ((require 'elpaca)) | ||
| ((elpaca-generate-autoloads "elpaca" repo))) | ||
| (progn (message "%s" (buffer-string)) (kill-buffer buffer)) | ||
| (error "%s" (with-current-buffer buffer (buffer-string)))) | ||
| ((error) (warn "%s" err) (delete-directory repo 'recursive)))) | ||
| (unless (require 'elpaca-autoloads nil t) | ||
| (require 'elpaca) | ||
| (elpaca-generate-autoloads "elpaca" repo) | ||
| (load "./elpaca-autoloads"))) | ||
| (let ((load-source-file-function nil)) (load "./elpaca-autoloads")))) | ||
| (add-hook 'after-init-hook #'elpaca-process-queues) | ||
| (elpaca `(,@elpaca-order)) | ||
|
|
||
| ;; Install use-package support | ||
| (elpaca elpaca-use-package | ||
| ;; Enable :elpaca use-package keyword. | ||
| (elpaca-use-package-mode) | ||
| ;; Assume :elpaca t unless otherwise specified. | ||
| (setq elpaca-use-package-by-default t)) | ||
| (elpaca-use-package-mode)) | ||
|
|
||
| ;; Block until current queue processed. | ||
| (elpaca-wait) | ||
|
|
||
| ;; (setq package-native-compile t) | ||
| ;; Install Hyperbole | ||
| (unless (locate-library "hyperbole") | ||
| (elpaca 'hyperbole | ||
| :files ("*" (:exclude "man" "man/*"))) | ||
| (elpaca-wait)) | ||
|
|
||
| (use-package hyperbole | ||
| :pin #:elpa-devel | ||
| :elpaca (:files ("*" "man/*" (:exclude "man")))) | ||
|
|
||
| (elpaca-process-queues) | ||
| (elpaca-wait) | ||
|
|
||
| ;; (unless (package-installed-p 'hyperbole) | ||
| ;; (package-refresh-contents) | ||
| ;; (package-install 'hyperbole)) | ||
| (elpaca nil (hyperbole-mode 1)) | ||
|
|
||
| (elpaca nil (message "%s" "Hyperbole successfully installed and activated")) | ||
| ;;; End elpaca-emacs |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo *** Install test *** | ||
|
|
||
| set -e | ||
|
|
||
| im="$1" | ||
| [[ -n "$2" ]] && debug="t" | ||
|
|
||
| mkdir -p ${HOME}/.emacs.d | ||
|
|
||
| [ -e ${im}-install-local.sh ] && ./${im}-install-local.sh | ||
|
|
||
| cp ${im}-emacs ${HOME}/.emacs.d/init.el | ||
| cat /tmp/use-package.el >> ${HOME}/.emacs.d/init.el | ||
| [ -e ${im}-early-init ] && cp ${im}-early-init ${HOME}/.emacs.d/early-init.el | ||
|
|
||
| cd $HOME | ||
|
|
||
| # Debug - before install | ||
| [[ -n "$debug" ]] && bash | ||
|
|
||
| # Initial startup will install Hyperbole | ||
| emacs -nw --eval "(kill-emacs 0)" | ||
|
|
||
| # Verify installation | ||
| if emacs -nw \ | ||
| --eval "(kill-emacs | ||
| (if (and (featurep (quote hyperbole)) | ||
| (bound-and-true-p hyperbole-mode)) | ||
| 0 | ||
| 1))" | ||
| then | ||
| echo -e "\n\n*** Hyperbole ${im} installed OK ***\n\n" | ||
| else | ||
| echo -e "\n\n*** ERROR: Hyperbole ${im} was not installed properly ***\n\n" | ||
| # Inspect the installation on error | ||
| bash | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Debug - after install | ||
| [[ -n "$debug" ]] && bash |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,10 @@ | ||
| ;; .emacs | ||
| ;;; -*- mode: emacs-lisp; lexical-binding: t; -*- | ||
|
|
||
| (require 'package) | ||
| (setq package-native-compile t) | ||
| (add-to-list 'package-archives '("melpa-releases" . "https://releases.melpa.org/packages/")) | ||
| (setq package-pinned-packages '((hyperbole . "melpa-releases"))) | ||
| (unless (package-installed-p 'hyperbole) | ||
| (package-refresh-contents) | ||
| (package-install 'hyperbole)) | ||
| (hyperbole-mode 1) | ||
|
|
||
| (message "%s" "Hyperbole successfully installed and activated") | ||
| (unless (locate-library "hyperbole") | ||
| (package-install 'hyperbole)) | ||
|
|
||
| ;;; End melpa-releases |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| ;;; -*- mode: emacs-lisp; lexical-binding: t; -*- | ||
|
|
||
| (require 'package) | ||
| (add-to-list 'package-archives '("melpa-snapshots" . "https://snapshots.melpa.org/packages/")) | ||
| (setq package-pinned-packages '((hyperbole . "melpa-snapshots"))) | ||
|
|
||
| (unless (locate-library "hyperbole") | ||
| (package-install 'hyperbole)) | ||
|
|
||
| ;;; End melpa-snapshots-emacs |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't your additional 'use-package' file replace the configuration in man/hy-package.el; if so, update the description on that one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is correct. My plan is to update the documentation to use the "new" use-package file but to do that in another PR. Not doing to much in each PR and partly unrelated. So man/hy-package.el is still used by the documentation so I leave it untouched here to be fixed later.
I would also want to discuss how the use-package declaration looks like and would want to do that before we update the docs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rswgnu OK?