diff --git a/CHANGELOG.md b/CHANGELOG.md index 88f8337c..bc916eca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how * fix(lint): match behavior of declare linter to checkdoc (#272) * fix(test): ERT test fails on Emacs 30+ (cc1f4e15b7b40b986ad1a93f6e40d121340598de) * fix(test): eask options should not be passed to buttercup (#281) +* feat(core): Lazy install on required packages (#284) ## 0.10.x > Released Jun 13, 2024 diff --git a/docs/content/Development-API/_index.en.md b/docs/content/Development-API/_index.en.md index 31d4bc95..20aeb244 100644 --- a/docs/content/Development-API/_index.en.md +++ b/docs/content/Development-API/_index.en.md @@ -249,7 +249,7 @@ Initialize packages for use. Scope that temporary makes archives available. -`ARCHIVES` can either be a string or a list of strings. +The argument `ARCHIVES` can either be a string or a list of strings. ```elisp (eask-with-archives "melpa" @@ -260,6 +260,21 @@ Scope that temporary makes archives available. 💡 This is handy when you need certain packages from certain archives. {{< /hint >}} +## 🔍 Function: eask-archive-install-packages (`archives` `names`) + +Install packages with archives setup. + +The arugment `names` can be a symbol or list of symbols. + +```elisp +(eask-archive-install-packages '("gnu" "melpa") + 'el2org) ; accept list +``` + +{{< hint info >}} +💡 This only installs packages if they are missing. +{{< /hint >}} + ## 🔍 Function: eask-package-desc (`name` &optional `current`) Build package descriptor for a package. @@ -975,7 +990,7 @@ Return size of the current package. Create execution with the responsive message output. ```elisp -(eask-with-progress +(eask-with-progress "Downloading files... " (eask-with-verbosity 'debug ; Often used with `eask-with-verbosity' ;; Execute some operations.. diff --git a/docs/content/Development-API/_index.zh-tw.md b/docs/content/Development-API/_index.zh-tw.md index a7b9cc7f..90b3c8bf 100644 --- a/docs/content/Development-API/_index.zh-tw.md +++ b/docs/content/Development-API/_index.zh-tw.md @@ -246,7 +246,7 @@ $ eask init 臨時使存檔可用的範圍。 -`ARCHIVES` 可以是字符串或字符串列表。 +參數 `archives` 可以是字串或字串列表。 ```elisp (eask-with-archives "melpa" @@ -254,7 +254,22 @@ $ eask init ``` {{< hint info >}} -💡 當您需要某些檔案中的某些包時,這很方便。 +💡 當您需要某些存檔中的特定套件時,這非常方便。 +{{< /hint >}} + +## 🔍 函式: eask-archive-install-packages (`archives` `names`) + +使用 archives 設定安裝套件。 + +參數 `names` 可以是符號或符號列表。 + +```elisp +(eask-archive-install-packages '("gnu" "melpa") + 'el2org) ; 接受列表 +``` + +{{< hint info >}} +💡 這只會在套件遺失時安裝套件。 {{< /hint >}} ## 🔍 函式: eask-package-desc (`name` &optional `current`) @@ -965,7 +980,7 @@ This will kill Emacs process. 使用響應消息輸出創建執行。 ```elisp -(eask-with-progress +(eask-with-progress "檔案下載中s... " (eask-with-verbosity 'debug ; 通常與 `eask-with-verbosity` 一起使用 ;; 執行一些操作..