text:
doom upgrade fails while updating packages

What did you expect to happen?
I am trying to update Doom with ~/.emacs.d/bin/doom upgrade
What actually happened?
The upgrade stops at "Updating packages" with:
  > Updating packages (this may take a while)...
    > In repository "highlight", HEAD (on branch "master") has diverged from branch "melpa"

         1) Abort
         2) Merge HEAD to branch "melpa"
         3) Reset branch "melpa" to HEAD
         4) Reset HEAD to branch "melpa" (Recommended)
         5) Rebase HEAD onto branch "melpa" and fast-forward "melpa" to HEAD

      How to proceed? (1, 2, 3, 4, 5)

when I choose the recommended option I get:
      x There was an unexpected package error
        error: pathspec 'melpa' did not match any file(s) known to git
      ! Extended backtrace logged to ~/.emacs.d/.local/doom.error.log

Additional details:
I include the doom.error.log file.

# -*- lisp-interaction -*-
# vim: set ft=lisp:
(error "Failed to run "git"; see buffer straight-process")
(signal error ("Failed to run "git"; see buffer straight-process"))
(error "Failed to run %S; see buffer %s" "git" "straight-process")
(if (car result) (cdr result) (error "Failed to run %S; see buffer %s" program straight-process-buffer))
(let ((result (apply #'straight--call program args))) (if (car result) (cdr result) (error "Failed to run %S; see buffer %s" program straight-process-buffer)))
(straight--get-call-raw "git" "checkout" "melpa")
(apply straight--get-call-raw "git" ("checkout" "melpa"))
(string-trim (apply #'straight--get-call-raw program args))
(straight--get-call "git" "checkout" "melpa")
((closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "checkout" branch)))
(funcall (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "checkout" branch)))
(let* ((options (cons #'(lambda nil (let ((doom-output-indent 0)) (terpri) (doom--print (doom--format (format (doom--output-class 'warn "Aborted"))))) (kill-emacs 1)) (nreverse options))) (prompt (doom--format (format "How to proceed? (%s) " (mapconcat #'number-to-string (number-sequence 1 (length options)) ", ")))) answer fn) (while (null (nth (setq answer (1- (read-number prompt))) options)) (doom--print (doom--format (format (doom--output-class 'warn "%s is not a valid answer, try again.") answer)))) (funcall (nth answer options)))
(let (options) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format " 1) Abort"))) (let* ((--cl-var-- actions) (desc nil) (func nil) (--cl-var--) (--cl-var--)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) desc (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) func (car --cl-var--)) (if desc (progn (setq options (cons func options)) (doom--print (doom--format (format "%2s) %s" (1+ (length options)) (if (doom--straight-recommended-option-p prompt desc) (progn (setq doom--straight-discard-options nil) (doom--output-color 'green (concat desc " (Recommended)"))) desc)))))) (setq --cl-var-- (cdr --cl-var--))) nil)) (terpri) (let* ((options (cons #'(lambda nil (let ((doom-output-indent 0)) (terpri) (doom--print (doom--format (format (doom--output-class 'warn "Aborted"))))) (kill-emacs 1)) (nreverse options))) (prompt (doom--format (format "How to proceed? (%s) " (mapconcat #'number-to-string (number-sequence 1 (length options)) ", ")))) answer fn) (while (null (nth (setq answer (1- (read-number prompt))) options)) (doom--print (doom--format (format (doom--output-class 'warn "%s is not a valid answer, try again.") answer)))) (funcall (nth answer options))))
(let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (terpri) (let (options) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format " 1) Abort"))) (let* ((--cl-var-- actions) (desc nil) (func nil) (--cl-var--) (--cl-var--)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) desc (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) func (car --cl-var--)) (if desc (progn (setq options (cons func options)) (doom--print (doom--format (format "%2s) %s" (1+ (length options)) (if (doom--straight-recommended-option-p prompt desc) (progn (setq doom--straight-discard-options nil) (doom--output-color 'green (concat desc " (Recommended)"))) desc)))))) (setq --cl-var-- (cdr --cl-var--))) nil)) (terpri) (let* ((options (cons #'(lambda nil (let ((doom-output-indent 0)) (terpri) (doom--print (doom--format (format (doom--output-class 'warn "Aborted"))))) (kill-emacs 1)) (nreverse options))) (prompt (doom--format (format "How to proceed? (%s) " (mapconcat #'number-to-string (number-sequence 1 (length options)) ", ")))) answer fn) (while (null (nth (setq answer (1- (read-number prompt))) options)) (doom--print (doom--format (format (doom--output-class 'warn "%s is not a valid answer, try again.") answer)))) (funcall (nth answer options)))))
(if doom-auto-discard (let* ((doom-auto-accept t) (--cl-var-- actions) (desc nil) (func nil) (--cl-var--) (--cl-var--) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq --cl-var-- (car --cl-var--) --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) desc (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) func (car --cl-var--)) (if desc (if (doom--straight-recommended-option-p prompt desc) (setq --cl-var-- (funcall func) --cl-var-- nil) t) t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--) (doom--print (doom--format (format (doom--output-class 'start "%s") (doom--output-color 'red prompt)))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (terpri) (let (options) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format " 1) Abort"))) (let* ((--cl-var-- actions) (desc nil) (func nil) (--cl-var--) (--cl-var--)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) desc (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) func (car --cl-var--)) (if desc (progn (setq options (cons func options)) (doom--print (doom--format (format "%2s) %s" (1+ (length options)) (if (doom--straight-recommended-option-p prompt desc) (progn (setq doom--straight-discard-options nil) (doom--output-color 'green (concat desc " (Recommended)"))) desc)))))) (setq --cl-var-- (cdr --cl-var--))) nil)) (terpri) (let* ((options (cons #'(lambda nil (let ((doom-output-indent 0)) (terpri) (doom--print (doom--format (format (doom--output-class 'warn "Aborted"))))) (kill-emacs 1)) (nreverse options))) (prompt (doom--format (format "How to proceed? (%s) " (mapconcat #'number-to-string (number-sequence 1 (length options)) ", ")))) answer fn) (while (null (nth (setq answer (1- (read-number prompt))) options)) (doom--print (doom--format (format (doom--output-class 'warn "%s is not a valid answer, try again.") answer)))) (funcall (nth answer options))))))
(let ((doom--straight-discard-options doom--straight-discard-options)) (setq actions (delq (funcall 'assoc "C-g" actions) actions)) (setq actions (delq (funcall 'assoc "e" actions) actions)) (setq actions (delq (funcall 'assoc "g" actions) actions)) (if doom-auto-discard (let* ((doom-auto-accept t) (--cl-var-- actions) (desc nil) (func nil) (--cl-var--) (--cl-var--) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq --cl-var-- (car --cl-var--) --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) desc (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) func (car --cl-var--)) (if desc (if (doom--straight-recommended-option-p prompt desc) (setq --cl-var-- (funcall func) --cl-var-- nil) t) t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--) (doom--print (doom--format (format (doom--output-class 'start "%s") (doom--output-color 'red prompt)))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (terpri) (let (options) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format " 1) Abort"))) (let* ((--cl-var-- actions) (desc nil) (func nil) (--cl-var--) (--cl-var--)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) desc (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) func (car --cl-var--)) (if desc (progn (setq options (cons func options)) (doom--print (doom--format (format "%2s) %s" (1+ (length options)) (if (doom--straight-recommended-option-p prompt desc) (progn (setq doom--straight-discard-options nil) (doom--output-color 'green (concat desc " (Recommended)"))) desc)))))) (setq --cl-var-- (cdr --cl-var--))) nil)) (terpri) (let* ((options (cons #'(lambda nil (let ((doom-output-indent 0)) (terpri) (doom--print (doom--format (format (doom--output-class 'warn "Aborted"))))) (kill-emacs 1)) (nreverse options))) (prompt (doom--format (format "How to proceed? (%s) " (mapconcat #'number-to-string (number-sequence 1 (length options)) ", ")))) answer fn) (while (null (nth (setq answer (1- (read-number prompt))) options)) (doom--print (doom--format (format (doom--output-class 'warn "%s is not a valid answer, try again.") answer)))) (funcall (nth answer options)))))))
(if doom-interactive-p (funcall orig-fn prompt actions) (let ((doom--straight-discard-options doom--straight-discard-options)) (setq actions (delq (funcall 'assoc "C-g" actions) actions)) (setq actions (delq (funcall 'assoc "e" actions) actions)) (setq actions (delq (funcall 'assoc "g" actions) actions)) (if doom-auto-discard (let* ((doom-auto-accept t) (--cl-var-- actions) (desc nil) (func nil) (--cl-var--) (--cl-var--) (--cl-var-- t) --cl-var--) (while (and (consp --cl-var--) (progn (setq --cl-var-- (car --cl-var--) --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) desc (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) func (car --cl-var--)) (if desc (if (doom--straight-recommended-option-p prompt desc) (setq --cl-var-- (funcall func) --cl-var-- nil) t) t))) (setq --cl-var-- (cdr --cl-var--))) --cl-var--) (doom--print (doom--format (format (doom--output-class 'start "%s") (doom--output-color 'red prompt)))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (terpri) (let (options) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format " 1) Abort"))) (let* ((--cl-var-- actions) (desc nil) (func nil) (--cl-var--) (--cl-var--)) (while (consp --cl-var--) (setq --cl-var-- (car --cl-var--) --cl-var-- (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) desc (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) func (car --cl-var--)) (if desc (progn (setq options (cons func options)) (doom--print (doom--format (format "%2s) %s" (1+ (length options)) (if (doom--straight-recommended-option-p prompt desc) (progn (setq doom--straight-discard-options nil) (doom--output-color 'green (concat desc " (Recommended)"))) desc)))))) (setq --cl-var-- (cdr --cl-var--))) nil)) (terpri) (let* ((options (cons #'(lambda nil (let ((doom-output-indent 0)) (terpri) (doom--print (doom--format (format (doom--output-class 'warn "Aborted"))))) (kill-emacs 1)) (nreverse options))) (prompt (doom--format (format "How to proceed? (%s) " (mapconcat #'number-to-string (number-sequence 1 (length options)) ", ")))) answer fn) (while (null (nth (setq answer (1- (read-number prompt))) options)) (doom--print (doom--format (format (doom--output-class 'warn "%s is not a valid answer, try again.") answer)))) (funcall (nth answer options))))))))
(doom--straight-fallback-to-tty-prompt-a (closure (use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) (prompt actions) "Display PROMPT and allow user to choose between one of several ACTIONS.\nPROMPT is a string, generally a complete sentence. ACTIONS is a\nlist of lists (KEY DESC FUNC ARGS...). KEY is a string\nidentifying the key that triggers this action; it is passed to\nkbd'. DESC is a description string to be displayed in the popup.\nIf it is nil, the action and its binding is not displayed in the\npopup, although it still takes effect. If the user selects an\naction, its FUNC is called with ARGS and the popup is dismissed.\nThe return value of straight--popup-raw' is the return value of\nFUNC.\n\nACTIONS later in the list take precedence over earlier ones with\nregard to keybindings." (if noninteractive (progn (error (format "Cannot display prompt in batch mode: %s" prompt)))) (if (assoc "C-g" actions) nil (setq actions (append actions '(("C-g" "Cancel" keyboard-quit))))) (let ((keymap (make-sparse-keymap)) (func nil) (prompt (concat prompt "\n")) (max-length (apply #'max (mapcar #'length (mapcar #'car actions))))) (let ((--dolist-tail-- actions)) (while --dolist-tail-- (let ((action (car --dolist-tail--))) (let* ((args action) (key (if (cdr (cdr args)) (car-safe (prog1 args (setq args (cdr args)))) (signal 'wrong-number-of-arguments (list '(key desc func . args) (length args))))) (desc (car-safe (prog1 args (setq args (cdr args))))) (func (car-safe (prog1 args (setq args (cdr args)))))) (progn (if desc (progn (setq prompt (format "%s\n %s%s %s" prompt (make-string (- max-length (length key)) 32) key desc)))) (define-key keymap (kbd key) #'(lambda nil (interactive) (apply func args))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq prompt (concat prompt "\n\n")) (let ((max-mini-window-height 1.0) (cursor-in-echo-area t)) (if minibuffer-auto-raise (progn (raise-frame (window-frame (minibuffer-window))))) (while (not func) (setq func (lookup-key keymap (vector (read-key prompt)))))) (funcall func))) "In repository "highlight", HEAD (on branch "master") has diverged from branch "melpa"" (("m" "Merge HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) ("r" "Reset branch "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "reset" "--hard" ref-name))) ("c" "Reset HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "checkout" branch))) ("R" "Rebase HEAD onto branch "melpa" and fast-forward "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name))))))
(apply doom--straight-fallback-to-tty-prompt-a (closure (use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) (prompt actions) "Display PROMPT and allow user to choose between one of several ACTIONS.\nPROMPT is a string, generally a complete sentence. ACTIONS is a\nlist of lists (KEY DESC FUNC ARGS...). KEY is a string\nidentifying the key that triggers this action; it is passed to\nkbd'. DESC is a description string to be displayed in the popup.\nIf it is nil, the action and its binding is not displayed in the\npopup, although it still takes effect. If the user selects an\naction, its FUNC is called with ARGS and the popup is dismissed.\nThe return value of straight--popup-raw' is the return value of\nFUNC.\n\nACTIONS later in the list take precedence over earlier ones with\nregard to keybindings." (if noninteractive (progn (error (format "Cannot display prompt in batch mode: %s" prompt)))) (if (assoc "C-g" actions) nil (setq actions (append actions '(("C-g" "Cancel" keyboard-quit))))) (let ((keymap (make-sparse-keymap)) (func nil) (prompt (concat prompt "\n")) (max-length (apply #'max (mapcar #'length (mapcar #'car actions))))) (let ((--dolist-tail-- actions)) (while --dolist-tail-- (let ((action (car --dolist-tail--))) (let* ((args action) (key (if (cdr (cdr args)) (car-safe (prog1 args (setq args (cdr args)))) (signal 'wrong-number-of-arguments (list '(key desc func . args) (length args))))) (desc (car-safe (prog1 args (setq args (cdr args))))) (func (car-safe (prog1 args (setq args (cdr args)))))) (progn (if desc (progn (setq prompt (format "%s\n %s%s %s" prompt (make-string (- max-length (length key)) 32) key desc)))) (define-key keymap (kbd key) #'(lambda nil (interactive) (apply func args))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq prompt (concat prompt "\n\n")) (let ((max-mini-window-height 1.0) (cursor-in-echo-area t)) (if minibuffer-auto-raise (progn (raise-frame (window-frame (minibuffer-window))))) (while (not func) (setq func (lookup-key keymap (vector (read-key prompt)))))) (funcall func))) ("In repository "highlight", HEAD (on branch "master") has diverged from branch "melpa"" (("m" "Merge HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) ("r" "Reset branch "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "reset" "--hard" ref-name))) ("c" "Reset HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "checkout" branch))) ("R" "Rebase HEAD onto branch "melpa" and fast-forward "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name)))))))
(straight--popup-raw "In repository "highlight", HEAD (on branch "master") has diverged from branch "melpa"" (("m" "Merge HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) ("r" "Reset branch "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "reset" "--hard" ref-name))) ("c" "Reset HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "checkout" branch))) ("R" "Rebase HEAD onto branch "melpa" and fast-forward "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name))))))
(apply straight--popup-raw ("In repository "highlight", HEAD (on branch "master") has diverged from branch "melpa"" (("m" "Merge HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) ("r" "Reset branch "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "reset" "--hard" ref-name))) ("c" "Reset HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "checkout" branch))) ("R" "Rebase HEAD onto branch "melpa" and fast-forward "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name)))))))
(straight-vc-git--popup-raw "In repository "highlight", HEAD (on branch "master") has diverged from branch "melpa"" (("m" "Merge HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) ("r" "Reset branch "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "reset" "--hard" ref-name))) ("c" "Reset HEAD to branch "melpa"" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (straight--get-call "git" "checkout" branch))) ("R" "Rebase HEAD onto branch "melpa" and fast-forward "melpa" to HEAD" (closure ((ref-behind-p) (ref-ahead-p) (quoted-ref-name . "HEAD") (ref-name . "HEAD") (head-detached-p) (cur-branch . "master") (ref) (branch . "melpa") (local-repo . "highlight") straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name))))))
(let ((ref-ahead-p (straight--check-call "git" "merge-base" "--is-ancestor" branch ref-name)) (ref-behind-p (straight--check-call "git" "merge-base" "--is-ancestor" ref-name branch))) (if (and ref ref-behind-p) (progn (throw '--cl-block-straight-vc-git--ensure-head-- t))) (if (and ref ref-ahead-p straight-vc-git-auto-fast-forward) (progn (straight--get-call "git" "reset" "--hard" ref-name) (throw '--cl-block-straight-vc-git--ensure-head-- nil))) (straight-vc-git--popup-raw (concat (format "In repository %S, " local-repo) (if ref (cond (ref-behind-p (throw '--cl-block-straight-vc-git--ensure-head-- t)) (ref-ahead-p (format "branch %S is behind %S" branch ref)) (t (format "branch %S has diverged from %S" branch ref))) (let ((on-branch (if head-detached-p "" (format " (on branch %S)" cur-branch)))) (cond (ref-ahead-p (format "HEAD%s is ahead of branch %S" on-branch branch)) (ref-behind-p (format "HEAD%s is behind branch %S" on-branch branch)) (t (format "HEAD%s has diverged from branch %S" on-branch branch)))))) (append (if ref-ahead-p (progn (list (list "f" (format "Fast-forward branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name)))))) (if (and ref-behind-p (null ref)) (progn (list (list "f" (format "Fast-forward HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch)))))) (if (or ref-ahead-p ref-behind-p) nil (cons (list "m" (format "Merge %s to branch %S" quoted-ref-name branch) #'(lambda nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) (cons (list "r" (format "Reset branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name))) (append (if ref nil (list (list "c" (format "Reset HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))))) (list (if ref (list "R" (format "Rebase branch %S onto %S" branch ref) #'(lambda nil (straight--check-call "git" "rebase" ref branch))) (list "R" (format (concat "Rebase HEAD onto branch %S " "and fast-forward %S to HEAD") branch branch) #'(lambda nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name)))))))))))))
(cond ((and ref (not (straight--check-call "git" "rev-parse" ref))) (error "Branch %S does not exist" ref)) ((and (null ref) (string= branch cur-branch)) (throw '--cl-block-straight-vc-git--ensure-head-- t)) ((and (null ref) head-detached-p) (if straight-vc-git-auto-fast-forward (straight--get-call "git" "checkout" branch) (straight--popup-raw (format "In repository %S, HEAD is even with branch %S, but detached." local-repo branch) (list (list "a" (format "Attach HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))) (list "e" "Dired and open recursive edit" #'(lambda nil (dired (or straight--default-directory default-directory)) (straight--recursive-edit))) (list "g" "Magit and open recursive edit" #'(lambda nil (if (straight--magit-status (or straight--default-directory default-directory)) (progn (straight--recursive-edit))))))))) (t (let ((ref-ahead-p (straight--check-call "git" "merge-base" "--is-ancestor" branch ref-name)) (ref-behind-p (straight--check-call "git" "merge-base" "--is-ancestor" ref-name branch))) (if (and ref ref-behind-p) (progn (throw '--cl-block-straight-vc-git--ensure-head-- t))) (if (and ref ref-ahead-p straight-vc-git-auto-fast-forward) (progn (straight--get-call "git" "reset" "--hard" ref-name) (throw '--cl-block-straight-vc-git--ensure-head-- nil))) (straight-vc-git--popup-raw (concat (format "In repository %S, " local-repo) (if ref (cond (ref-behind-p (throw '--cl-block-straight-vc-git--ensure-head-- t)) (ref-ahead-p (format "branch %S is behind %S" branch ref)) (t (format "branch %S has diverged from %S" branch ref))) (let ((on-branch (if head-detached-p "" (format " (on branch %S)" cur-branch)))) (cond (ref-ahead-p (format "HEAD%s is ahead of branch %S" on-branch branch)) (ref-behind-p (format "HEAD%s is behind branch %S" on-branch branch)) (t (format "HEAD%s has diverged from branch %S" on-branch branch)))))) (append (if ref-ahead-p (progn (list (list "f" (format "Fast-forward branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name)))))) (if (and ref-behind-p (null ref)) (progn (list (list "f" (format "Fast-forward HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch)))))) (if (or ref-ahead-p ref-behind-p) nil (cons (list "m" (format "Merge %s to branch %S" quoted-ref-name branch) #'(lambda nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) (cons (list "r" (format "Reset branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name))) (append (if ref nil (list (list "c" (format "Reset HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))))) (list (if ref (list "R" (format "Rebase branch %S onto %S" branch ref) #'(lambda nil (straight--check-call "git" "rebase" ref branch))) (list "R" (format (concat "Rebase HEAD onto branch %S " "and fast-forward %S to HEAD") branch branch) #'(lambda nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name)))))))))))))))
(let* ((cur-branch (straight--get-call "git" "rev-parse" "--abbrev-ref" "HEAD")) (head-detached-p (string= cur-branch "HEAD")) (ref-name (or ref "HEAD")) (quoted-ref-name (if ref (format "%S" ref) "HEAD"))) (cond ((and ref (not (straight--check-call "git" "rev-parse" ref))) (error "Branch %S does not exist" ref)) ((and (null ref) (string= branch cur-branch)) (throw '--cl-block-straight-vc-git--ensure-head-- t)) ((and (null ref) head-detached-p) (if straight-vc-git-auto-fast-forward (straight--get-call "git" "checkout" branch) (straight--popup-raw (format "In repository %S, HEAD is even with branch %S, but detached." local-repo branch) (list (list "a" (format "Attach HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))) (list "e" "Dired and open recursive edit" #'(lambda nil (dired (or straight--default-directory default-directory)) (straight--recursive-edit))) (list "g" "Magit and open recursive edit" #'(lambda nil (if (straight--magit-status (or straight--default-directory default-directory)) (progn (straight--recursive-edit))))))))) (t (let ((ref-ahead-p (straight--check-call "git" "merge-base" "--is-ancestor" branch ref-name)) (ref-behind-p (straight--check-call "git" "merge-base" "--is-ancestor" ref-name branch))) (if (and ref ref-behind-p) (progn (throw '--cl-block-straight-vc-git--ensure-head-- t))) (if (and ref ref-ahead-p straight-vc-git-auto-fast-forward) (progn (straight--get-call "git" "reset" "--hard" ref-name) (throw '--cl-block-straight-vc-git--ensure-head-- nil))) (straight-vc-git--popup-raw (concat (format "In repository %S, " local-repo) (if ref (cond (ref-behind-p (throw '--cl-block-straight-vc-git--ensure-head-- t)) (ref-ahead-p (format "branch %S is behind %S" branch ref)) (t (format "branch %S has diverged from %S" branch ref))) (let ((on-branch (if head-detached-p "" (format " (on branch %S)" cur-branch)))) (cond (ref-ahead-p (format "HEAD%s is ahead of branch %S" on-branch branch)) (ref-behind-p (format "HEAD%s is behind branch %S" on-branch branch)) (t (format "HEAD%s has diverged from branch %S" on-branch branch)))))) (append (if ref-ahead-p (progn (list (list "f" (format "Fast-forward branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name)))))) (if (and ref-behind-p (null ref)) (progn (list (list "f" (format "Fast-forward HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch)))))) (if (or ref-ahead-p ref-behind-p) nil (cons (list "m" (format "Merge %s to branch %S" quoted-ref-name branch) #'(lambda nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) (cons (list "r" (format "Reset branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name))) (append (if ref nil (list (list "c" (format "Reset HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))))) (list (if ref (list "R" (format "Rebase branch %S onto %S" branch ref) #'(lambda nil (straight--check-call "git" "rebase" ref branch))) (list "R" (format (concat "Rebase HEAD onto branch %S " "and fast-forward %S to HEAD") branch branch) #'(lambda nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name))))))))))))))))
(ignore (let* ((cur-branch (straight--get-call "git" "rev-parse" "--abbrev-ref" "HEAD")) (head-detached-p (string= cur-branch "HEAD")) (ref-name (or ref "HEAD")) (quoted-ref-name (if ref (format "%S" ref) "HEAD"))) (cond ((and ref (not (straight--check-call "git" "rev-parse" ref))) (error "Branch %S does not exist" ref)) ((and (null ref) (string= branch cur-branch)) (throw '--cl-block-straight-vc-git--ensure-head-- t)) ((and (null ref) head-detached-p) (if straight-vc-git-auto-fast-forward (straight--get-call "git" "checkout" branch) (straight--popup-raw (format "In repository %S, HEAD is even with branch %S, but detached." local-repo branch) (list (list "a" (format "Attach HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))) (list "e" "Dired and open recursive edit" #'(lambda nil (dired (or straight--default-directory default-directory)) (straight--recursive-edit))) (list "g" "Magit and open recursive edit" #'(lambda nil (if (straight--magit-status (or straight--default-directory default-directory)) (progn (straight--recursive-edit))))))))) (t (let ((ref-ahead-p (straight--check-call "git" "merge-base" "--is-ancestor" branch ref-name)) (ref-behind-p (straight--check-call "git" "merge-base" "--is-ancestor" ref-name branch))) (if (and ref ref-behind-p) (progn (throw '--cl-block-straight-vc-git--ensure-head-- t))) (if (and ref ref-ahead-p straight-vc-git-auto-fast-forward) (progn (straight--get-call "git" "reset" "--hard" ref-name) (throw '--cl-block-straight-vc-git--ensure-head-- nil))) (straight-vc-git--popup-raw (concat (format "In repository %S, " local-repo) (if ref (cond (ref-behind-p (throw '--cl-block-straight-vc-git--ensure-head-- t)) (ref-ahead-p (format "branch %S is behind %S" branch ref)) (t (format "branch %S has diverged from %S" branch ref))) (let ((on-branch (if head-detached-p "" (format " (on branch %S)" cur-branch)))) (cond (ref-ahead-p (format "HEAD%s is ahead of branch %S" on-branch branch)) (ref-behind-p (format "HEAD%s is behind branch %S" on-branch branch)) (t (format "HEAD%s has diverged from branch %S" on-branch branch)))))) (append (if ref-ahead-p (progn (list (list "f" (format "Fast-forward branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name)))))) (if (and ref-behind-p (null ref)) (progn (list (list "f" (format "Fast-forward HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch)))))) (if (or ref-ahead-p ref-behind-p) nil (cons (list "m" (format "Merge %s to branch %S" quoted-ref-name branch) #'(lambda nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) (cons (list "r" (format "Reset branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name))) (append (if ref nil (list (list "c" (format "Reset HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))))) (list (if ref (list "R" (format "Rebase branch %S onto %S" branch ref) #'(lambda nil (straight--check-call "git" "rebase" ref branch))) (list "R" (format (concat "Rebase HEAD onto branch %S " "and fast-forward %S to HEAD") branch branch) #'(lambda nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name)))))))))))))))))
(catch '--cl-block-straight-vc-git--ensure-head-- (ignore (let* ((cur-branch (straight--get-call "git" "rev-parse" "--abbrev-ref" "HEAD")) (head-detached-p (string= cur-branch "HEAD")) (ref-name (or ref "HEAD")) (quoted-ref-name (if ref (format "%S" ref) "HEAD"))) (cond ((and ref (not (straight--check-call "git" "rev-parse" ref))) (error "Branch %S does not exist" ref)) ((and (null ref) (string= branch cur-branch)) (throw '--cl-block-straight-vc-git--ensure-head-- t)) ((and (null ref) head-detached-p) (if straight-vc-git-auto-fast-forward (straight--get-call "git" "checkout" branch) (straight--popup-raw (format "In repository %S, HEAD is even with branch %S, but detached." local-repo branch) (list (list "a" (format "Attach HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))) (list "e" "Dired and open recursive edit" #'(lambda nil (dired (or straight--default-directory default-directory)) (straight--recursive-edit))) (list "g" "Magit and open recursive edit" #'(lambda nil (if (straight--magit-status (or straight--default-directory default-directory)) (progn (straight--recursive-edit))))))))) (t (let ((ref-ahead-p (straight--check-call "git" "merge-base" "--is-ancestor" branch ref-name)) (ref-behind-p (straight--check-call "git" "merge-base" "--is-ancestor" ref-name branch))) (if (and ref ref-behind-p) (progn (throw '--cl-block-straight-vc-git--ensure-head-- t))) (if (and ref ref-ahead-p straight-vc-git-auto-fast-forward) (progn (straight--get-call "git" "reset" "--hard" ref-name) (throw '--cl-block-straight-vc-git--ensure-head-- nil))) (straight-vc-git--popup-raw (concat (format "In repository %S, " local-repo) (if ref (cond (ref-behind-p (throw '--cl-block-straight-vc-git--ensure-head-- t)) (ref-ahead-p (format "branch %S is behind %S" branch ref)) (t (format "branch %S has diverged from %S" branch ref))) (let ((on-branch (if head-detached-p "" (format " (on branch %S)" cur-branch)))) (cond (ref-ahead-p (format "HEAD%s is ahead of branch %S" on-branch branch)) (ref-behind-p (format "HEAD%s is behind branch %S" on-branch branch)) (t (format "HEAD%s has diverged from branch %S" on-branch branch)))))) (append (if ref-ahead-p (progn (list (list "f" (format "Fast-forward branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name)))))) (if (and ref-behind-p (null ref)) (progn (list (list "f" (format "Fast-forward HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch)))))) (if (or ref-ahead-p ref-behind-p) nil (cons (list "m" (format "Merge %s to branch %S" quoted-ref-name branch) #'(lambda nil (if ref (straight--check-call "git" "merge" ref) (let ((orig-head (straight--get-call "git" "rev-parse" "HEAD"))) (straight--get-call "git" "checkout" branch) (straight--check-call "git" "merge" orig-head))))) (cons (list "r" (format "Reset branch %S to %s" branch quoted-ref-name) #'(lambda nil (straight--get-call "git" "reset" "--hard" ref-name))) (append (if ref nil (list (list "c" (format "Reset HEAD to branch %S" branch) #'(lambda nil (straight--get-call "git" "checkout" branch))))) (list (if ref (list "R" (format "Rebase branch %S onto %S" branch ref) #'(lambda nil (straight--check-call "git" "rebase" ref branch))) (list "R" (format (concat "Rebase HEAD onto branch %S " "and fast-forward %S to HEAD") branch branch) #'(lambda nil (and (straight--check-call "git" "rebase" branch) (straight--get-call "git" "reset" "--hard" ref-name))))))))))))))))))
(straight-vc-git--ensure-head "highlight" "melpa")
(and (straight-vc-git--ensure-nothing-in-progress local-repo) (straight-vc-git--ensure-worktree local-repo) (straight-vc-git--ensure-head local-repo branch))
(or (and (straight-vc-git--ensure-nothing-in-progress local-repo) (straight-vc-git--ensure-worktree local-repo) (straight-vc-git--ensure-head local-repo branch)) (straight-register-repo-modification local-repo))
(and (straight-vc-git--ensure-remotes recipe) (or (and (straight-vc-git--ensure-nothing-in-progress local-repo) (straight-vc-git--ensure-worktree local-repo) (straight-vc-git--ensure-head local-repo branch)) (straight-register-repo-modification local-repo)))
(let ((local-repo (plist-get --recipe-- ':local-repo)) (branch (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':branch) (plist-get fork ':branch)) ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (t straight-vc-git-default-branch)) (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch)))))) (and (straight-vc-git--ensure-remotes recipe) (or (and (straight-vc-git--ensure-nothing-in-progress local-repo) (straight-vc-git--ensure-worktree local-repo) (straight-vc-git--ensure-head local-repo branch)) (straight-register-repo-modification local-repo))))
(let ((--recipe-- recipe)) (let* ((--cl-rest-- --recipe--) (upstream (car (cdr (plist-member --cl-rest-- ':upstream)))) (repo (car (cdr (plist-member --cl-rest-- ':repo)))) (host (car (cdr (plist-member --cl-rest-- ':host)))) (branch (car (cdr (plist-member --cl-rest-- ':branch))))) (if upstream (progn (setq --recipe-- (cl-copy-list --recipe--)) (setq --recipe-- (plist-put --recipe-- :fork (list :repo repo :host host :branch (or branch straight-vc-git-default-branch) :remote straight-vc-git-primary-remote))) (let ((--dolist-tail-- '(:host :repo))) (while --dolist-tail-- (let ((kw (car --dolist-tail--))) (setq --recipe-- (plist-put --recipe-- kw (plist-get upstream kw))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq --recipe-- (plist-put --recipe-- :branch (or (plist-get upstream :branch) straight-vc-git-default-branch))) (setq --recipe-- (plist-put --recipe-- :remote straight-vc-git-upstream-remote))))) (let ((local-repo (plist-get --recipe-- ':local-repo)) (branch (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':branch) (plist-get fork ':branch)) ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (t straight-vc-git-default-branch)) (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch)))))) (and (straight-vc-git--ensure-remotes recipe) (or (and (straight-vc-git--ensure-nothing-in-progress local-repo) (straight-vc-git--ensure-worktree local-repo) (straight-vc-git--ensure-head local-repo branch)) (straight-register-repo-modification local-repo)))))
(straight-vc-git--ensure-local (:type git :flavor melpa :branch "melpa" :host github :repo "emacsmirror/highlight" :package "highlight" :local-repo "highlight"))
(and (straight-vc-git--ensure-local recipe) (or (straight-vc-git--ensure-head local-repo branch (format "%s/%s" remote remote-branch)) (straight-register-repo-modification local-repo)) (throw '--cl-block-straight-vc-git--merge-from-remote-raw-- t))
(while t (and (straight-vc-git--ensure-local recipe) (or (straight-vc-git--ensure-head local-repo branch (format "%s/%s" remote remote-branch)) (straight-register-repo-modification local-repo)) (throw '--cl-block-straight-vc-git--merge-from-remote-raw-- t)))
(let ((local-repo (plist-get --recipe-- ':local-repo)) (branch (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':branch) (plist-get fork ':branch)) ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (t straight-vc-git-default-branch)) (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch)))))) (while t (and (straight-vc-git--ensure-local recipe) (or (straight-vc-git--ensure-head local-repo branch (format "%s/%s" remote remote-branch)) (straight-register-repo-modification local-repo)) (throw '--cl-block-straight-vc-git--merge-from-remote-raw-- t))))
(let ((--recipe-- recipe)) (let* ((--cl-rest-- --recipe--) (upstream (car (cdr (plist-member --cl-rest-- ':upstream)))) (repo (car (cdr (plist-member --cl-rest-- ':repo)))) (host (car (cdr (plist-member --cl-rest-- ':host)))) (branch (car (cdr (plist-member --cl-rest-- ':branch))))) (if upstream (progn (setq --recipe-- (cl-copy-list --recipe--)) (setq --recipe-- (plist-put --recipe-- :fork (list :repo repo :host host :branch (or branch straight-vc-git-default-branch) :remote straight-vc-git-primary-remote))) (let ((--dolist-tail-- '(:host :repo))) (while --dolist-tail-- (let ((kw (car --dolist-tail--))) (setq --recipe-- (plist-put --recipe-- kw (plist-get upstream kw))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq --recipe-- (plist-put --recipe-- :branch (or (plist-get upstream :branch) straight-vc-git-default-branch))) (setq --recipe-- (plist-put --recipe-- :remote straight-vc-git-upstream-remote))))) (let ((local-repo (plist-get --recipe-- ':local-repo)) (branch (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':branch) (plist-get fork ':branch)) ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (t straight-vc-git-default-branch)) (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch)))))) (while t (and (straight-vc-git--ensure-local recipe) (or (straight-vc-git--ensure-head local-repo branch (format "%s/%s" remote remote-branch)) (straight-register-repo-modification local-repo)) (throw '--cl-block-straight-vc-git--merge-from-remote-raw-- t)))))
(catch '--cl-block-straight-vc-git--merge-from-remote-raw-- (let ((--recipe-- recipe)) (let* ((--cl-rest-- --recipe--) (upstream (car (cdr (plist-member --cl-rest-- ':upstream)))) (repo (car (cdr (plist-member --cl-rest-- ':repo)))) (host (car (cdr (plist-member --cl-rest-- ':host)))) (branch (car (cdr (plist-member --cl-rest-- ':branch))))) (if upstream (progn (setq --recipe-- (cl-copy-list --recipe--)) (setq --recipe-- (plist-put --recipe-- :fork (list :repo repo :host host :branch (or branch straight-vc-git-default-branch) :remote straight-vc-git-primary-remote))) (let ((--dolist-tail-- '(:host :repo))) (while --dolist-tail-- (let ((kw (car --dolist-tail--))) (setq --recipe-- (plist-put --recipe-- kw (plist-get upstream kw))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq --recipe-- (plist-put --recipe-- :branch (or (plist-get upstream :branch) straight-vc-git-default-branch))) (setq --recipe-- (plist-put --recipe-- :remote straight-vc-git-upstream-remote))))) (let ((local-repo (plist-get --recipe-- ':local-repo)) (branch (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':branch) (plist-get fork ':branch)) ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (t straight-vc-git-default-branch)) (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch)))))) (while t (and (straight-vc-git--ensure-local recipe) (or (straight-vc-git--ensure-head local-repo branch (format "%s/%s" remote remote-branch)) (straight-register-repo-modification local-repo)) (throw '--cl-block-straight-vc-git--merge-from-remote-raw-- t))))))
(straight-vc-git--merge-from-remote-raw (:type git :flavor melpa :branch "melpa" :host github :repo "emacsmirror/highlight" :package "highlight" :local-repo "highlight") "origin" "melpa")
(let ((remote-branch (if from-upstream upstream-branch branch)) (repo (if from-upstream upstream-repo repo)) (remote (if from-upstream upstream-remote remote))) (if repo nil (throw '--cl-block-nil-- t)) (straight-vc-git--merge-from-remote-raw recipe remote remote-branch))
(let ((upstream-repo (plist-get --recipe-- ':repo)) (upstream-branch (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch))) (upstream-remote (cond ((plist-member --recipe-- ':remote) (plist-get --recipe-- ':remote)) ((equal straight-vc-git-primary-remote "origin") straight-vc-git-default-remote-name) (t straight-vc-git-primary-remote))) (repo (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (plist-get fork ':repo) (plist-get --recipe-- ':repo)))) (branch (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':branch) (plist-get fork ':branch)) ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (t straight-vc-git-default-branch)) (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch))))) (remote (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':remote) (plist-get fork ':remote)) (t straight-vc-git-default-fork-name)) (cond ((plist-member --recipe-- ':remote) (plist-get --recipe-- ':remote)) ((equal straight-vc-git-primary-remote "origin") straight-vc-git-default-remote-name) (t straight-vc-git-primary-remote))))) (fork (plist-get --recipe-- ':fork))) (if (and from-upstream (not fork)) (progn (throw '--cl-block-nil-- t))) (let ((remote-branch (if from-upstream upstream-branch branch)) (repo (if from-upstream upstream-repo repo)) (remote (if from-upstream upstream-remote remote))) (if repo nil (throw '--cl-block-nil-- t)) (straight-vc-git--merge-from-remote-raw recipe remote remote-branch)))
(let ((--recipe-- recipe)) (let* ((--cl-rest-- --recipe--) (upstream (car (cdr (plist-member --cl-rest-- ':upstream)))) (repo (car (cdr (plist-member --cl-rest-- ':repo)))) (host (car (cdr (plist-member --cl-rest-- ':host)))) (branch (car (cdr (plist-member --cl-rest-- ':branch))))) (if upstream (progn (setq --recipe-- (cl-copy-list --recipe--)) (setq --recipe-- (plist-put --recipe-- :fork (list :repo repo :host host :branch (or branch straight-vc-git-default-branch) :remote straight-vc-git-primary-remote))) (let ((--dolist-tail-- '(:host :repo))) (while --dolist-tail-- (let ((kw (car --dolist-tail--))) (setq --recipe-- (plist-put --recipe-- kw (plist-get upstream kw))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq --recipe-- (plist-put --recipe-- :branch (or (plist-get upstream :branch) straight-vc-git-default-branch))) (setq --recipe-- (plist-put --recipe-- :remote straight-vc-git-upstream-remote))))) (let ((upstream-repo (plist-get --recipe-- ':repo)) (upstream-branch (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch))) (upstream-remote (cond ((plist-member --recipe-- ':remote) (plist-get --recipe-- ':remote)) ((equal straight-vc-git-primary-remote "origin") straight-vc-git-default-remote-name) (t straight-vc-git-primary-remote))) (repo (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (plist-get fork ':repo) (plist-get --recipe-- ':repo)))) (branch (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':branch) (plist-get fork ':branch)) ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (t straight-vc-git-default-branch)) (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch))))) (remote (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':remote) (plist-get fork ':remote)) (t straight-vc-git-default-fork-name)) (cond ((plist-member --recipe-- ':remote) (plist-get --recipe-- ':remote)) ((equal straight-vc-git-primary-remote "origin") straight-vc-git-default-remote-name) (t straight-vc-git-primary-remote))))) (fork (plist-get --recipe-- ':fork))) (if (and from-upstream (not fork)) (progn (throw '--cl-block-nil-- t))) (let ((remote-branch (if from-upstream upstream-branch branch)) (repo (if from-upstream upstream-repo repo)) (remote (if from-upstream upstream-remote remote))) (if repo nil (throw '--cl-block-nil-- t)) (straight-vc-git--merge-from-remote-raw recipe remote remote-branch))))
(catch '--cl-block-nil-- (let ((--recipe-- recipe)) (let* ((--cl-rest-- --recipe--) (upstream (car (cdr (plist-member --cl-rest-- ':upstream)))) (repo (car (cdr (plist-member --cl-rest-- ':repo)))) (host (car (cdr (plist-member --cl-rest-- ':host)))) (branch (car (cdr (plist-member --cl-rest-- ':branch))))) (if upstream (progn (setq --recipe-- (cl-copy-list --recipe--)) (setq --recipe-- (plist-put --recipe-- :fork (list :repo repo :host host :branch (or branch straight-vc-git-default-branch) :remote straight-vc-git-primary-remote))) (let ((--dolist-tail-- '(:host :repo))) (while --dolist-tail-- (let ((kw (car --dolist-tail--))) (setq --recipe-- (plist-put --recipe-- kw (plist-get upstream kw))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (setq --recipe-- (plist-put --recipe-- :branch (or (plist-get upstream :branch) straight-vc-git-default-branch))) (setq --recipe-- (plist-put --recipe-- :remote straight-vc-git-upstream-remote))))) (let ((upstream-repo (plist-get --recipe-- ':repo)) (upstream-branch (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch))) (upstream-remote (cond ((plist-member --recipe-- ':remote) (plist-get --recipe-- ':remote)) ((equal straight-vc-git-primary-remote "origin") straight-vc-git-default-remote-name) (t straight-vc-git-primary-remote))) (repo (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (plist-get fork ':repo) (plist-get --recipe-- ':repo)))) (branch (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':branch) (plist-get fork ':branch)) ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (t straight-vc-git-default-branch)) (cond ((plist-member --recipe-- ':branch) (plist-get --recipe-- ':branch)) (nil nil) (t straight-vc-git-default-branch))))) (remote (let* ((fork (and t (plist-get --recipe-- :fork)))) (if fork (cond ((plist-member fork ':remote) (plist-get fork ':remote)) (t straight-vc-git-default-fork-name)) (cond ((plist-member --recipe-- ':remote) (plist-get --recipe-- ':remote)) ((equal straight-vc-git-primary-remote "origin") straight-vc-git-default-remote-name) (t straight-vc-git-primary-remote))))) (fork (plist-get --recipe-- ':fork))) (if (and from-upstream (not fork)) (progn (throw '--cl-block-nil-- t))) (let ((remote-branch (if from-upstream upstream-branch branch)) (repo (if from-upstream upstream-repo repo)) (remote (if from-upstream upstream-remote remote))) (if repo nil (throw '--cl-block-nil-- t)) (straight-vc-git--merge-from-remote-raw recipe remote remote-branch)))))
(straight-vc-git-merge-from-remote (:type git :flavor melpa :branch "melpa" :host github :repo "emacsmirror/highlight" :package "highlight" :local-repo "highlight"))
(apply straight-vc-git-merge-from-remote (:type git :flavor melpa :branch "melpa" :host github :repo "emacsmirror/highlight" :package "highlight" :local-repo "highlight"))
(let ((func (intern (format "straight-vc-%S-%S" type method)))) (if (fboundp func) nil (let ((regexp (format "^straight-vc-%S-[a-z-]+$" type))) (if (catch '--cl-block-nil-- (prog1 nil (mapatoms #'(lambda (sym) (if (and (fboundp sym) (string-match-p regexp (symbol-name sym))) (progn (throw '--cl-block-nil-- t))))))) (error "VC backend %S' does not implement method %S'" type method) (error "No such VC backend `%S'" type)))) (apply func args))
(straight-vc merge-from-remote git (:type git :flavor melpa :branch "melpa" :host github :repo "emacsmirror/highlight" :package "highlight" :local-repo "highlight"))
(let ((straight--default-directory (straight--repos-dir local-repo))) (straight-vc 'merge-from-remote type recipe))
(progn (let ((straight--default-directory (straight--repos-dir local-repo))) (straight-vc 'merge-from-remote type recipe)))
(if local-repo (progn (let ((straight--default-directory (straight--repos-dir local-repo))) (straight-vc 'merge-from-remote type recipe))))
(let* ((--cl-rest-- recipe) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (if local-repo (progn (let ((straight--default-directory (straight--repos-dir local-repo))) (straight-vc 'merge-from-remote type recipe)))))
(straight-vc-merge-from-remote (:type git :flavor melpa :branch "melpa" :host github :repo "emacsmirror/highlight" :package "highlight" :local-repo "highlight"))
(and (straight-vc-merge-from-remote recipe) (if from-upstream (progn (straight-vc-merge-from-upstream recipe))))
(let ((recipe (gethash package straight--recipe-cache))) (and (straight-vc-merge-from-remote recipe) (if from-upstream (progn (straight-vc-merge-from-upstream recipe)))))
(straight-merge-package "highlight")
(progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil)))
(if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))
(cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref)))))))
(or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil)))
(let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output)))))))
(condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e))))
(let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e)))))
(let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (if (straight--repository-is-available-p recipe) nil (doom--print (doom--format (format (doom--output-class 'error "(%d/%d) Couldn't find local repo for %s") i total package))) (throw '--cl-block-nil-- nil)) (if (gethash local-repo repos-to-rebuild) (progn (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo))) (throw '--cl-block-nil-- nil))) (let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e))))))
(progn (setq i (1+ i)) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (if (straight--repository-is-available-p recipe) nil (doom--print (doom--format (format (doom--output-class 'error "(%d/%d) Couldn't find local repo for %s") i total package))) (throw '--cl-block-nil-- nil)) (if (gethash local-repo repos-to-rebuild) (progn (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo))) (throw '--cl-block-nil-- nil))) (let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e)))))))
(let* ((--cl-rest-- (append (list :recipe recipe) recipe)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (package (car (cdr (plist-member --cl-rest-- ':package)))) (type (car (cdr (plist-member --cl-rest-- ':type)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (progn (setq i (1+ i)) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (if (straight--repository-is-available-p recipe) nil (doom--print (doom--format (format (doom--output-class 'error "(%d/%d) Couldn't find local repo for %s") i total package))) (throw '--cl-block-nil-- nil)) (if (gethash local-repo repos-to-rebuild) (progn (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo))) (throw '--cl-block-nil-- nil))) (let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e))))))))
(catch '--cl-block-nil-- (let* ((--cl-rest-- (append (list :recipe recipe) recipe)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (package (car (cdr (plist-member --cl-rest-- ':package)))) (type (car (cdr (plist-member --cl-rest-- ':type)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (progn (setq i (1+ i)) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (if (straight--repository-is-available-p recipe) nil (doom--print (doom--format (format (doom--output-class 'error "(%d/%d) Couldn't find local repo for %s") i total package))) (throw '--cl-block-nil-- nil)) (if (gethash local-repo repos-to-rebuild) (progn (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo))) (throw '--cl-block-nil-- nil))) (let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e)))))))))
(while --dolist-tail-- (setq recipe (car --dolist-tail--)) (catch '--cl-block-nil-- (let* ((--cl-rest-- (append (list :recipe recipe) recipe)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (package (car (cdr (plist-member --cl-rest-- ':package)))) (type (car (cdr (plist-member --cl-rest-- ':type)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (progn (setq i (1+ i)) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (if (straight--repository-is-available-p recipe) nil (doom--print (doom--format (format (doom--output-class 'error "(%d/%d) Couldn't find local repo for %s") i total package))) (throw '--cl-block-nil-- nil)) (if (gethash local-repo repos-to-rebuild) (progn (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo))) (throw '--cl-block-nil-- nil))) (let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e))))))))) (setq --dolist-tail-- (cdr --dolist-tail--)))
(let ((--dolist-tail-- recipes) recipe) (while --dolist-tail-- (setq recipe (car --dolist-tail--)) (catch '--cl-block-nil-- (let* ((--cl-rest-- (append (list :recipe recipe) recipe)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (package (car (cdr (plist-member --cl-rest-- ':package)))) (type (car (cdr (plist-member --cl-rest-- ':type)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (progn (setq i (1+ i)) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (if (straight--repository-is-available-p recipe) nil (doom--print (doom--format (format (doom--output-class 'error "(%d/%d) Couldn't find local repo for %s") i total package))) (throw '--cl-block-nil-- nil)) (if (gethash local-repo repos-to-rebuild) (progn (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo))) (throw '--cl-block-nil-- nil))) (let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e))))))))) (setq --dolist-tail-- (cdr --dolist-tail--))) (setq recipe nil) (nreverse built))
(let* ((recipes recipes) (built nil) (straight-use-package-pre-build-functions (cons #'(lambda (pkg &rest _) (setq built (if (member pkg built) built (cons pkg built)))) straight-use-package-pre-build-functions))) (let ((--dolist-tail-- recipes) recipe) (while --dolist-tail-- (setq recipe (car --dolist-tail--)) (catch '--cl-block-nil-- (let* ((--cl-rest-- (append (list :recipe recipe) recipe)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (package (car (cdr (plist-member --cl-rest-- ':package)))) (type (car (cdr (plist-member --cl-rest-- ':type)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (progn (setq i (1+ i)) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (if (straight--repository-is-available-p recipe) nil (doom--print (doom--format (format (doom--output-class 'error "(%d/%d) Couldn't find local repo for %s") i total package))) (throw '--cl-block-nil-- nil)) (if (gethash local-repo repos-to-rebuild) (progn (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo))) (throw '--cl-block-nil-- nil))) (let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e))))))))) (setq --dolist-tail-- (cdr --dolist-tail--))) (setq recipe nil) (nreverse built)))
(let* ((repo-dir (straight--repos-dir)) (pinned (doom-package-pinned-list)) (recipes (doom-package-recipe-list)) (packages-to-rebuild (make-hash-table :test 'equal)) (repos-to-rebuild (make-hash-table :test 'equal)) (total (length recipes)) (esc (if doom-debug-p nil "\33[1A")) (i 0) errors) (if recipes (progn (doom--cli-recipes-update))) (doom--print (doom--format (format (doom--output-class 'start "Updating packages (this may take a while)...")))) (let* ((recipes recipes) (built nil) (straight-use-package-pre-build-functions (cons #'(lambda (pkg &rest _) (setq built (if (member pkg built) built (cons pkg built)))) straight-use-package-pre-build-functions))) (let ((--dolist-tail-- recipes) recipe) (while --dolist-tail-- (setq recipe (car --dolist-tail--)) (catch '--cl-block-nil-- (let* ((--cl-rest-- (append (list :recipe recipe) recipe)) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (package (car (cdr (plist-member --cl-rest-- ':package)))) (type (car (cdr (plist-member --cl-rest-- ':type)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (progn (setq i (1+ i)) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (if (straight--repository-is-available-p recipe) nil (doom--print (doom--format (format (doom--output-class 'error "(%d/%d) Couldn't find local repo for %s") i total package))) (throw '--cl-block-nil-- nil)) (if (gethash local-repo repos-to-rebuild) (progn (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "(%d/%d) %s was updated indirectly (with %s)") i total package local-repo))) (throw '--cl-block-nil-- nil))) (let ((default-directory (straight--repos-dir local-repo))) (if (file-in-directory-p default-directory repo-dir) nil (doom--print (doom--format (format (doom--output-class 'warn "(%d/%d) Skipping %s because it is local") i total package))) (throw '--cl-block-nil-- nil)) (if (eq type 'git) (progn (if (file-exists-p ".git") nil (error "%S is not a valid repository" package)))) (condition-case e (let ((ref (straight-vc-get-commit type local-repo)) (target-ref (cdr (or (assoc local-repo pinned) (assoc package pinned)))) output) (or (cond ((not (stringp target-ref)) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (if (straight-vc-fetch-from-remote recipe) (progn (setq output (straight--process-get-output)) (straight-merge-package package) (setq target-ref (straight-vc-get-commit type local-repo)) (or (not (doom--same-commit-p target-ref ref)) (throw '--cl-block-nil-- nil))))) ((doom--same-commit-p target-ref ref) (doom--print (doom--format (format (doom--output-class 'info "\33[K(%d/%d) %s is up-to-date...%s") i total package esc))) (throw '--cl-block-nil-- nil)) ((if (straight-vc-commit-present-p recipe target-ref) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Checking out %s (%s)...%s") i total package (doom--abbrev-commit target-ref) esc))) (doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Fetching %s...%s") i total package esc))) (and (straight-vc-fetch-from-remote recipe) (straight-vc-commit-present-p recipe target-ref))) (straight-vc-check-out-commit recipe target-ref) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))) (doom--same-commit-p target-ref (straight-vc-get-commit type local-repo))) ((doom--print (doom--format (format (doom--output-class 'start "\33[K(%d/%d) Re-cloning %s...") i total local-repo esc))) (let ((repo (straight--repos-dir local-repo)) (straight-vc-git-default-clone-depth 'full)) (delete-directory repo 'recursive) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (straight-use-package (intern package) nil 'no-build)) (prog1 (file-directory-p repo) (or (not (eq type 'git)) (setq output (doom--commit-log-between ref target-ref))))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "\33[K(%d/%d) Failed to fetch %s") i total local-repo))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format (doom--output-class 'info "%s" output)))))) (throw '--cl-block-nil-- nil))) (puthash local-repo t repos-to-rebuild) (puthash package t packages-to-rebuild) (doom--print (doom--format (format (doom--output-class 'success "\33[K(%d/%d) %s updated (%s -> %s)") i total local-repo (doom--abbrev-commit ref) (doom--abbrev-commit target-ref)))) (if (string-empty-p output) nil (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (doom--print (doom--format (format "%s" (doom--output-class 'indent 2 output))))))) ((debug user-error) (signal 'user-error (error-message-string e))) ((debug error) (signal 'doom-package-error (list package e))))))))) (setq --dolist-tail-- (cdr --dolist-tail--))) (setq recipe nil) (nreverse built))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (princ "\33[K") (if (hash-table-empty-p packages-to-rebuild) (ignore (doom--print (doom--format (format (doom--output-class 'success "All %d packages are up-to-date") total)))) (straight--transaction-finalize) (let ((default-directory (straight--build-dir))) (mapc (doom-rpartial #'delete-directory 'recursive) (hash-table-keys packages-to-rebuild))) (doom--print (doom--format (format (doom--output-class 'success "Updated %d package(s)") (hash-table-count packages-to-rebuild)))) (doom-cli-packages-build) t)))
(doom-cli-packages-update)
(progn (doom-cli-packages-update))
(if update-p (progn (doom-cli-packages-update)))
(let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t)
(unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h))
(let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))
((closure ((plist) (aliases s) (name . sync) t) (--alist--) (ignore --alist--) (let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))) ((update-p . "-u")))
(funcall (closure ((plist) (aliases s) (name . sync) t) (--alist--) (ignore --alist--) (let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))) ((update-p . "-u")))
(if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command))
(let* ((cli (and t (doom-cli-get command)))) (if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command)))
(doom-cli-execute "sync" "-u")
(cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u")))
(let ((doom-auto-discard force-p)) (cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u"))))
(let ((force-p (cdr (assq 'force-p --alist--))) (packages-only-p (cdr (assq 'packages-only-p --alist--)))) :bare t (let ((doom-auto-discard force-p)) (cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u")))))
((closure ((plist :bare t) (aliases up) (name . upgrade) t) (--alist--) (ignore --alist--) (let ((force-p (cdr (assq 'force-p --alist--))) (packages-only-p (cdr (assq 'packages-only-p --alist--)))) :bare t (let ((doom-auto-discard force-p)) (cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u")))))) nil)
(funcall (closure ((plist :bare t) (aliases up) (name . upgrade) t) (--alist--) (ignore --alist--) (let ((force-p (cdr (assq 'force-p --alist--))) (packages-only-p (cdr (assq 'packages-only-p --alist--)))) :bare t (let ((doom-auto-discard force-p)) (cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u")))))) nil)
(if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command))
(let* ((cli (and t (doom-cli-get command)))) (if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command)))
(doom-cli-execute "upgrade")
(apply doom-cli-execute "upgrade" nil)
(if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))
(let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time))))))))
(if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))
(catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time))))))))))
(unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))
(progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer))))
(unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))
(let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old)))
(let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))
(let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old)))))
(condition-case e (let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(route opt arg n d) (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\(.+\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list '(route . commands) (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1))
(let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(route opt arg n d) (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\(.+\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list '(route . commands) (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))
((closure ((plist) (aliases) (name . :doom) cl-struct-doom-cli-option-tags cl-struct-doom-cli-tags t) (--alist--) (ignore --alist--) (let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(route opt arg n d) (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\(.+\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list '(route . commands) (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))) ((command . "upgrade")))
(funcall (closure ((plist) (aliases) (name . :doom) cl-struct-doom-cli-option-tags cl-struct-doom-cli-tags t) (--alist--) (ignore --alist--) (let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(route opt arg n d) (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\(.+\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list '(route . commands) (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))) ((command . "upgrade")))
(if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command))
(let* ((cli (and t (doom-cli-get command)))) (if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command)))
(doom-cli-execute :doom "upgrade")

System information:

```
SYSTEM  type       gnu/linux
	config     x86_64-pc-linux-gnu
	shell      /run/current-system/sw/bin/fish
	uname      Linux 5.8.16 #1-NixOS SMP Sat Oct 17 06:56:30 UTC 2020 x86_64
	path       (/nix/store/216pc3f33aqjfiii29l3lb8aam7w1jk2-emacs-packages-deps/bin /nix/store/wxhkli880b17j0x4rdf2g8jyqly4jjnv-kitty-0.18.3/bin /nix/store/k78p5kvwvi57kymwkl2n2lldhljvpiaj-imagemagick-6.9.11-14/bin /nix/store/8cil6lql1lkq4lxlrk9d0yg0qk62sz82-xsel-unstable-2019-08-21/bin /nix/store/ncgqkpqj9gjaz6abxlwv15jpdn2nc818-ncurses-6.2-dev/bin /run/wrappers/bin ~/.nix-profile/bin /etc/profiles/per-user/$USER/bin /nix/var/nix/profiles/default/bin /run/current-system/sw/bin /nix/store/i4z9ayvxwbk6ndb4mdb38vjq1rzn1366-emacs-27.1/libexec/emacs/27.1/x86_64-pc-linux-gnu)
EMACS   dir        ~/.emacs.d/
	version    27.1
	build      Nov 11, 2020
	buildopts  --prefix=/nix/store/i4z9ayvxwbk6ndb4mdb38vjq1rzn1366-emacs-27.1 --disable-build-details --with-modules --with-x-toolkit=gtk3 --with-xft --with-cairo CFLAGS=-DMAC_OS_X_VERSION_MAX_ALLOWED=101200
	features   XPM JPEG TIFF GIF PNG RSVG CAIRO SOUND DBUS GSETTINGS GLIB NOTIFY INOTIFY LIBSELINUX GNUTLS LIBXML2 FREETYPE HARFBUZZ M17N_FLT LIBOTF ZLIB TOOLKIT_SCROLL_BARS GTK3 X11 XDBE XIM MODULES THREADS LIBSYSTEMD JSON PDUMPER GMP
	traits     (batch envvar-file)
DOOM    dir        ~/.doom.d/
	version    2.0.9
	build      HEAD -> develop 3ecf95ff3 2020-11-11 01:07:52 -0500
	elc-files  0
	modules    (:completion (company +tng) (ivy +fuzzy +prescient +icons) :ui deft doom doom-dashboard hl-todo hydra indent-guides (ligatures +fira) minimap modeline nav-flash ophints (popup +defaults) tabs treemacs vc-gutter vi-tilde-fringe window-select workspaces zen :editor (evil +everywhere) file-templates fold format multiple-cursors snippets :emacs (dired +icons) electric (ibuffer +icons) undo vc :term vterm :checkers (syntax +childframe) (spell +aspell) grammar :tools ansible biblio direnv docker editorconfig (eval +overlay) lookup (lsp +peek) (magit +forge) taskrunner :lang (cc +lsp) emacs-lisp json (latex +latexmk +cdlatex) markdown nix (org +dragndrop +journal +pandoc +pomodoro +pretty +roam) (python +lsp +pyright) rst (rust +lsp) (sh +fish) (yaml +lsp) :app calendar :config (default +bindings +smartparens))
	packages   ((counsel-spotify) (floobits))
	unpin      (n/a)
	elpa       (vterm)
```

Delete ~/.emacs.d/.local/straight/repos/melpa then run doom sync.

Uhm, still erroring out:
$ rm -rf rm -rf ~/.emacs.d/.local/straight/repos/melpa/
$ ~/.emacs.d/bin/doom sync

> Synchronizing your config with Doom Emacs...
  > Regenerating envvars file at "~/.emacs.d/.local/env"
    ✓ Successfully generated "~/.emacs.d/.local/env"
  x There was an unexpected error
    Message: error
    Data: (error . "Could not find package ivy-prescient in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror)")

I include the doom.error.log file.

# -*- lisp-interaction -*-
# vim: set ft=lisp:
(error "Could not find package ivy-prescient in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror)")
(signal error ("Could not find package ivy-prescient in recipe repositories: (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror)"))
(error "Could not find package %S in recipe repositories: %S" ivy-prescient (org-elpa melpa gnu-elpa-mirror emacsmirror-mirror))
(if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories))
(or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories)))
(if recipe-specified-p melpa-style-recipe (or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories))))
(let* ((recipe-specified-p (listp melpa-style-recipe)) (full-melpa-style-recipe (if recipe-specified-p melpa-style-recipe (or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories)))))) (if (straight--quoted-form-p full-melpa-style-recipe) (progn (setq full-melpa-style-recipe (eval full-melpa-style-recipe)))) (let* ((plist full-melpa-style-recipe) (package (if plist (car-safe (prog1 plist (setq plist (cdr plist)))) (signal 'wrong-number-of-arguments (list '(package . plist) (length plist)))))) (progn (if straight-allow-recipe-inheritance (progn (let* ((sources (plist-get plist :source)) (default (or (let* ((retrieved (and t (straight-recipes-retrieve package (if (listp sources) sources (list sources)))))) (if retrieved (cdr (if (straight--quoted-form-p retrieved) (eval retrieved) retrieved)) nil)) plist)) (type (or (plist-get default :type) 'git)) (keywords (append (remq :local-repo straight--build-keywords) (if (eq type 'built-in) nil (straight-vc-keywords type))))) (let* ((fork (and t (plist-get plist :fork)))) (if fork (progn (progn (setq default (copy-sequence default)) (setq default (plist-put default :fork fork))) (if (listp fork) nil (setq fork 'nil)) (progn (setq fork (copy-sequence fork)) (setq fork (plist-put fork :repo (straight-vc-git--fork-repo default)))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :fork fork)))) nil)) (let ((--dolist-tail-- keywords)) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (if (plist-member plist keyword) nil (let* ((value (and t (plist-get default keyword)))) (if value (setq plist (plist-put plist keyword value)) nil))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist))))
(or (and (symbolp melpa-style-recipe) (gethash (symbol-name melpa-style-recipe) straight--recipe-cache)) (let* ((recipe-specified-p (listp melpa-style-recipe)) (full-melpa-style-recipe (if recipe-specified-p melpa-style-recipe (or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories)))))) (if (straight--quoted-form-p full-melpa-style-recipe) (progn (setq full-melpa-style-recipe (eval full-melpa-style-recipe)))) (let* ((plist full-melpa-style-recipe) (package (if plist (car-safe (prog1 plist (setq plist (cdr plist)))) (signal 'wrong-number-of-arguments (list '(package . plist) (length plist)))))) (progn (if straight-allow-recipe-inheritance (progn (let* ((sources (plist-get plist :source)) (default (or (let* ((retrieved (and t (straight-recipes-retrieve package (if (listp sources) sources (list sources)))))) (if retrieved (cdr (if (straight--quoted-form-p retrieved) (eval retrieved) retrieved)) nil)) plist)) (type (or (plist-get default :type) 'git)) (keywords (append (remq :local-repo straight--build-keywords) (if (eq type 'built-in) nil (straight-vc-keywords type))))) (let* ((fork (and t (plist-get plist :fork)))) (if fork (progn (progn (setq default (copy-sequence default)) (setq default (plist-put default :fork fork))) (if (listp fork) nil (setq fork 'nil)) (progn (setq fork (copy-sequence fork)) (setq fork (plist-put fork :repo (straight-vc-git--fork-repo default)))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :fork fork)))) nil)) (let ((--dolist-tail-- keywords)) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (if (plist-member plist keyword) nil (let* ((value (and t (plist-get default keyword)))) (if value (setq plist (plist-put plist keyword value)) nil))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist)))))
(catch '--cl-block-straight--convert-recipe-- (if (memq melpa-style-recipe straight-built-in-pseudo-packages) (progn (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))))) (or (and (symbolp melpa-style-recipe) (gethash (symbol-name melpa-style-recipe) straight--recipe-cache)) (let* ((recipe-specified-p (listp melpa-style-recipe)) (full-melpa-style-recipe (if recipe-specified-p melpa-style-recipe (or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories)))))) (if (straight--quoted-form-p full-melpa-style-recipe) (progn (setq full-melpa-style-recipe (eval full-melpa-style-recipe)))) (let* ((plist full-melpa-style-recipe) (package (if plist (car-safe (prog1 plist (setq plist (cdr plist)))) (signal 'wrong-number-of-arguments (list '(package . plist) (length plist)))))) (progn (if straight-allow-recipe-inheritance (progn (let* ((sources (plist-get plist :source)) (default (or (let* ((retrieved (and t (straight-recipes-retrieve package (if (listp sources) sources (list sources)))))) (if retrieved (cdr (if (straight--quoted-form-p retrieved) (eval retrieved) retrieved)) nil)) plist)) (type (or (plist-get default :type) 'git)) (keywords (append (remq :local-repo straight--build-keywords) (if (eq type 'built-in) nil (straight-vc-keywords type))))) (let* ((fork (and t (plist-get plist :fork)))) (if fork (progn (progn (setq default (copy-sequence default)) (setq default (plist-put default :fork fork))) (if (listp fork) nil (setq fork 'nil)) (progn (setq fork (copy-sequence fork)) (setq fork (plist-put fork :repo (straight-vc-git--fork-repo default)))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :fork fork)))) nil)) (let ((--dolist-tail-- keywords)) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (if (plist-member plist keyword) nil (let* ((value (and t (plist-get default keyword)))) (if value (setq plist (plist-put plist keyword value)) nil))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist))))))
(straight--convert-recipe ivy-prescient " ")
(let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (plist-get recipe :no-build) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t))))))
(catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (plist-get recipe :no-build) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))
((closure (straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) (melpa-style-recipe &optional no-clone no-build cause interactive) "Register, clone, build, and activate a package and its dependencies.\nThis is the main entry point to the functionality of straight.el.\n\nMELPA-STYLE-RECIPE is either a symbol naming a package, or a list\nwhose car is a symbol naming a package and whose cdr is a\nproperty list containing e.g. :type', :local-repo', :files',\nand VC backend specific keywords.\n\nFirst, the package recipe is registered with straight.el. If\nNO-CLONE is a function, then it is called with two arguments: the\npackage name as a string, and a boolean value indicating whether\nthe local repository for the package is available. In that case,\nthe return value of the function is used as the value of NO-CLONE\ninstead. In any case, if NO-CLONE is non-nil, then processing\nstops here.\n\nOtherwise, the repository is cloned, if it is missing. If\nNO-BUILD is a function, then it is called with one argument: the\npackage name as a string. In that case, the return value of the\nfunction is used as the value of NO-BUILD instead. In any case,\nif NO-BUILD is non-nil, then processing halts here. Otherwise,\nthe package is built and activated. Note that if the package\nrecipe has a non-nil :no-build' entry, then NO-BUILD is ignored\nand processing always stops before building and activation\noccurs.\n\nCAUSE is a string explaining the reason why\n`straight-use-package' has been called. It is for internal use\nonly, and is used to construct progress messages. INTERACTIVE is\nnon-nil if the function has been called interactively. It is for\ninternal use only, and is used to determine whether to show a\nhint about how to install the package permanently.\n\nReturn non-nil if package was actually installed, and nil\notherwise (this can only happen if NO-CLONE is non-nil)." (interactive (list (straight-get-recipe (if current-prefix-arg (progn 'interactive))) nil nil nil 'interactive)) (catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (plist-get recipe :no-build) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))) ivy-prescient no-clone nil " " nil)
(apply (closure (straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-black-list t) (melpa-style-recipe &optional no-clone no-build cause interactive) "Register, clone, build, and activate a package and its dependencies.\nThis is the main entry point to the functionality of straight.el.\n\nMELPA-STYLE-RECIPE is either a symbol naming a package, or a list\nwhose car is a symbol naming a package and whose cdr is a\nproperty list containing e.g. :type', :local-repo', :files',\nand VC backend specific keywords.\n\nFirst, the package recipe is registered with straight.el. If\nNO-CLONE is a function, then it is called with two arguments: the\npackage name as a string, and a boolean value indicating whether\nthe local repository for the package is available. In that case,\nthe return value of the function is used as the value of NO-CLONE\ninstead. In any case, if NO-CLONE is non-nil, then processing\nstops here.\n\nOtherwise, the repository is cloned, if it is missing. If\nNO-BUILD is a function, then it is called with one argument: the\npackage name as a string. In that case, the return value of the\nfunction is used as the value of NO-BUILD instead. In any case,\nif NO-BUILD is non-nil, then processing halts here. Otherwise,\nthe package is built and activated. Note that if the package\nrecipe has a non-nil :no-build' entry, then NO-BUILD is ignored\nand processing always stops before building and activation\noccurs.\n\nCAUSE is a string explaining the reason why\n`straight-use-package' has been called. It is for internal use\nonly, and is used to construct progress messages. INTERACTIVE is\nnon-nil if the function has been called interactively. It is for\ninternal use only, and is used to determine whether to show a\nhint about how to install the package permanently.\n\nReturn non-nil if package was actually installed, and nil\notherwise (this can only happen if NO-CLONE is non-nil)." (interactive (list (straight-get-recipe (if current-prefix-arg (progn 'interactive))) nil nil nil 'interactive)) (catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (plist-get recipe :no-build) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))) (ivy-prescient no-clone nil " " nil))
(straight-use-package ivy-prescient no-clone)
(straight-register-package ivy-prescient)
(if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (straight-register-package name))
(if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (straight-register-package name)))
(let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(name &key recipe disable ignore shadow &allow-other-keys) (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (straight-register-package name))))
(let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(name &key recipe disable ignore shadow &allow-other-keys) (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (straight-register-package name)))) (setq --dolist-tail-- (cdr --dolist-tail--)))
(while --dolist-tail-- (let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(name &key recipe disable ignore shadow &allow-other-keys) (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (straight-register-package name)))) (setq --dolist-tail-- (cdr --dolist-tail--))))
(let ((--dolist-tail-- doom-packages)) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(name &key recipe disable ignore shadow &allow-other-keys) (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (straight-register-package name)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))
(progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing straight.el" 0 5 (face font-lock-comment-face)))))) (or (setq doom-disabled-packages nil doom-packages (doom-package-list)) (error "Failed to read any packages")) (let ((--dolist-tail-- doom-packages)) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(name &key recipe disable ignore shadow &allow-other-keys) (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (straight-register-package name)))) (setq --dolist-tail-- (cdr --dolist-tail--))))))
(if (or force-p (null doom-packages)) (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing straight.el" 0 5 (face font-lock-comment-face)))))) (or (setq doom-disabled-packages nil doom-packages (doom-package-list)) (error "Failed to read any packages")) (let ((--dolist-tail-- doom-packages)) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(name &key recipe disable ignore shadow &allow-other-keys) (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (straight-register-package name)))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))
(doom-initialize-packages)
(doom-cli-packages-install)
(let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t)
(unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h))
(let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))
((closure ((plist) (aliases s) (name . sync) t) (--alist--) (ignore --alist--) (let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))) nil)
(funcall (closure ((plist) (aliases s) (name . sync) t) (--alist--) (ignore --alist--) (let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))) nil)
(if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command))
(let* ((cli (and t (doom-cli-get command)))) (if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command)))
(doom-cli-execute "sync")
(apply doom-cli-execute "sync" nil)
(if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))
(let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time))))))))
(if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))
(catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time))))))))))
(unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))
(progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer))))
(unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))
(let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old)))
(let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))
(let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old)))))
(condition-case e (let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(route opt arg n d) (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\(.+\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list '(route . commands) (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1))
(let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(route opt arg n d) (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\(.+\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list '(route . commands) (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))
((closure ((plist) (aliases) (name . :doom) cl-struct-doom-cli-option-tags cl-struct-doom-cli-tags t) (--alist--) (ignore --alist--) (let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(route opt arg n d) (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\(.+\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list '(route . commands) (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))) ((command . "sync")))
(funcall (closure ((plist) (aliases) (name . :doom) cl-struct-doom-cli-option-tags cl-struct-doom-cli-tags t) (--alist--) (ignore --alist--) (let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " doom log")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (generate-new-buffer " temp file"))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list '(route opt arg n d) (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\(.+\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list '(route . commands) (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))) ((command . "sync")))
(if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command))
(let* ((cli (and t (doom-cli-get command)))) (if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command)))
(doom-cli-execute :doom "sync")

The nuclear option of removing .emacs.d, cloning, and installing again worked.

authors: hlissner robertodr