Skip to content

Conversation

jcs090218
Copy link
Member

Another attempt for #316.

@jcs090218 jcs090218 added the enhancement New feature or request label Apr 3, 2025
@github-actions github-actions bot added the documentation Improvements or additions to documentation label Apr 3, 2025
@jcs090218 jcs090218 changed the title feat(install): Add commands install-file and install-vc feat(install): Add commands install-file and install-vc Apr 3, 2025
@jcs090218 jcs090218 force-pushed the feat/inst-file-and-vc branch from 0dca049 to 658b52c Compare April 3, 2025 19:20
@jcs090218 jcs090218 force-pushed the feat/inst-file-and-vc branch from 709048e to 3326ca8 Compare April 3, 2025 19:48
@jcs090218 jcs090218 merged commit 8c5562d into master Apr 3, 2025
177 checks passed
@jcs090218 jcs090218 deleted the feat/inst-file-and-vc branch April 3, 2025 22:18
(defun eask-install-file--packages (files)
"The file install packages with FILES."
(let* ((deps (mapcar (lambda (file)
(list (eask-install-file--guess-name file) file))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks if the package name does not match the folder name, and for tar.gz files.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks if the package name does not match the folder name, and for tar.gz files.

This sounds reasonable to me. Any suggestions? :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I've put a fix up in #318 (copied the idea from #316). Specifically, I've made sure that the target package name must be found by package.el otherwise fail.

(eask-log "Installing %s specified file package%s..." len s)
(eask-msg "")
(eask--package-mapc (lambda (dep &rest _)
(apply #'eask-package-install-file dep))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --force flag is checked in eask-package-install-file but installed packages are filtered before calling it. I think this means that --force has no effect.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The --force flag is checked in eask-package-install-file but installed packages are filtered before calling it. I think this means that --force has no effect.

No, those are used for calculating installed packages. It's not the prettiest solution. 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah it's used later in a different place.


(eask-load "core/install-file")

(defun eask-install-vc--split-sepcs (specs)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't work for e.g. company-mode/company-mode where the package is named company

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this probably doesn't work.

This is a rough implementation since I currently doesn't have a good idea to handle multiple specs. 🤔 But I'm looking forward to improve this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants