Skip to content

Instantly share code, notes, and snippets.

@formula-spectre
Created April 21, 2024 19:00
Show Gist options
  • Save formula-spectre/64d12fa166da6e86f8123f6e313fc0a6 to your computer and use it in GitHub Desktop.
Save formula-spectre/64d12fa166da6e86f8123f6e313fc0a6 to your computer and use it in GitHub Desktop.
;; -*- lisp-interaction -*-
;; vim: set ft=lisp:
;; command=("emacs" "--load" "/home/formula/.local/bin/doom" "--" "sync" "-e")
;; date="2024-04-21 20-58-31"
;;;; ENVIRONMENT
GNU Emacs v29.3 nil
Doom core v3.0.0-pre HEAD -> master, origin/master, origin/HEAD 9620bb45a 2024-04-18 14:20:48 -0400
Doom modules v24.04.0-pre HEAD -> master, origin/master, origin/HEAD 9620bb45a 2024-04-18 14:20:48 -0400
;;;; 0
((regexp-quote nil)
((debugger-may-continue . t)
(inhibit-redisplay)
(inhibit-debugger . t)
(inhibit-changing-match-data)))
;;;; 1
((org-src-coderef-regexp nil)
nil)
;;;; 2
((org-babel-tangle-single-block 1)
nil)
;;;; 3
((org-babel-tangle-collect-blocks nil nil)
((case-fold-search . t)))
;;;; 4
((org-babel-tangle nil "/home/formula/.config/doom.d/config.el" nil)
((org-babel-default-header-args
(:results . "replace")
(:exports . "code")
(:tangle . "/home/formula/.config/doom.d/config.el")
(:hlines . "no")
(:noweb . "no")
(:cache . "no")
(:session . "none"))))
;;;; 5
((org-babel-tangle-file "/home/formula/.config/doom.d/config.org" "/home/formula/.config/doom.d/config.el")
nil)
;;;; 6
((and t
(org-babel-tangle-file target dest))
nil)
;;;; 7
((let*
((files
(and t
(org-babel-tangle-file target dest))))
(if files
(always
(doom-print
(doom-print--format
(doom-print--class 'success "Done tangling %d file(s)!"
(length files)))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'error "Failed to tangle any blocks from your config.")))
nil)))
nil)
;;;; 8
((let
((org-startup-indented nil)
(org-startup-folded nil)
(vc-handled-backends nil)
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
(org-mode-hook nil)
(org-inhibit-startup t)
(org-confirm-babel-evaluate nil)
(doom-print-message-level 'info))
(let*
((files
(and t
(org-babel-tangle-file target dest))))
(if files
(always
(doom-print
(doom-print--format
(doom-print--class 'success "Done tangling %d file(s)!"
(length files)))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'error "Failed to tangle any blocks from your config.")))
nil))))
((org-startup-indented)
(org-startup-folded)
(vc-handled-backends)
(write-file-functions)
(before-save-hook)
(after-save-hook)
(org-mode-hook)
(org-inhibit-startup . t)
(org-confirm-babel-evaluate)
(target . "/home/formula/.config/doom.d/config.org")
(dest . "config.el")
(dir . "/home/formula/.config/doom.d/")
(target . "/home/formula/.config/doom.d/config.org")
(dest . "/home/formula/.config/doom.d/config.el")
(doom-print-message-level . info)))
;;;; 9
((let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((org-startup-indented nil)
(org-startup-folded nil)
(vc-handled-backends nil)
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
(org-mode-hook nil)
(org-inhibit-startup t)
(org-confirm-babel-evaluate nil)
(doom-print-message-level 'info))
(let*
((files
(and t
(org-babel-tangle-file target dest))))
(if files
(always
(doom-print
(doom-print--format
(doom-print--class 'success "Done tangling %d file(s)!"
(length files)))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'error "Failed to tangle any blocks from your config.")))
nil)))))
((doom-print-level . notice)
(doom-print-indent . 2)))
;;;; 10
((progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((org-startup-indented nil)
(org-startup-folded nil)
(vc-handled-backends nil)
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
(org-mode-hook nil)
(org-inhibit-startup t)
(org-confirm-babel-evaluate nil)
(doom-print-message-level 'info))
(let*
((files
(and t
(org-babel-tangle-file target dest))))
(if files
(always
(doom-print
(doom-print--format
(doom-print--class 'success "Done tangling %d file(s)!"
(length files)))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'error "Failed to tangle any blocks from your config.")))
nil))))))
nil)
;;;; 11
((let*
((default-directory
(or dir default-directory))
(target
(expand-file-name target))
(dest
(expand-file-name dest)))
(doom-print
(doom-print--format
(doom-print--class 'start "Tangling your literate config...")))
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((org-startup-indented nil)
(org-startup-folded nil)
(vc-handled-backends nil)
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
(org-mode-hook nil)
(org-inhibit-startup t)
(org-confirm-babel-evaluate nil)
(doom-print-message-level 'info))
(let*
((files
(and t
(org-babel-tangle-file target dest))))
(if files
(always
(doom-print
(doom-print--format
(doom-print--class 'success "Done tangling %d file(s)!"
(length files)))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'error "Failed to tangle any blocks from your config.")))
nil)))))))
((default-directory . "/home/formula/.config/doom.d/")
(target . "/home/formula/.config/doom.d/config.org")
(dest . "config.el")
(dir . "/home/formula/.config/doom.d/")
(target . "/home/formula/.config/doom.d/config.org")
(dest . "/home/formula/.config/doom.d/config.el")))
;;;; 12
((and
(require 'ox nil t)
(require 'ob-tangle nil t)
(let*
((default-directory
(or dir default-directory))
(target
(expand-file-name target))
(dest
(expand-file-name dest)))
(doom-print
(doom-print--format
(doom-print--class 'start "Tangling your literate config...")))
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((org-startup-indented nil)
(org-startup-folded nil)
(vc-handled-backends nil)
(write-file-functions nil)
(before-save-hook nil)
(after-save-hook nil)
(org-mode-hook nil)
(org-inhibit-startup t)
(org-confirm-babel-evaluate nil)
(doom-print-message-level 'info))
(let*
((files
(and t
(org-babel-tangle-file target dest))))
(if files
(always
(doom-print
(doom-print--format
(doom-print--class 'success "Done tangling %d file(s)!"
(length files)))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'error "Failed to tangle any blocks from your config.")))
nil))))))))
nil)
;;;; 13
((+literate-tangle "/home/formula/.config/doom.d/config.org" "config.el" "/home/formula/.config/doom.d/")
((target . "/home/formula/.config/doom.d/config.org")
(dest . "config.el")
(dir . "/home/formula/.config/doom.d/")))
;;;; 14
((and
(+literate-tangle +literate-config-file doom-module-config-file doom-user-dir)
(or
(not noninteractive)
(exit! "__NOTANGLE=1 $@")))
nil)
;;;; 15
((or
(getenv "__NOTANGLE")
(and
(+literate-tangle +literate-config-file doom-module-config-file doom-user-dir)
(or
(not noninteractive)
(exit! "__NOTANGLE=1 $@"))))
nil)
;;;; 16
((+literate-tangle--sync)
nil)
;;;; 17
((if
(+literate-tangle--sync)
nil
(kill-emacs 3))
nil)
;;;; 18
((if noninteractive
(if
(+literate-tangle--sync)
nil
(kill-emacs 3))
(+literate-tangle--async))
nil)
;;;; 19
((+literate-tangle-h)
nil)
;;;; 20
((run-hooks doom-before-sync-hook)
nil)
;;;; 21
((let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))
((cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(alist
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))
(noenvvar? . "-e")
(update?)
(noupdate?)
(purge?)
(jobs)
(rebuild?)
(nobuild?)
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))))
;;;; 22
(((closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))
#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
((cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(alist
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))))
;;;; 23
((funcall
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))
#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
nil)
;;;; 24
((doom-cli-execute #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
((cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(bindings
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))))
;;;; 25
((let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(command "doom" "sync")
(cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(prefix . "doom")
(seen t)
(runners
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
(tail
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
(x15 #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))
(x16 . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(x17
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))
(cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(bindings
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))))
;;;; 26
((let*
((x16
(car-safe x15))
(x17
(cdr-safe x15)))
(let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings)))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(command "doom" "sync")
(cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(prefix . "doom")
(seen t)
(runners
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
(tail
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
(x15 #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))
(x16 . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(x17
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))))
;;;; 27
((progn
(ignore
(consp x15))
(let*
((x16
(car-safe x15))
(x17
(cdr-safe x15)))
(let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings))))
nil)
;;;; 28
((let
((x15
(car tail)))
(progn
(ignore
(consp x15))
(let*
((x16
(car-safe x15))
(x17
(cdr-safe x15)))
(let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings))))
(setq tail
(cdr tail)))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(command "doom" "sync")
(cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(prefix . "doom")
(seen t)
(runners
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
(tail
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
(x15 #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e"))))
;;;; 29
((while tail
(let
((x15
(car tail)))
(progn
(ignore
(consp x15))
(let*
((x16
(car-safe x15))
(x17
(cdr-safe x15)))
(let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings))))
(setq tail
(cdr tail))))
nil)
;;;; 30
((let
((tail
(nreverse runners)))
(while tail
(let
((x15
(car tail)))
(progn
(ignore
(consp x15))
(let*
((x16
(car-safe x15))
(x17
(cdr-safe x15)))
(let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings))))
(setq tail
(cdr tail)))))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(command "doom" "sync")
(cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(prefix . "doom")
(seen t)
(runners
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))
(tail
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))))
;;;; 31
((let
((seen
'(t))
runners)
(let
((tail
(doom-cli-find command
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2)))))
(while tail
(let
((cli
(car tail)))
(setq runners
(cons
(cons
(doom-cli-get cli)
(doom-cli--bindings cli context seen))
runners))
(setq tail
(cdr tail)))))
(let
((tail
(nreverse runners)))
(while tail
(let
((x15
(car tail)))
(progn
(ignore
(consp x15))
(let*
((x16
(car-safe x15))
(x17
(cdr-safe x15)))
(let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings))))
(setq tail
(cdr tail)))))
context)
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(command "doom" "sync")
(cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(prefix . "doom")
(seen t)
(runners
(#s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)))))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(nobuild?)
(rebuild?)
(jobs)
(purge?)
(noupdate?)
(update?)
(noenvvar? . "-e")))))
;;;; 32
((cond
((null
(or command
(doom-cli-get
(list prefix)
t)))
(signal 'doom-cli-invalid-prefix-error
(list prefix)))
((progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 8))
(let*
((val
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 8))))
(cond
((equal val '"--version")
(let nil
(doom-cli-call
(cons ':version
(cdr command))
context)
t))
((member val
'("--help" "-?"))
(let nil
(doom-cli-call
(cons ':help
(cdr command))
context)
t))
(t
(let nil
(error "In meta mode with no destination!"))))))
((not
(and cli
(let
((cl-x
(doom-cli-get cli)))
(progn
(or
(progn
(and
(memq
(type-of cl-x)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cl-x)))
(aref cl-x 9)))))
(signal 'doom-cli-command-not-found-error
(append command
(alist-get t
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 14))))))
((let
((seen
'(t))
runners)
(let
((tail
(doom-cli-find command
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2)))))
(while tail
(let
((cli
(car tail)))
(setq runners
(cons
(cons
(doom-cli-get cli)
(doom-cli--bindings cli context seen))
runners))
(setq tail
(cdr tail)))))
(let
((tail
(nreverse runners)))
(while tail
(let
((x15
(car tail)))
(progn
(ignore
(consp x15))
(let*
((x16
(car-safe x15))
(x17
(cdr-safe x15)))
(let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings))))
(setq tail
(cdr tail)))))
context)))
nil)
;;;; 33
((let*
((command
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 10)))
(cli
(doom-cli-get command t))
(prefix
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 7))))
(if doom-inhibit-log nil
(doom--log "context-execute: %s"
(mapconcat #'doom-cli-command-string
(delq nil
(list
(car
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 11)))
command))
" -> ")))
(cond
((null
(or command
(doom-cli-get
(list prefix)
t)))
(signal 'doom-cli-invalid-prefix-error
(list prefix)))
((progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 8))
(let*
((val
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 8))))
(cond
((equal val '"--version")
(let nil
(doom-cli-call
(cons ':version
(cdr command))
context)
t))
((member val
'("--help" "-?"))
(let nil
(doom-cli-call
(cons ':help
(cdr command))
context)
t))
(t
(let nil
(error "In meta mode with no destination!"))))))
((not
(and cli
(let
((cl-x
(doom-cli-get cli)))
(progn
(or
(progn
(and
(memq
(type-of cl-x)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cl-x)))
(aref cl-x 9)))))
(signal 'doom-cli-command-not-found-error
(append command
(alist-get t
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 14))))))
((let
((seen
'(t))
runners)
(let
((tail
(doom-cli-find command
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2)))))
(while tail
(let
((cli
(car tail)))
(setq runners
(cons
(cons
(doom-cli-get cli)
(doom-cli--bindings cli context seen))
runners))
(setq tail
(cdr tail)))))
(let
((tail
(nreverse runners)))
(while tail
(let
((x15
(car tail)))
(progn
(ignore
(consp x15))
(let*
((x16
(car-safe x15))
(x17
(cdr-safe x15)))
(let
((cli x16)
(bindings x17))
(doom-cli-execute cli bindings))))
(setq tail
(cdr tail)))))
context))))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(command "doom" "sync")
(cli . #s(doom-cli
("doom" "sync")
nil
(("SUMMARY" . "Synchronize your config with Doom Emacs.")
("MAIN" . "This is the equivalent of running autoremove, install, autoloads, then\nrecompile. Run this whenever you:\n\n 1. Modify your `doom!' block,\n 2. Add or remove `package!' blocks to your config,\n 3. Add or remove autoloaded functions in module autoloaded files,\n 4. Update Doom outside of Doom (e.g. with git),\n 5. Move your Doom config (either $EMACSDIR or $DOOMDIR) to a new location.\n 6. When you up (or down) grade Emacs itself.\n\nIt will ensure that unneeded packages are removed, all needed packages are\ninstalled, autoloads files are up-to-date and no byte-compiled files have gone\nstale.")
("OPTIONS" . "-j, --jobs\n Defaults to the maximum number of threads (or 1, if your CPU's threadcount\n can't be determined)."))
nil nil
(#s(doom-cli-option noenvvar? "Don't regenerate the envvar file" nil nil
("-e")
nil nil)
#s(doom-cli-option update? "Update all installed packages after syncing" nil nil
("-u")
nil nil)
#s(doom-cli-option noupdate? "Don't update any packages" nil nil
("-U")
nil nil)
#s(doom-cli-option purge? "Purge orphaned package repos & regraft them" nil nil
("--gc")
nil nil)
#s(doom-cli-option jobs "How many threads to use for native compilation" nil nil
("-j" "--jobs")
(num)
nil)
#s(doom-cli-option rebuild? "Rebuild all installed packages, unconditionally" nil nil
("-b" "--rebuild")
nil nil)
#s(doom-cli-option nobuild? "Don't rebuild packages when hostname or Emacs version has changed" nil nil
("-B")
nil nil))
((&context context))
(:benchmark t :prefix
(doom)
:group "Config Management" :docs "Commands for maintaining your Doom Emacs configuration." :hide nil)
(closure
(t)
(cli alist)
(let
((noenvvar?
(cdr
(assq 'noenvvar? alist)))
(update?
(cdr
(assq 'update? alist)))
(noupdate?
(cdr
(assq 'noupdate? alist)))
(purge?
(cdr
(assq 'purge? alist)))
(jobs
(cdr
(assq 'jobs alist)))
(rebuild?
(cdr
(assq 'rebuild? alist)))
(nobuild?
(cdr
(assq 'nobuild? alist)))
(context
(cdr
(assq 'context alist))))
(if
(doom-profiles-bootloadable-p)
(progn
(call!
'(profiles sync "--reload"))))
(if jobs
(progn
(setq native-comp-async-jobs-number
(truncate jobs))))
(run-hooks 'doom-before-sync-hook)
(add-hook 'kill-emacs-hook #'doom-sync--abort-warning-h)
(doom-print
(doom-print--format
(doom-print--class 'item "Using Emacs %s @ %s")
emacs-version
(doom-print--class 'path invocation-directory invocation-name)))
(doom-print
(doom-print--format
(doom-print--class 'start "Synchronizing %S profile...")
(or
(car doom-profile)
"default")))
(unwind-protect
(progn
(let
((doom-print-level
(or nil doom-print-level))
(doom-print-indent
(+
(if t
(or nil doom-print-indent-increment)
0)
doom-print-indent)))
(let
((x0
(doom-file-read doom-cli-sync-info-file :by 'read :noerror t))
(to-rebuild nil))
(progn
(ignore
(consp x0))
(let*
((x53
(car-safe x0))
(x54
(cdr-safe x0)))
(let
((old-version x53)
(old-host x54))
(progn
(if
(and old-version
(not
(equal old-version emacs-version)))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Emacs version has changed since last sync (from %s to %s)")
old-version emacs-version))
(setq to-rebuild t)))
(if
(and old-host
(not
(equal old-host
(system-name))))
(progn
(doom-print
(doom-print--format
(doom-print--class 'warn "Your system has changed since last sync")))
(setq to-rebuild t)))
(if
(and to-rebuild
(not
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 6))))
(progn
(cond
(nobuild?
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages must be rebuilt, but -B has prevented it. Skipping..."))))
((doom-cli-context-get context 'upgrading)
(doom-print
(doom-print--format
(doom-print--class 'warn "Packages will be rebuilt")))
(setq rebuild? t))
((y-or-n-p
(doom-print--format " %s" "Installed packages must be rebuilt. Do so now?"))
(setq rebuild? t))
((exit! 0))))))))))
(if
(and
(not noenvvar?)
(file-exists-p doom-env-file))
(progn
(call!
'(env))))
(doom-packages-ensure rebuild?)
(if noupdate? nil
(doom-packages-update
(not update?)))
(doom-packages-purge purge? purge? purge? purge? purge?)
(if
(doom-profile-generate)
(progn
(doom-print
(doom-print--format
(doom-print--class 'item "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))
(run-hooks 'doom-after-sync-hook)))
(if
(or rebuild?
(not
(file-exists-p doom-cli-sync-info-file)))
(progn
(let
((temp-file doom-cli-sync-info-file)
(temp-buffer
(generate-new-buffer " *temp file*" t)))
(unwind-protect
(prog1
(save-current-buffer
(set-buffer temp-buffer)
(prin1
(cons emacs-version
(system-name))
(current-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))))))
t))
(remove-hook 'kill-emacs-hook #'doom-sync--abort-warning-h))))))
(prefix . "doom")))
;;;; 34
((doom-cli-context-execute #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
((context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))))
;;;; 35
((let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
nil)
;;;; 36
((let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
((prefix . "doom")
(args
("sync" "-e"))
(args "sync" "-e")
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(write-logs-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-write-logs-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(show-benchmark-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-benchmark-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(doomctxt . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(streamspec
(>= notice #<buffer *doom-cli stdout*>)
(t . #<buffer *doom-cli stderr*>))
(vnew closure
((streams
(#[128 "\302\301\303\300\4\"\"\207"
[(0 2)
>= apply append]
6 "\n\n(fn &rest ARGS2)"]
. #<buffer *doom-cli stdout*>)
(t . #<buffer *doom-cli stderr*>))
(old . #<subr message>)
(level . debug))
(message &rest args)
(if message
(progn
(let
((output
(apply #'doom-print--format message args)))
(if
(<= doom-print--output-depth 1)
(doom-print output :level level :stream t)
(let
((doom-print--output-depth
(1- doom-print--output-depth)))
(funcall old "%s" output)))
(let
((tail streams))
(while tail
(let
((stream
(car tail)))
(if
(or
(eq
(car stream)
t)
(funcall
(car stream)))
(progn
(doom-print output :stream
(cdr stream))))
(setq tail
(cdr tail))))))
message)))
(old . #<subr message>)
(args "doom" "sync" "-e")
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))))
;;;; 37
((condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
nil)
;;;; 38
((doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context)
nil)
;;;; 39
((progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))
nil)
;;;; 40
((let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context)))
((doom-print--output-depth . 1)))
;;;; 41
((progn
(fset #'message vnew)
(let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))))
nil)
;;;; 42
((unwind-protect
(progn
(fset #'message vnew)
(let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))))
(fset #'message old))
nil)
;;;; 43
((let*
((vnew
(doom-print--redirect-message streamspec
(if noninteractive 'debug 'notice)))
(old
(symbol-function #'message)))
(unwind-protect
(progn
(fset #'message vnew)
(let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))))
(fset #'message old)))
((prefix . "doom")
(args
("sync" "-e"))
(args "sync" "-e")
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(write-logs-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-write-logs-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(show-benchmark-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-benchmark-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(doomctxt . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(streamspec
(>= notice #<buffer *doom-cli stdout*>)
(t . #<buffer *doom-cli stderr*>))
(vnew closure
((streams
(#[128 "\302\301\303\300\4\"\"\207"
[(0 2)
>= apply append]
6 "\n\n(fn &rest ARGS2)"]
. #<buffer *doom-cli stdout*>)
(t . #<buffer *doom-cli stderr*>))
(old . #<subr message>)
(level . debug))
(message &rest args)
(if message
(progn
(let
((output
(apply #'doom-print--format message args)))
(if
(<= doom-print--output-depth 1)
(doom-print output :level level :stream t)
(let
((doom-print--output-depth
(1- doom-print--output-depth)))
(funcall old "%s" output)))
(let
((tail streams))
(while tail
(let
((stream
(car tail)))
(if
(or
(eq
(car stream)
t)
(funcall
(car stream)))
(progn
(doom-print output :stream
(cdr stream))))
(setq tail
(cdr tail))))))
message)))
(old . #<subr message>)))
;;;; 44
((let
((standard-output
(doom-print--redirect-standard-output streamspec t)))
(let*
((vnew
(doom-print--redirect-message streamspec
(if noninteractive 'debug 'notice)))
(old
(symbol-function #'message)))
(unwind-protect
(progn
(fset #'message vnew)
(let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))))
(fset #'message old))))
((standard-output closure
((streams
(t . #<buffer *doom-cli stdout*>)
(t . #<buffer *doom-cli stderr*>))
(level . t))
(ch)
(let
((str
(char-to-string ch)))
(let
((tail streams))
(while tail
(let
((stream
(car tail)))
(if
(or
(eq
(car stream)
t)
(funcall
(car stream)))
(progn
(doom-print str :newline nil :stream
(cdr stream))))
(setq tail
(cdr tail)))))
(doom-print str :newline nil :stream t :level level)))))
;;;; 45
((let
((streamspec
(list
(list '>= 'notice
(progn
(or
(progn
(and
(memq
(type-of doomctxt)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context doomctxt)))
(aref doomctxt 16)))
(cons t
(progn
(or
(progn
(and
(memq
(type-of doomctxt)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context doomctxt)))
(aref doomctxt 17))))))
(let
((standard-output
(doom-print--redirect-standard-output streamspec t)))
(let*
((vnew
(doom-print--redirect-message streamspec
(if noninteractive 'debug 'notice)))
(old
(symbol-function #'message)))
(unwind-protect
(progn
(fset #'message vnew)
(let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))))
(fset #'message old)))))
((prefix . "doom")
(args
("sync" "-e"))
(args "sync" "-e")
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(write-logs-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-write-logs-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(show-benchmark-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-benchmark-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(doomctxt . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(streamspec
(>= notice #<buffer *doom-cli stdout*>)
(t . #<buffer *doom-cli stderr*>))))
;;;; 46
((let*
((doomctxt context)
(debugger
(doom-rpartial #'doom-cli-debugger doomctxt))
(debug-on-error t))
(let
((streamspec
(list
(list '>= 'notice
(progn
(or
(progn
(and
(memq
(type-of doomctxt)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context doomctxt)))
(aref doomctxt 16)))
(cons t
(progn
(or
(progn
(and
(memq
(type-of doomctxt)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context doomctxt)))
(aref doomctxt 17))))))
(let
((standard-output
(doom-print--redirect-standard-output streamspec t)))
(let*
((vnew
(doom-print--redirect-message streamspec
(if noninteractive 'debug 'notice)))
(old
(symbol-function #'message)))
(unwind-protect
(progn
(fset #'message vnew)
(let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))))
(fset #'message old))))))
((prefix . "doom")
(args
("sync" "-e"))
(args "sync" "-e")
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(write-logs-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-write-logs-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(show-benchmark-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-benchmark-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(doomctxt . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(debugger closure
((args #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(fn . doom-cli-debugger))
(&rest pre-args)
(apply fn
(append pre-args args)))
(debug-on-error . t)))
;;;; 47
((let*
((args
(flatten-list args))
(context
(make-doom-cli-context :prefix prefix :whole args))
(doom-cli--context context)
(write-logs-fn
(doom-partial #'doom-cli--output-write-logs-h context))
(show-benchmark-fn
(doom-partial #'doom-cli--output-benchmark-h context)))
(let*
((doomctxt context)
(debugger
(doom-rpartial #'doom-cli-debugger doomctxt))
(debug-on-error t))
(let
((streamspec
(list
(list '>= 'notice
(progn
(or
(progn
(and
(memq
(type-of doomctxt)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context doomctxt)))
(aref doomctxt 16)))
(cons t
(progn
(or
(progn
(and
(memq
(type-of doomctxt)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context doomctxt)))
(aref doomctxt 17))))))
(let
((standard-output
(doom-print--redirect-standard-output streamspec t)))
(let*
((vnew
(doom-print--redirect-message streamspec
(if noninteractive 'debug 'notice)))
(old
(symbol-function #'message)))
(unwind-protect
(progn
(fset #'message vnew)
(let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))))
(fset #'message old)))))))
((prefix . "doom")
(args
("sync" "-e"))
(args "sync" "-e")
(context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
(write-logs-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-write-logs-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(show-benchmark-fn .
#[128 "\302\301\303\300\4\"\"\207"
[(#s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))
doom-cli--output-benchmark-h apply append]
6 "\n\n(fn &rest ARGS2)"])
(doom-cli--context . #s(doom-cli-context
(26149 25047 401302 26000)
28255 0
(117 . 31)
nil nil "doom" nil nil
("doom" "profiles" "sync")
nil
("sync" "-e")
(("--reload" . "--reload")
("-B")
("--rebuild")
("-b")
("--jobs")
("-j")
("--gc")
("-U")
("-u")
("-e" . "-e")
("--eval")
("-E")
("--strict-load")
("--load")
("-L")
("--color")
("--benchmark")
("--profile")
("--pager")
("--emacsdir")
("--doomdir")
("--verbose")
("-v")
("--debug")
("-D")
("--force")
("-!"))
((t)
(("doom" "profiles" "sync")
"--reload")
(("doom" "profiles")
"sync" "--reload")
(("doom")
"profiles" "sync" "--reload"))
#<buffer *doom-cli stdin*> #<buffer *doom-cli stdout*> #<buffer *doom-cli stderr*> nil))))
;;;; 48
((let
((doom-context doom-context))
(let
((tail
(ensure-list 'cli)))
(while tail
(let
((context
(car tail)))
(doom-context-push context)
(setq tail
(cdr tail)))))
(let*
((args
(flatten-list args))
(context
(make-doom-cli-context :prefix prefix :whole args))
(doom-cli--context context)
(write-logs-fn
(doom-partial #'doom-cli--output-write-logs-h context))
(show-benchmark-fn
(doom-partial #'doom-cli--output-benchmark-h context)))
(let*
((doomctxt context)
(debugger
(doom-rpartial #'doom-cli-debugger doomctxt))
(debug-on-error t))
(let
((streamspec
(list
(list '>= 'notice
(progn
(or
(progn
(and
(memq
(type-of doomctxt)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context doomctxt)))
(aref doomctxt 16)))
(cons t
(progn
(or
(progn
(and
(memq
(type-of doomctxt)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context doomctxt)))
(aref doomctxt 17))))))
(let
((standard-output
(doom-print--redirect-standard-output streamspec t)))
(let*
((vnew
(doom-print--redirect-message streamspec
(if noninteractive 'debug 'notice)))
(old
(symbol-function #'message)))
(unwind-protect
(progn
(fset #'message vnew)
(let
((doom-print--output-depth
(1+ doom-print--output-depth)))
(progn
(if doom-inhibit-log nil
(doom--log "run!: %s %s" prefix
(combine-and-quote-strings args)))
(add-hook 'kill-emacs-hook show-benchmark-fn 94)
(add-hook 'kill-emacs-hook write-logs-fn 95)
(if
(doom-cli-context-pipe-p context :out t)
(progn
(setq doom-print-backend nil)))
(if
(doom-cli-context-pipe-p context :in)
(progn
(save-current-buffer
(set-buffer
(progn
(or
(progn
(and
(memq
(type-of context)
cl-struct-doom-cli-context-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-context context)))
(aref context 15)))
(while
(let*
((in
(and t
(condition-case nil
(progn
(read-from-minibuffer ""))
(error nil)))))
(if in
(insert in "\n")
(condition-case nil
(progn
(delete-char -1))
(error nil))))))))
(doom-cli--exit
(condition-case e
(let*
((args
(cons
(if
(getenv "__DOOMDUMP")
:dump prefix)
args))
(context
(doom-cli-context-restore
(getenv "__DOOMCONTEXT")
context))
(context
(doom-cli-context-parse args context)))
(run-hook-with-args 'doom-cli-before-run-functions context)
(let
((result
(doom-cli-context-execute context)))
(run-hook-with-args 'doom-cli-after-run-functions context result))
0)
(doom-cli-wrong-number-of-arguments-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x26
(car-safe val))
(x27
(cdr-safe val)))
(progn
(ignore
(consp x27))
(let*
((x28
(car-safe x27))
(x29
(cdr-safe x27)))
(progn
(ignore
(consp x29))
(let*
((x30
(car-safe x29))
(x31
(cdr-safe x29)))
(progn
(ignore
(consp x31))
(let*
((x32
(car-safe x31))
(x33
(cdr-safe x31)))
(progn
(ignore
(consp x33))
(let*
((x34
(car-safe x33))
(x35
(cdr-safe x33)))
(progn
(ignore
(null x35))
(let
((command x26)
(flag x28)
(args x30)
(min x32)
(max x34))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %S expected %s argument%s, but got %d")
(or flag
(doom-cli-command-string
(if
(keywordp
(car command))
command
(cdr command))))
(if
(or
(= min max)
(= max most-positive-fixnum))
min
(format "%d-%d" min max))
(if
(or
(= min 0)
(> min 1))
"s" "")
(length args)))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)))))))))))))))
5)
(doom-cli-unrecognized-option-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unknown option %s")
(car
(cdr e))))
(doom-cli-call
(cons ':help
(cons "--synopsis"
(cons "--postamble"
(cdr
(doom-cli--command context)))))
context e)
5)
(doom-cli-invalid-option-error
(let*
((val
(cdr e)))
(progn
(ignore
(consp val))
(let*
((x36
(car-safe val))
(x37
(cdr-safe val)))
(progn
(ignore
(consp x37))
(let*
((x38
(car-safe x37))
(x39
(cdr-safe x37)))
(progn
(ignore
(consp x39))
(let*
((x40
(car-safe x39))
(x41
(cdr-safe x39)))
(progn
(ignore
(consp x41))
(let*
((x42
(car-safe x41))
(x43
(cdr-safe x41)))
(progn
(ignore
(null x43))
(let
((types x36)
(option x38)
(value x40)
(errors x42))
(progn
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s received invalid value %S")
(string-join
(progn
(or
(progn
(and
(memq
(type-of option)
cl-struct-doom-cli-option-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli-option option)))
(aref option 5))
"/")
value))
(doom-print
(doom-print--format
(doom-print--style 'bold "\nValidation errors:")))
(let
((tail errors))
(while tail
(let
((err
(car tail)))
(doom-print
(doom-print--format
(doom-print--class 'item "%s."
(doom-print--class 'fill err))))
(setq tail
(cdr tail)))))))))))))))))
(doom-cli-call
(cons ':help
(cons "--postamble"
(cdr
(doom-cli--command context))))
context e)
5)
(doom-cli-command-not-found-error
(let*
((command
(cdr e))
(cli
(doom-cli-get command)))
(cond
((null cli)
(doom-print
(doom-print--format
(doom-print--style 'red "Error: unrecognized command '%s'")
(doom-cli-command-string
(or
(cdr command)
command))))
(doom-cli-call
(cons ':help
(cons "--similar"
(cons "--postamble"
(cdr command))))
context e))
((null
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 9)))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: a subcommand is required")))
(doom-cli-call
(cons ':help
(cons "--subcommands"
(cons "--postamble"
(cdr command))))
context e))))
4)
(doom-cli-invalid-prefix-error
(let
((prefix
(car
(cdr e))))
(doom-print
(doom-print--format
(doom-print--style 'red "Error: `run!' called with invalid prefix %S")
prefix))
(let*
((suggested
(and t
(let*
((--cl-var-- t)
--cl-var--)
(catch '--cl-block---cl-finish----
(maphash
#'(lambda
(--cl-var-- cli)
(or
(if
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 2))
t
(progn
(setq --cl-var--
(car
(progn
(or
(progn
(and
(memq
(type-of cli)
cl-struct-doom-cli-tags)
t))
(signal 'wrong-type-argument
(list 'doom-cli cli)))
(aref cli 1))))
(setq --cl-var-- nil)))
(throw '--cl-block---cl-finish---- nil)))
doom-cli--table))
--cl-var--))))
(if suggested
(doom-print
(doom-print--format "Did you mean %S?" suggested))
(doom-print
(doom-print--format "There are no commands defined under %S." prefix)))))
4)
(user-error
(doom-print
(doom-print--format
(doom-print--style 'red "Error: %s")
(car
(cdr e))))
(doom-print
(doom-print--format "\nAborting..."))
3))
context))))
(fset #'message old))))))))
((doom-context cli t)))
;;;; 49
((run! "doom"
("sync" "-e"))
((prefix . "doom")
(args
("sync" "-e"))))
;;;; 50
((eval-buffer #<buffer *load*> nil "/home/formula/.config/emacs/bin/doom" nil t)
((eval-buffer-list #<buffer *load*>)
(standard-output)
(lexical-binding)
(standard-input . #<buffer *load*>)
(macroexp--dynvars)
(current-load-list
(require . org-element)
(require . oc-basic)
(require . ol-eww)
(require . ol-rmail)
(require . ol-mhe)
(require . ol-irc)
(require . ol-info)
(require . ol-gnus)
(require . ol-docview)
(require . ol-bibtex)
(require . ol-bbdb)
(require . ol-w3m)
(require . ol-doi)
(require . ob-tangle)
(require . ox-odt)
(require . ox-latex)
(require . ox-icalendar)
(require . ox-html)
(require . ox-ascii)
(require . ox)
"/home/formula/.config/emacs/bin/doom")))
;;;; 51
((load-with-code-conversion "/home/formula/.config/emacs/bin/doom" "/home/formula/.config/emacs/bin/doom" nil t)
((load-in-progress . t)
(inhibit-file-name-operation)
(set-auto-coding-for-load . t)
(load-file-name . "/home/formula/.config/emacs/bin/doom")
(load-true-file-name . "/home/formula/.config/emacs/bin/doom")
(read-symbol-shorthands)))
;;;; 52
((load "/home/formula/.config/emacs/bin/doom" nil t)
((lexical-binding)
(lread--unescaped-character-literals)))
;;;; 53
((command-line-1
("--load" "/home/formula/.local/bin/doom" "--" "sync" "-e"))
((command-line-args-left "--" "sync" "-e")
(argi . "-load")))
;;;; 54
((command-line)
nil)
;;;; 55
((normal-top-level)
nil)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment