In the setup that @jethro linked to, I don’t see any mention of which branch to check out. In hid `packages.el’ file, he has a line like this,
(package! org-roam :recipe (:host github :repo "org-roam/org-roam"))
But I can’t tell how that is loading the v2 branch, unless he’s got that branch checked out locally or something?
I use Doom as well, and have a line like this in packages.el:
(package! org-roam :recipe (:branch "v2"))
But that doesn’t seem to get me onto v2. What are Doom users doing to get the latest org-roam
v2
code loaded?
jethro
March 24, 2021, 5:07am
105
I do have the branch checked out locally, permanently. Maybe this will work?
(package! org-roam :recipe (:host github :repo "org-roam/org-roam" :branch "v2"))
Dang, that still doesn’t seem to do it. BTW I am using the existence of org-roam-find-node
or org-roam-find-file
as the test of which version I have installed. I still have v1 functions.
Where does one check out a github directory to in order for Doom to use that local code rather than the code at github? I am happy to give that a try. But I couldn’t figure it out by Googling for the answer.
jethro
March 24, 2021, 5:19am
107
Yes, something like this
Definitely need to work on the docs, I’m going to pull some ideas from the stuff you have done.
nobiot:
Ripgrep for unlinked reference section was a bit tricky
This is not directly about Org-roam V2 but about Ripgrep and OS package manager, I think; nevertheless, I felt it would be worth mentioning somewhere (especially when Ubuntu is popular):
Thanks, I’ll have a section on this in either the manual or a dedicate post somewhere.
nobiot:
For some reason, Emacs’s shell
session recognised ~/.cargo/bin
, so did Ubuntu’s Terminal app; not shell-command-to-string
— I just assumed it is some sort of PATH setting in Emacs, but I didn’t dig any further.
Emacs shell uses the $PATH variable in your default shell environment (bash, for example), while Emacs uses the variable exec-path
, they can be different.
jethro
March 24, 2021, 5:21am
108
For Doom, I checkout the v2 branch locally at ~/.emacs.d/.local/straight/repos/org-roam
You’ll then have to redo byte-compilation: M-x straight-rebuild-package org-roam
, and restart Emacs, then you should be good.
1 Like
nobiot
March 24, 2021, 6:01am
109
jethro:
Emacs shell uses the $PATH variable in your default shell environment (bash, for example), while Emacs uses the variable exec-path
, they can be different.
Oh yes. Forgot to mention, it was after exec-path
.
So it went like this (I think it was org-roam-unlinked-reference
).
check exect-path for rg (via ~/.cargo/bin
) –
check rg is pcre2
enabled –
shell out with shell-command-to-string
fails with bash error rg
is not recognised
I could not work out how to make step 3 work for ~/.cargo/bin
) – no need to pursue; it’s not Org-roam thing. It was a bit of a bump in the way…
Widows seems to have its own issue with shelling out to Rigpgrep and org-roam-unreferenced-link
and I removed it from the sections config for now – not priority for me, but I might see what the issues might be.
@Mark Thanks for sharing that – I also discovered doom sync -u
somewhere, and did that along the way, but wasn’t sure if that was the change that got me onto v2. I also went into the .local/straight folder where org-roam
was checked out, and when I did git status there, it said I was on v2 but was 17 commits behind, so I did a git pull
there. And then several types of restarts and reloads… and the straight-rebuild-package
thing too… and now I’m on v2
nobiot
March 24, 2021, 4:51pm
113
see if you can do M-x org-roam-setup. Also org-roam-disgnostics should display the version as 2.0.0.
nobiot
March 24, 2021, 4:57pm
115
Not sure why. Have you loaded org-roam.el?
nobiot
March 24, 2021, 7:12pm
117
@Mark ,
My suggestion has been the same since the Actual State thread. Please take a small step at a time.
If you have no reason to stay with Doom, please at least consider using vanilla Emacs with minimal config. I have written a step-by-step guide . It’s for Windows, but the majority of config should be applicable to macOS and Linux. After I have written it, I switched back from Doom to vanilla ; no looking back.
Some people have different opinions and experience, which is healthy as a community, but I will still say that Doom is not beginner friendly, even compared with vanilla. This is so especially when you don’t have a programming background or Vim background (I don’t know if you have either).
For the same reason, I would suggest to refrain from using V2 if you are still learning Emacs. V2 is still in early alpha and the community has just begun trying it out — that is, we are not collectively ready to support beginners of Emacs and Org-roam on V2. For example, Doom does not support V2 yet (even Jethro, Doom user, uses personal config.el to enable V2).
Mark
March 24, 2021, 7:19pm
118
@nobiot
Thanks for this. I’ll start from scratch…
bruce
March 24, 2021, 8:14pm
119
I think branches aren’t working with doom and/or straight. I tried using it a few weeks back with another package, and I could only get the default branch to work.
opened 05:58PM - 19 Dec 20 UTC
is:bug
re:packages
module:core
status:confirmed
**What did you expect to happen?**
modify a recipe with a specified `:branch` f… or an installed package
**What actually happened?**
`doom upgrade`/`doom sync -u` fails with `Wrong type argument`
**Additional details:**
```
;;; $DOOMDIR/packages.el
(package! agda-input
:recipe (:branch "release-2.6.1.2")
:pin nil)
(package! agda2-mode
:recipe (:branch "release-2.6.1.2")
:pin nil)
```
`.emacs.d/.local/doom.error.log` after `doom upgrade`:
<details><pre>
# -*- lisp-interaction -*-
# vim: set ft=lisp:
(wrong-type-argument stringp)
(string-match "^.*/\\(.+\\)\\.git$" nil)
(if (string-match regexp repo) (progn (match-string 1 repo)))
(let ((regexp "^.*/\\(.+\\)\\.git$")) (if (string-match regexp repo) (progn (match-string 1 repo))))
(if host (replace-regexp-in-string "^.+/" "" repo) (let ((regexp "^.*/\\(.+\\)\\.git$")) (if (string-match regexp repo) (progn (match-string 1 repo)))))
(let* ((--cl-rest-- recipe) (repo (car (cdr (plist-member --cl-rest-- ':repo)))) (host (car (cdr (plist-member --cl-rest-- ':host))))) (if host (replace-regexp-in-string "^.+/" "" repo) (let ((regexp "^.*/\\(.+\\)\\.git$")) (if (string-match regexp repo) (progn (match-string 1 repo))))))
(straight-vc-git-local-repo-name (:branch "release-2.6.1.2" :package "agda-input" :type git))
(apply straight-vc-git-local-repo-name (:branch "release-2.6.1.2" :package "agda-input" :type git))
(let ((func (intern (format "straight-vc-%S-%S" type method)))) (if (fboundp func) nil (let ((regexp (format "^straight-vc-%S-[a-z-]+$" type))) (if (catch '--cl-block-nil-- (prog1 nil (mapatoms #'(lambda (sym) (if (and (fboundp sym) (string-match-p regexp (symbol-name sym))) (progn (throw '--cl-block-nil-- t))))))) (error "VC backend `%S' does not implement method `%S'" type method) (error "No such VC backend `%S'" type)))) (apply func args))
(straight-vc local-repo-name git (:branch "release-2.6.1.2" :package "agda-input" :type git))
(let* ((--cl-rest-- recipe) (type (car (cdr (plist-member --cl-rest-- ':type))))) (straight-vc 'local-repo-name type recipe))
(straight-vc-local-repo-name (:branch "release-2.6.1.2" :package "agda-input" :type git))
(or (straight-vc-local-repo-name plist) package)
(plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))
(setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package)))
(progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))
(if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package)))))
(let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist)
(progn (if straight-allow-recipe-inheritance (progn (let* ((sources (plist-get plist :source)) (default (or (let* ((retrieved (and t (straight-recipes-retrieve package (if (listp sources) sources (list sources)))))) (if retrieved (cdr (if (straight--quoted-form-p retrieved) (eval retrieved) retrieved)) nil)) plist)) (type (or (plist-get default :type) 'git)) (keywords (append (remq :local-repo straight--build-keywords) (if (eq type 'built-in) nil (straight-vc-keywords type))))) (let* ((fork (and t (plist-get plist :fork)))) (if fork (progn (progn (setq default (copy-sequence default)) (setq default (plist-put default :fork fork))) (if (listp fork) nil (setq fork 'nil)) (progn (setq fork (copy-sequence fork)) (setq fork (plist-put fork :repo (straight-vc-git--fork-repo default)))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :fork fork)))) nil)) (let ((--dolist-tail-- keywords)) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (if (plist-member plist keyword) nil (let* ((value (and t (plist-get default keyword)))) (if value (setq plist (plist-put plist keyword value)) nil))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist))
(let* ((plist full-melpa-style-recipe) (package (if plist (car-safe (prog1 plist (setq plist (cdr plist)))) (signal 'wrong-number-of-arguments (list nil (length plist)))))) (progn (if straight-allow-recipe-inheritance (progn (let* ((sources (plist-get plist :source)) (default (or (let* ((retrieved (and t (straight-recipes-retrieve package (if (listp sources) sources (list sources)))))) (if retrieved (cdr (if (straight--quoted-form-p retrieved) (eval retrieved) retrieved)) nil)) plist)) (type (or (plist-get default :type) 'git)) (keywords (append (remq :local-repo straight--build-keywords) (if (eq type 'built-in) nil (straight-vc-keywords type))))) (let* ((fork (and t (plist-get plist :fork)))) (if fork (progn (progn (setq default (copy-sequence default)) (setq default (plist-put default :fork fork))) (if (listp fork) nil (setq fork 'nil)) (progn (setq fork (copy-sequence fork)) (setq fork (plist-put fork :repo (straight-vc-git--fork-repo default)))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :fork fork)))) nil)) (let ((--dolist-tail-- keywords)) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (if (plist-member plist keyword) nil (let* ((value (and t (plist-get default keyword)))) (if value (setq plist (plist-put plist keyword value)) nil))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist)))
(let* ((recipe-specified-p (listp melpa-style-recipe)) (full-melpa-style-recipe (if recipe-specified-p melpa-style-recipe (or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories)))))) (if (straight--quoted-form-p full-melpa-style-recipe) (progn (setq full-melpa-style-recipe (eval full-melpa-style-recipe)))) (let* ((plist full-melpa-style-recipe) (package (if plist (car-safe (prog1 plist (setq plist (cdr plist)))) (signal 'wrong-number-of-arguments (list nil (length plist)))))) (progn (if straight-allow-recipe-inheritance (progn (let* ((sources (plist-get plist :source)) (default (or (let* ((retrieved (and t (straight-recipes-retrieve package (if (listp sources) sources (list sources)))))) (if retrieved (cdr (if (straight--quoted-form-p retrieved) (eval retrieved) retrieved)) nil)) plist)) (type (or (plist-get default :type) 'git)) (keywords (append (remq :local-repo straight--build-keywords) (if (eq type 'built-in) nil (straight-vc-keywords type))))) (let* ((fork (and t (plist-get plist :fork)))) (if fork (progn (progn (setq default (copy-sequence default)) (setq default (plist-put default :fork fork))) (if (listp fork) nil (setq fork 'nil)) (progn (setq fork (copy-sequence fork)) (setq fork (plist-put fork :repo (straight-vc-git--fork-repo default)))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :fork fork)))) nil)) (let ((--dolist-tail-- keywords)) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (if (plist-member plist keyword) nil (let* ((value (and t (plist-get default keyword)))) (if value (setq plist (plist-put plist keyword value)) nil))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist))))
(or (and (symbolp melpa-style-recipe) (gethash (symbol-name melpa-style-recipe) straight--recipe-cache)) (let* ((recipe-specified-p (listp melpa-style-recipe)) (full-melpa-style-recipe (if recipe-specified-p melpa-style-recipe (or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories)))))) (if (straight--quoted-form-p full-melpa-style-recipe) (progn (setq full-melpa-style-recipe (eval full-melpa-style-recipe)))) (let* ((plist full-melpa-style-recipe) (package (if plist (car-safe (prog1 plist (setq plist (cdr plist)))) (signal 'wrong-number-of-arguments (list nil (length plist)))))) (progn (if straight-allow-recipe-inheritance (progn (let* ((sources (plist-get plist :source)) (default (or (let* ((retrieved (and t (straight-recipes-retrieve package (if (listp sources) sources (list sources)))))) (if retrieved (cdr (if (straight--quoted-form-p retrieved) (eval retrieved) retrieved)) nil)) plist)) (type (or (plist-get default :type) 'git)) (keywords (append (remq :local-repo straight--build-keywords) (if (eq type 'built-in) nil (straight-vc-keywords type))))) (let* ((fork (and t (plist-get plist :fork)))) (if fork (progn (progn (setq default (copy-sequence default)) (setq default (plist-put default :fork fork))) (if (listp fork) nil (setq fork 'nil)) (progn (setq fork (copy-sequence fork)) (setq fork (plist-put fork :repo (straight-vc-git--fork-repo default)))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :fork fork)))) nil)) (let ((--dolist-tail-- keywords)) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (if (plist-member plist keyword) nil (let* ((value (and t (plist-get default keyword)))) (if value (setq plist (plist-put plist keyword value)) nil))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist)))))
(catch '--cl-block-straight--convert-recipe-- (if (memq melpa-style-recipe straight-built-in-pseudo-packages) (progn (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))))) (or (and (symbolp melpa-style-recipe) (gethash (symbol-name melpa-style-recipe) straight--recipe-cache)) (let* ((recipe-specified-p (listp melpa-style-recipe)) (full-melpa-style-recipe (if recipe-specified-p melpa-style-recipe (or (straight-recipes-retrieve melpa-style-recipe nil cause) (if (straight--package-built-in-p melpa-style-recipe) (throw '--cl-block-straight--convert-recipe-- (list ':type 'built-in ':package (symbol-name melpa-style-recipe))) (error (concat "Could not find package %S " "in recipe repositories: %S") melpa-style-recipe straight-recipe-repositories)))))) (if (straight--quoted-form-p full-melpa-style-recipe) (progn (setq full-melpa-style-recipe (eval full-melpa-style-recipe)))) (let* ((plist full-melpa-style-recipe) (package (if plist (car-safe (prog1 plist (setq plist (cdr plist)))) (signal 'wrong-number-of-arguments (list nil (length plist)))))) (progn (if straight-allow-recipe-inheritance (progn (let* ((sources (plist-get plist :source)) (default (or (let* ((retrieved (and t (straight-recipes-retrieve package (if (listp sources) sources (list sources)))))) (if retrieved (cdr (if (straight--quoted-form-p retrieved) (eval retrieved) retrieved)) nil)) plist)) (type (or (plist-get default :type) 'git)) (keywords (append (remq :local-repo straight--build-keywords) (if (eq type 'built-in) nil (straight-vc-keywords type))))) (let* ((fork (and t (plist-get plist :fork)))) (if fork (progn (progn (setq default (copy-sequence default)) (setq default (plist-put default :fork fork))) (if (listp fork) nil (setq fork 'nil)) (progn (setq fork (copy-sequence fork)) (setq fork (plist-put fork :repo (straight-vc-git--fork-repo default)))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :fork fork)))) nil)) (let ((--dolist-tail-- keywords)) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (if (plist-member plist keyword) nil (let* ((value (and t (plist-get default keyword)))) (if value (setq plist (plist-put plist keyword value)) nil))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) (let ((package (symbol-name package))) (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :package package))) (if (plist-member plist :type) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :type straight-default-vc)))) (if (or (plist-member plist :local-repo) (eq (plist-get plist :type) 'built-in)) nil (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist :local-repo (or (straight-vc-local-repo-name plist) package))))) (if recipe-specified-p nil (let* ((--cl-rest-- plist) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo))))) (let* ((original-recipe (and t (gethash local-repo straight--repo-cache)))) (if original-recipe (progn (let ((props (cons :type (straight-vc-keywords (plist-get plist :type))))) (setq plist (let* ((--cl-var-- plist) (prop nil) (val nil) (--cl-var--) (--cl-var-- nil)) (while (consp --cl-var--) (setq --cl-var-- --cl-var-- prop (car-safe (prog1 --cl-var-- (setq --cl-var-- (cdr --cl-var--)))) val (car --cl-var--)) (if (memq prop props) (progn) (setq --cl-var-- (cons prop --cl-var--)) (setq --cl-var-- (cons val --cl-var--))) (setq --cl-var-- (cdr (cdr --cl-var--)))) (nreverse --cl-var--)))) (let ((--dolist-tail-- (cons :type (straight-vc-keywords (plist-get original-recipe :type))))) (while --dolist-tail-- (let ((keyword (car --dolist-tail--))) (let* ((value (and t (plist-get original-recipe keyword)))) (if value (progn (setq plist (copy-sequence plist)) (setq plist (plist-put plist keyword value))) nil)) (setq --dolist-tail-- (cdr --dolist-tail--)))))) nil)))) plist))))))
(straight--convert-recipe (agda-input :branch "release-2.6.1.2") " ")
(let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (plist-get recipe :no-build) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t))))))
(catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (plist-get recipe :no-build) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))
((closure (straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-deny-list t) (melpa-style-recipe &optional no-clone no-build cause interactive) "Register, clone, build, and activate a package and its dependencies.\nThis is the main entry point to the functionality of straight.el.\n\nMELPA-STYLE-RECIPE is either a symbol naming a package, or a list\nwhose car is a symbol naming a package and whose cdr is a\nproperty list containing e.g. `:type', `:local-repo', `:files',\nand VC backend specific keywords.\n\nFirst, the package recipe is registered with straight.el. If\nNO-CLONE is a function, then it is called with two arguments: the\npackage name as a string, and a boolean value indicating whether\nthe local repository for the package is available. In that case,\nthe return value of the function is used as the value of NO-CLONE\ninstead. In any case, if NO-CLONE is non-nil, then processing\nstops here.\n\nOtherwise, the repository is cloned, if it is missing. If\nNO-BUILD is a function, then it is called with one argument: the\npackage name as a string. In that case, the return value of the\nfunction is used as the value of NO-BUILD instead. In any case,\nif NO-BUILD is non-nil, then processing halts here. Otherwise,\nthe package is built and activated. Note that if the package\nrecipe has a non-nil `:no-build' entry, then NO-BUILD is ignored\nand processing always stops before building and activation\noccurs.\n\nCAUSE is a string explaining the reason why\n`straight-use-package' has been called. It is for internal use\nonly, and is used to construct progress messages. INTERACTIVE is\nnon-nil if the function has been called interactively. It is for\ninternal use only, and is used to determine whether to show a\nhint about how to install the package permanently.\n\nReturn non-nil if package was actually installed, and nil\notherwise (this can only happen if NO-CLONE is non-nil)." (interactive (list (straight-get-recipe (if current-prefix-arg (progn 'interactive))) nil nil nil 'interactive)) (catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (plist-get recipe :no-build) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))) agda-input no-clone nil " " nil)
(apply (closure (straight-symlink-emulation-mode straight--profile-cache use-package-pre-ensure-function use-package-keywords use-package-ensure-function use-package-defaults package-selected-packages package--builtins comp-deferred-compilation-deny-list t) (melpa-style-recipe &optional no-clone no-build cause interactive) "Register, clone, build, and activate a package and its dependencies.\nThis is the main entry point to the functionality of straight.el.\n\nMELPA-STYLE-RECIPE is either a symbol naming a package, or a list\nwhose car is a symbol naming a package and whose cdr is a\nproperty list containing e.g. `:type', `:local-repo', `:files',\nand VC backend specific keywords.\n\nFirst, the package recipe is registered with straight.el. If\nNO-CLONE is a function, then it is called with two arguments: the\npackage name as a string, and a boolean value indicating whether\nthe local repository for the package is available. In that case,\nthe return value of the function is used as the value of NO-CLONE\ninstead. In any case, if NO-CLONE is non-nil, then processing\nstops here.\n\nOtherwise, the repository is cloned, if it is missing. If\nNO-BUILD is a function, then it is called with one argument: the\npackage name as a string. In that case, the return value of the\nfunction is used as the value of NO-BUILD instead. In any case,\nif NO-BUILD is non-nil, then processing halts here. Otherwise,\nthe package is built and activated. Note that if the package\nrecipe has a non-nil `:no-build' entry, then NO-BUILD is ignored\nand processing always stops before building and activation\noccurs.\n\nCAUSE is a string explaining the reason why\n`straight-use-package' has been called. It is for internal use\nonly, and is used to construct progress messages. INTERACTIVE is\nnon-nil if the function has been called interactively. It is for\ninternal use only, and is used to determine whether to show a\nhint about how to install the package permanently.\n\nReturn non-nil if package was actually installed, and nil\notherwise (this can only happen if NO-CLONE is non-nil)." (interactive (list (straight-get-recipe (if current-prefix-arg (progn 'interactive))) nil nil nil 'interactive)) (catch '--cl-block-straight-use-package-- (let ((recipe (straight--convert-recipe (or (straight--get-overridden-recipe (if (listp melpa-style-recipe) (car melpa-style-recipe) melpa-style-recipe)) melpa-style-recipe) cause))) (straight--register-recipe recipe) (let* ((--cl-rest-- recipe) (package (car (cdr (plist-member --cl-rest-- ':package)))) (local-repo (car (cdr (plist-member --cl-rest-- ':local-repo)))) (type (car (cdr (plist-member --cl-rest-- ':type))))) (progn (if (eq type 'built-in) (progn (throw '--cl-block-straight-use-package-- t))) (straight--transaction-exec (intern (format "use-package-%S-%S-%S" recipe (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (random) no-clone) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (random) no-build))) :now #'(lambda nil (let ((already-registered (gethash package straight--success-cache)) (available (or (null local-repo) (straight--repository-is-available-p recipe)))) (if (if (let ((object no-clone)) (and (not (memq object '(no-clone t))) (functionp object))) (funcall no-clone package available) no-clone) (progn (throw '--cl-block-straight-use-package-- nil))) (if available nil (straight--clone-repository recipe cause)) (straight--make-build-cache-available) (let* ((no-build (or (null local-repo) (plist-get recipe :no-build) (if (let ((object no-build)) (and (not (memq object '(no-build t))) (functionp object))) (funcall no-build package) no-build))) (modified (or (and straight--packages-to-rebuild (or (eq straight--packages-to-rebuild :all) (gethash package straight--packages-to-rebuild)) (not (gethash package straight--packages-not-to-rebuild)) (puthash package t straight--packages-not-to-rebuild)) (straight--package-might-be-modified-p recipe no-build)))) (let ((func (intern (format "straight-recipes-%s-version" package))) (table (gethash (intern package) straight--recipe-lookup-cache))) (if (or modified (not (fboundp func)) (not (equal (and table (gethash 'version table)) (funcall func)))) (progn (remhash (intern package) straight--recipe-lookup-cache)))) (if no-build nil (straight--add-package-to-load-path recipe)) (run-hook-with-args 'straight-use-package-prepare-functions package) (if (and modified (not no-build)) (progn (run-hook-with-args 'straight-use-package-pre-build-functions package) (straight--build-package recipe cause))) (straight--declare-successful-build recipe) (if no-build nil (let ((--dolist-tail-- (straight--get-dependencies package))) (while --dolist-tail-- (let ((dependency (car --dolist-tail--))) (straight-use-package (intern dependency) nil nil cause) (setq --dolist-tail-- (cdr --dolist-tail--))))) (straight--add-package-to-info-path recipe) (straight--activate-package-autoloads recipe)) (if (and interactive (not already-registered)) (progn (straight--output (concat "If you want to keep %s, put " "(straight-use-package %s%S) " "in your init-file.") package "'" (intern package))))) (puthash package t straight--success-cache) t)))))))) (agda-input no-clone nil " " nil))
(straight-use-package agda-input no-clone)
(straight-register-package agda-input)
(let ((package (car --dolist-tail--))) (straight-register-package package) (let ((name (symbol-name package))) (add-to-list 'load-path (directory-file-name (straight--build-dir name))) (straight--load-package-autoloads name)) (setq --dolist-tail-- (cdr --dolist-tail--)))
(while --dolist-tail-- (let ((package (car --dolist-tail--))) (straight-register-package package) (let ((name (symbol-name package))) (add-to-list 'load-path (directory-file-name (straight--build-dir name))) (straight--load-package-autoloads name)) (setq --dolist-tail-- (cdr --dolist-tail--))))
(let ((--dolist-tail-- (cl-delete-duplicates packages :test #'equal))) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (straight-register-package package) (let ((name (symbol-name package))) (add-to-list 'load-path (directory-file-name (straight--build-dir name))) (straight--load-package-autoloads name)) (setq --dolist-tail-- (cdr --dolist-tail--)))))
(let (packages) (let ((--dolist-tail-- doom-packages)) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (setq packages (append packages (cons name (straight--get-dependencies name))))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (let ((--dolist-tail-- (cl-delete-duplicates packages :test #'equal))) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (straight-register-package package) (let ((name (symbol-name package))) (add-to-list 'load-path (directory-file-name (straight--build-dir name))) (straight--load-package-autoloads name)) (setq --dolist-tail-- (cdr --dolist-tail--))))))
(progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing straight.el" 0 5 (face font-lock-comment-face)))))) (setq doom-disabled-packages nil doom-packages (doom-package-list)) (let (packages) (let ((--dolist-tail-- doom-packages)) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (setq packages (append packages (cons name (straight--get-dependencies name))))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (let ((--dolist-tail-- (cl-delete-duplicates packages :test #'equal))) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (straight-register-package package) (let ((name (symbol-name package))) (add-to-list 'load-path (directory-file-name (straight--build-dir name))) (straight--load-package-autoloads name)) (setq --dolist-tail-- (cdr --dolist-tail--)))))))
(if (or force-p (null doom-packages)) (progn (if doom-debug-p (progn (let ((inhibit-message (active-minibuffer-window))) (message #("DOOM Initializing straight.el" 0 5 (face font-lock-comment-face)))))) (setq doom-disabled-packages nil doom-packages (doom-package-list)) (let (packages) (let ((--dolist-tail-- doom-packages)) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (let* ((--cl-rest-- package) (name (if --cl-rest-- (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--))))) (recipe (car (cdr (plist-member --cl-rest-- ':recipe)))) (disable (car (cdr (plist-member --cl-rest-- ':disable)))) (ignore (car (cdr (plist-member --cl-rest-- ':ignore)))) (shadow (car (cdr (plist-member --cl-rest-- ':shadow))))) (if ignore nil (if disable (let* ((var name)) (if (memql var doom-disabled-packages) (with-no-warnings doom-disabled-packages) (setq doom-disabled-packages (cons var doom-disabled-packages)))) (if shadow (progn (straight-override-recipe (cons shadow '(:local-repo nil))) (let ((site-load-path (copy-sequence doom--initial-load-path)) lib) (while (setq lib (locate-library (concat (symbol-name shadow) ".el") nil site-load-path)) (let ((lib (directory-file-name (file-name-directory lib)))) (setq site-load-path (delete lib site-load-path) load-path (delete lib load-path))))))) (if recipe (progn (straight-override-recipe (cons name recipe)))) (setq packages (append packages (cons name (straight--get-dependencies name))))))) (setq --dolist-tail-- (cdr --dolist-tail--))))) (let ((--dolist-tail-- (cl-delete-duplicates packages :test #'equal))) (while --dolist-tail-- (let ((package (car --dolist-tail--))) (straight-register-package package) (let ((name (symbol-name package))) (add-to-list 'load-path (directory-file-name (straight--build-dir name))) (straight--load-package-autoloads name)) (setq --dolist-tail-- (cdr --dolist-tail--))))))))
(doom-initialize-packages)
(doom-cli-packages-install)
(let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t)
(unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h))
(let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))
((closure ((plist) (aliases s) (name . sync) t) (--alist--) (ignore --alist--) (let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))) ((update-p . "-u")))
(funcall (closure ((plist) (aliases s) (name . sync) t) (--alist--) (ignore --alist--) (let ((no-envvar-p (cdr (assq 'no-envvar-p --alist--))) (no-elc-p (cdr (assq 'no-elc-p --alist--))) (update-p (cdr (assq 'update-p --alist--))) (purge-p (cdr (assq 'purge-p --alist--)))) (run-hooks 'doom-sync-pre-hook) (add-hook 'kill-emacs-hook #'doom--cli-abort-warning-h) (doom--print (doom--format (format (doom--output-class 'start "Synchronizing your config with Doom Emacs...")))) (unwind-protect (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (delete-file doom-autoloads-file) (if (and (not no-envvar-p) (file-exists-p doom-env-file)) (progn (doom-cli-reload-env-file 'force))) (doom-cli-packages-install) (doom-cli-packages-build) (if update-p (progn (doom-cli-packages-update))) (doom-cli-packages-purge purge-p 'builds-p purge-p purge-p) (run-hooks 'doom-sync-post-hook) (if (doom-autoloads-reload) (progn (doom--print (doom--format (format (doom--output-class 'info "Restart Emacs or use 'M-x doom/reload' for changes to take effect")))))) t) (remove-hook 'kill-emacs-hook #'doom--cli-abort-warning-h)))) ((update-p . "-u")))
(if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command))
(let* ((cli (and t (doom-cli-get command)))) (if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command)))
(doom-cli-execute "sync" "-u")
(cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u")))
(let ((doom-auto-discard force-p)) (cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u"))))
(let ((force-p (cdr (assq 'force-p --alist--))) (packages-only-p (cdr (assq 'packages-only-p --alist--)))) :bare t (let ((doom-auto-discard force-p)) (cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u")))))
((closure ((plist :bare t) (aliases up) (name . upgrade) t) (--alist--) (ignore --alist--) (let ((force-p (cdr (assq 'force-p --alist--))) (packages-only-p (cdr (assq 'packages-only-p --alist--)))) :bare t (let ((doom-auto-discard force-p)) (cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u")))))) nil)
(funcall (closure ((plist :bare t) (aliases up) (name . upgrade) t) (--alist--) (ignore --alist--) (let ((force-p (cdr (assq 'force-p --alist--))) (packages-only-p (cdr (assq 'packages-only-p --alist--)))) :bare t (let ((doom-auto-discard force-p)) (cond (packages-only-p (doom-cli-execute "sync" "-u") (doom--print (doom--format (format (doom--output-class 'success "Finished upgrading Doom Emacs"))))) ((doom-cli-upgrade doom-auto-accept doom-auto-discard) (doom--print (doom--format (format (doom--output-class 'info "Reloading Doom Emacs")))) (throw 'exit (list "doom" "upgrade" "-p" (if force-p "-f")))) ((doom--print (doom--format (format "Doom is up-to-date!"))) (doom-cli-execute "sync" "-u")))))) nil)
(if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command))
(let* ((cli (and t (doom-cli-get command)))) (if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command)))
(doom-cli-execute "upgrade")
(apply doom-cli-execute "upgrade" nil)
(if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))
(let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time))))))))
(if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))
(catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time))))))))))
(unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))
(progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer))))
(unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))
(let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old)))
(let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))
(let* ((log-buffer (generate-new-buffer " *doom log*")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old)))))
(condition-case e (let* ((log-buffer (generate-new-buffer " *doom log*")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\\(.+\\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list nil (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1))
(let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " *doom log*")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\\(.+\\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list nil (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))
((closure ((plist) (aliases) (name . :doom) cl-struct-doom-cli-option-tags cl-struct-doom-cli-tags t) (--alist--) (ignore --alist--) (let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " *doom log*")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\\(.+\\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list nil (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))) ((command . "upgrade")))
(funcall (closure ((plist) (aliases) (name . :doom) cl-struct-doom-cli-option-tags cl-struct-doom-cli-tags t) (--alist--) (ignore --alist--) (let ((help-p (cdr (assq 'help-p --alist--))) (auto-accept-p (cdr (assq 'auto-accept-p --alist--))) (debug-p (cdr (assq 'debug-p --alist--))) (doomdir (cdr (assq 'doomdir --alist--))) (localdir (cdr (assq 'localdir --alist--))) (command (cdr (assq 'command --alist--))) (args (cdr (assq 'args --alist--)))) (condition-case e (let* ((log-buffer (generate-new-buffer " *doom log*")) (standard-output #'(lambda (out) (save-current-buffer (set-buffer log-buffer) (insert-char out)) (send-string-to-terminal (char-to-string out))))) (let ((message (symbol-function #'message))) (let* ((vnew #'(lambda (msg &rest args) (save-current-buffer (set-buffer log-buffer) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (insert (doom--format (apply #'format msg args)) "\n"))) (if doom-debug-p (doom--print (doom--format (apply #'format msg args))) (apply message msg args)))) (old (symbol-function #'message))) (unwind-protect (progn (fset #'message vnew) (ignore message) (unwind-protect (catch 'exit (if (and (not (getenv "__DOOMRESTART")) (or doomdir localdir debug-p auto-accept-p)) (progn (if doomdir (progn (setenv "DOOMDIR" (file-name-as-directory doomdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMDIR=%s") localdir))))) (if localdir (progn (setenv "DOOMLOCALDIR" (file-name-as-directory localdir)) (doom--print (doom--format (format (doom--output-class 'info "DOOMLOCALDIR=%s") localdir))))) (if debug-p (progn (setenv "DEBUG" "1") (doom--print (doom--format (format (doom--output-class 'info "DEBUG=1")))))) (if auto-accept-p (progn (setenv "YES" auto-accept-p) (doom--print (doom--format (format (doom--output-class 'info "Confirmations auto-accept enabled")))))) (throw 'exit "__DOOMRESTART=1 $@"))) (delete-file doom-cli-log-file) (delete-file doom-cli-log-error-file) (if help-p (progn (if command (progn (setq args (cons command args)))) (setq command "help"))) (if (null command) (doom-cli-execute "help") (let ((start-time (current-time))) (run-hooks 'doom-cli-pre-hook) (if (apply #'doom-cli-execute command args) (progn (run-hooks 'doom-cli-post-hook) (doom--print (doom--format (format (doom--output-class 'success "Finished in %.4fs") (float-time (time-subtract (current-time) start-time)))))))))) (save-current-buffer (set-buffer log-buffer) (require 'ansi-color) (ansi-color-filter-region (point-min) (point-max))) (let ((dest doom-cli-log-file)) (cond ((bufferp dest) (save-current-buffer (set-buffer dest) (insert-buffer-substring log-buffer))) ((stringp dest) (make-directory (file-name-directory dest) 'parents) (let ((temp-file dest) (temp-buffer (get-buffer-create (generate-new-buffer-name " *temp file*")))) (unwind-protect (prog1 (save-current-buffer (set-buffer temp-buffer) (insert-buffer-substring log-buffer)) (save-current-buffer (set-buffer temp-buffer) (write-region nil nil temp-file nil 0))) (and (buffer-name temp-buffer) (kill-buffer temp-buffer)))))) (kill-buffer log-buffer)))) (fset #'message old))))) (doom-cli-command-not-found-error (doom--print (doom--format (format (doom--output-class 'error "Command 'doom %s' not recognized") (string-join (cdr e) " ")))) (doom--print (doom--format (format "\nDid you mean one of these commands?"))) (apply #'doom-cli-execute "help" "--similar" (string-join (cdr e) " ")) 2) (doom-cli-wrong-number-of-arguments-error (let* ((--cl-rest-- (cdr e)) (route (if (= (length --cl-rest--) 5) (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--)))) (signal 'wrong-number-of-arguments (list nil (length --cl-rest--))))) (opt (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (arg (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (n (car-safe (prog1 --cl-rest-- (setq --cl-rest-- (cdr --cl-rest--))))) (d (car --cl-rest--))) (progn (doom--print (doom--format (format (doom--output-class 'error "doom %s: %S requires %d arguments, but %d given\n") (mapconcat #'symbol-name route " ") arg n d))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (apply #'doom-cli-execute "help" (mapcar #'symbol-name route))))) 3) (doom-cli-unrecognized-option-error (let ((option (car (cdr e)))) (doom--print (doom--format (format (doom--output-class 'error "Unrecognized option: %S") option))) (if (string-match "^--[^=]+=\\(.+\\)$" option) (progn (doom--print (doom--format (format "The %S syntax isn't supported. Use '%s %s' instead." option (car (split-string option "=")) (match-string 1 option))))))) 4) (doom-cli-deprecated-error (let* ((commands (cdr e)) (route (if commands (car-safe (prog1 commands (setq commands (cdr commands)))) (signal 'wrong-number-of-arguments (list nil (length commands)))))) (progn (doom--print (doom--format (format (doom--output-class 'warn "The 'doom %s' command was removed and replaced with:\n") (mapconcat #'symbol-name route " ")))) (let ((doom-output-indent (+ doom-output-indent-increment doom-output-indent))) (let ((--dolist-tail-- commands)) (while --dolist-tail-- (let ((command (car --dolist-tail--))) (doom--print (doom--format (format (doom--output-class 'info "%s") command))) (setq --dolist-tail-- (cdr --dolist-tail--)))))))) 5) (user-error (doom--print (doom--format (format (doom--output-class 'warn "%s") (car (cdr e))))) 1)))) ((command . "upgrade")))
(if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command))
(let* ((cli (and t (doom-cli-get command)))) (if cli (funcall (progn (or (and (memq (type-of cli) cl-struct-doom-cli-tags) t) (signal 'wrong-type-argument (list 'doom-cli cli))) (aref cli 7)) (doom--cli-process cli (remq nil args))) (user-error "Couldn't find any %S command" command)))
(doom-cli-execute :doom "upgrade")
</pre></details>
**Steps to reproduce:**
1. specify a `:branch` for package `agda`
2. run `doom upgrade` or `doom sync -u`
**System information:**
<details><pre>
SYSTEM type darwin
config x86_64-apple-darwin19.5.0
shell /usr/local/bin/fish
uname Darwin 19.6.0 Darwin Kernel Version 19.6.0: Thu Oct 29 22:56:45 PDT 2020; root:xnu-6153.141.2.2~1/RELEASE_X86_64 x86_64
path (~/.cabal/bin ~/.ghcup/bin ~/.nix-profile/bin ~/.pyenv/shims .emacs.d/bin/ /usr/local/sbin ~/.cargo/bin/ ~/dotfiles/scripts/ /usr/local/bin /usr/bin /bin /usr/sbin /sbin /opt/X11/bin /Library/Frameworks/Mono.framework/Versions/Current/Commands /Library/TeX/texbin ~/.cabal/bin ~/.ghcup/bin ~/.nix-profile/bin ~/.pyenv/shims /usr/local/Cellar/emacs-plus@26/26.3/libexec/emacs/26.3/x86_64-apple-darwin19.5.0)
EMACS dir ~/.emacs.d/
version 26.3
build Jul 15, 2020
buildopts --disable-dependency-tracking --disable-silent-rules --enable-locallisppath=/usr/local/share/emacs/site-lisp --infodir=/usr/local/Cellar/emacs-plus@26/26.3/share/info/emacs --prefix=/usr/local/Cellar/emacs-plus@26/26.3 --with-xml2 --with-gnutls --with-imagemagick --with-modules --with-rsvg --with-ns --disable-ns-self-contained
features JPEG RSVG IMAGEMAGICK GLIB NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS NS MODULES THREADS LCMS2
traits (batch server-running envvar-file)
DOOM dir ~/.config/doom/
version 2.0.9
build HEAD -> develop, origin/develop, origin/HEAD 0c9256411 2020-12-15 04:14:40 -0500
elc-files 0
modules (:completion company ivy :ui doom doom-quit fill-column hl-todo minimap modeline nav-flash ophints (popup +defaults) treemacs unicode vc-gutter vi-tilde-fringe workspaces :editor (evil +everywhere) file-templates fold snippets word-wrap :emacs dired electric undo vc :term eshell :checkers syntax :tools (eval +overlay) lookup lsp magit make pass pdf :lang agda common-lisp data emacs-lisp (haskell +lsp) json latex markdown org (python +pyenv) rust scheme sh web yaml :app irc (rss +org) :config literate (default +bindings +smartparens))
packages ((agda-input :recipe (:branch release-2.6.1.2) :pin nil) (agda2-mode :recipe (:branch release-2.6.1.2) :pin nil) (golden-ratio :recipe (:host github :repo roman/golden-ratio.el)) (j-mode) (ob-rust) (ob-sagemath))
unpin (n/a)
elpa (n/a)
</pre></details>
1 Like
This worked fine for me to switch to the “v2” branch:
(package! org-roam
:recipe (:host github :repo "org-roam/org-roam" :branch "v2"))
If the branch is not picked up automatically by Doom when switching from another branch, one can always purge the repo from $DOOM/.local/straight/repos
.
1 Like
bruce
March 24, 2021, 9:16pm
121
Thanks for the tip!
By “purge” do you mean rm -rf ...
?
EDIT - it actually installed fine this time; no need to purge.
I think maybe we need a wiki page for people happy to test, like me.
I commented out the roam feature, and added jethro’s config to mine, and adjusted the path, then synced the db; also ran the setup command.
It can’t find any nodes though, nor will the buffer work (says no node at point).
Do I need to do something to update the files?
nobiot
March 24, 2021, 10:09pm
122
Are you using org-id to assign an ID to either file-level property drawer, or headings? No node probably means the IDs are not correctly recognized for files and/or headings.
Ensure to have a title to a file via #+title
keyword (I have been sending issues in Jethro’s way related to my missing titles). I don’t use headings much, but they should not suffer from missing “title”.
Once you assign an ID to a file/heading, and save, org-roam-db-sync
may or may not run automatically. I think it should run automatically via after-save-hook
, but it hasn’t been consistent for me (Windows may suffer from some emacsql
related quirks).
Once node IDs are stored in the db, you should be able to see list of the nodes via org-roam-node-find
(not -files
any longer).
To open the backlinks buffer (no longer a side-buffer by default), run org-roam-buffer
(on an ID’ed headline or ID’ed file). To get it to work, some config is required for the “sections” to appear — as you have copied Jethro’s config, I’d assume you have seen it.
This should do it for now. I have tested these features in my test Ubuntu VM; now trying the same settings with my real notes on Windows, reporting issues along the way. I have managed to identify some problems with missing titles to display the backlinks buffer just today.
1 Like
bruce
March 24, 2021, 10:16pm
123
Thanks much for the thorough reply!
Not AFAIK. I was using whatever standard v1 org-roam approach to creating the files.
EDIT - yeah, adding org-ids does solve that. But I have to do it for the file too.
All my files have those titles, so at least those should be picked up; right?
nobiot
March 24, 2021, 10:20pm
124
@jethro , some additional feedback before I forget (let me know if you prefer a larger chunks, rather than quick many waves).
I notices two things around completion in minibuffer via org-roam-node-find
.
Tags are now based on Org Mode tags (#filetags
and heading :tag:
). This is interesting, but for me using sub-directory as a tag has been a good way. (I don’t use Org Mode tags). Not necessarily asking for change, but perhaps you could consider a way for custmization like V1? At the moment, caching tags in DB is buried in a function so need to advise the entire function for this feature (if I understand Elisp correctly).
Tags are now added to the minibuffer text string as completion-annotation. I have noticed that you cannot use it to filter in minibuffer. Perhaps your intention is to enhance the sql query to be able to filter in a different way. My first gut response was “inconvenience” — since I use sub folders as tags to differentiate work vs personal, and use minibuffer to filter when I want to focus on one or the other. Again, not necessarily asking for change; this is pure first impression I got from the UX change.
nobiot
March 24, 2021, 10:24pm
125
Yes, the #+titles get picked by db-sync (which is also called in org-roam-setup). I am now away from PC and cannot give you more, but files
is a table in the cache, so you can inspect if all your files have been added to the cache.
Existence of fiels in db is not sufficient for “nodes” to appear in the node-find (sorry in my previous post, the name of the function might have been incorrect). You need “nodes” (separate table) — only “ID”ed files and headings get recognized and put into the nodes table — as far as I have seen so far.
@jethro will correct me if I am gravely mistaken
bruce
March 24, 2021, 10:30pm
126
@jethro - you’re using selectrum at al; right?
Would be really cool for node-find to exploit affixation and consult-buffer
-like grouping.
I’m not sure how the latter works (probably via the metadata category of the candidate, I’d guess), but it should be trivial, and would make it easier to segment files from sub-file nodes when browsing.
I thought I saw on the marginalia tracker that you added an annotation function and category, but I’m only see the node titles.