From af3bc492a83e4b32b36252e95ff1b0e2eda75c84 Mon Sep 17 00:00:00 2001 From: Abdelhak Bougouffa Date: Sun, 1 Dec 2024 17:47:35 +0100 Subject: [PATCH] fix: remove references to `straight` --- core/me-lib-extra.el | 66 ++++++++----------------------- modules/obsolete/me-platformio.el | 4 -- modules/obsolete/me-projectile.el | 4 -- modules/on-demand/me-nim.el | 4 -- 4 files changed, 17 insertions(+), 61 deletions(-) diff --git a/core/me-lib-extra.el b/core/me-lib-extra.el index c8098f38..f26ef1c7 100644 --- a/core/me-lib-extra.el +++ b/core/me-lib-extra.el @@ -30,19 +30,11 @@ Call functions without asking when DONT-ASK-P is non-nil." "Update MinEmacs packages to the last revisions (can cause breakages)." (interactive) ;; Load all modules + (user-error "Not yet implemented for `package'") (message "[MinEmacs]: Loading all modules and on-demand modules") (apply #'minemacs-load-module (minemacs-modules t)) - ;; Update straight recipe repositories - (straight-pull-recipe-repositories) - - ;; Run `straight's update cycle, taking into account the explicitly pinned versions - (message "[MinEmacs]: Pulling packages") - (straight-x-pull-all) - (message "[MinEmacs]: Freezing packages") - (straight-x-freeze-versions) - (message "[MinEmacs]: Rebuilding packages") - (straight-rebuild-all) + ;; TODO: Implement for `package' ;; Run package-specific build functions (ex: `pdf-tools-install') (message "[MinEmacs]: Running additional package-specific build functions") @@ -55,22 +47,13 @@ This takes into account the explicitly pinned packages. When called with \\[universal-argument] or with PULL-MINEMACS, it will run \"git pull\" in MinEmacs directory before upgrading." (interactive "P") + (user-error "Not yet implemented for `package'") (when pull-minemacs (let ((default-directory minemacs-root-dir)) (vc-pull))) - ;; Update straight recipe repositories - (straight-pull-recipe-repositories) - ;; This will ensure that the pinned lockfile is up-to-date - (straight-x-freeze-pinned-versions) - ;; Restore packages to the versions pinned in the lockfiles - (when (file-exists-p (concat straight-base-dir "versions/pinned.el")) - (message "[MinEmacs] Restoring pinned versions of packages") - (straight-x-thaw-pinned-versions)) - (message "[MinEmacs] Restoring packages from the global lockfile versions") - (straight-thaw-versions) - ;; Rebuild the packages - (message "[MinEmacs] Rebuilding packages") - (straight-rebuild-all) + + ;; TODO: Implement for `package' + ;; Run package-specific build functions (ex: `pdf-tools-install') (message "[MinEmacs] Running additional package-specific build functions") (minemacs-run-build-functions 'dont-ask)) @@ -82,19 +65,6 @@ in MinEmacs directory before upgrading." (mapc (+apply-partially-right #'+delete-file-or-directory 'trash 'recursive) (directory-files minemacs-root-dir nil (rx (seq bol (or "eln-cache" "auto-save-list" "elpa") eol)))))) -;;;###autoload -(defun +straight-prune-build-cache () - "Prune straight.el build directories for old Emacs versions." - (let* ((default-directory (file-name-concat straight-base-dir "straight/"))) - ;; Prune the build cache and build directory. - (straight-prune-build) - ;; Prune old build directories - (mapc (+apply-partially-right #'+delete-file-or-directory 'trash 'recursive) - (seq-filter - (lambda (name) - (not (member name (list straight-build-dir (concat straight-build-dir "-cache.el") "versions" "repos")))) - (directory-files default-directory nil directory-files-no-dot-files-regexp))))) - ;;;###autoload (defun minemacs-cleanup-emacs-directory () "Cleanup unwanted files/directories from MinEmacs' directory." @@ -103,8 +73,6 @@ in MinEmacs directory before upgrading." (+info! "Trying to clean outdated native compile cache") ;; Delete outdated natively compiled files when Emacs become idle (+shutup! (native-compile-prune-cache))) - (+info! "Trying to clean outdated straight build cache") - (+shutup! (+straight-prune-build-cache)) (+info! "Trying to clean MinEmacs' root directory") (+shutup! (minemacs-root-dir-cleanup))) @@ -859,17 +827,17 @@ the children of class at point." "Request documentation for the thing at point." (interactive) (eglot--dbind ((Hover) contents range) - (jsonrpc-request (eglot--current-server-or-lose) :textDocument/hover (eglot--TextDocumentPositionParams)) - (let ((blurb (and (not (seq-empty-p contents)) (eglot--hover-info contents range))) - (hint (thing-at-point 'symbol))) - (if blurb - (with-current-buffer (or (and (buffer-live-p +eglot--help-buffer) +eglot--help-buffer) - (setq +eglot--help-buffer (generate-new-buffer "*eglot-help*"))) - (with-help-window (current-buffer) - (rename-buffer (format "*eglot-help for %s*" hint)) - (with-current-buffer standard-output (insert blurb)) - (setq-local nobreak-char-display nil))) - (display-local-help))))) + (jsonrpc-request (eglot--current-server-or-lose) :textDocument/hover (eglot--TextDocumentPositionParams)) + (let ((blurb (and (not (seq-empty-p contents)) (eglot--hover-info contents range))) + (hint (thing-at-point 'symbol))) + (if blurb + (with-current-buffer (or (and (buffer-live-p +eglot--help-buffer) +eglot--help-buffer) + (setq +eglot--help-buffer (generate-new-buffer "*eglot-help*"))) + (with-help-window (current-buffer) + (rename-buffer (format "*eglot-help for %s*" hint)) + (with-current-buffer standard-output (insert blurb)) + (setq-local nobreak-char-display nil))) + (display-local-help))))) diff --git a/modules/obsolete/me-platformio.el b/modules/obsolete/me-platformio.el index 169404bb..ddcfebd5 100644 --- a/modules/obsolete/me-platformio.el +++ b/modules/obsolete/me-platformio.el @@ -10,13 +10,9 @@ ;; PlatformIO integration for Emacs -(push 'projectile straight-built-in-pseudo-packages) - (use-package platformio-mode :ensure t) -(cl-callf2 remove 'projectile straight-built-in-pseudo-packages) - (provide 'obsolete/me-platformio) ;;; me-platformio.el ends here diff --git a/modules/obsolete/me-projectile.el b/modules/obsolete/me-projectile.el index e5f99e24..0c620324 100644 --- a/modules/obsolete/me-projectile.el +++ b/modules/obsolete/me-projectile.el @@ -8,10 +8,6 @@ ;;; Code: -;; Remove `projectile' form the `straight-built-in-pseudo-packages' in case it -;; has been added -(cl-callf2 remq 'projectile straight-built-in-pseudo-packages) - (use-package projectile :ensure t :after minemacs-loaded diff --git a/modules/on-demand/me-nim.el b/modules/on-demand/me-nim.el index 4216b304..0fc24230 100644 --- a/modules/on-demand/me-nim.el +++ b/modules/on-demand/me-nim.el @@ -13,14 +13,10 @@ :auto-mode '(("\\.nim\\'" . nim-mode) ("\\.nim\\(ble\\|s\\)\\'" . nimscript-mode-maybe))) -(push 'flycheck-nimsuggest straight-built-in-pseudo-packages) - ;; A major mode for the Nim programming language (use-package nim-mode :ensure t) -(cl-callf2 remq 'flycheck-nimsuggest straight-built-in-pseudo-packages) - (provide 'on-demand/me-nim) ;;; me-nim.el ends here