Closed hans-d closed 2 years ago
https://github.com/radian-software/straight.el/tree/develop#what-does-it-mean-to-load-a-package
https://github.com/radian-software/straight.el/tree/develop#what-happens-when-i-call-straight-use-package
although the word load is used, straight.el
does not require the package, which means that straight-use-package
does not load the files of the package.
I think use-package
use the word load to mean requiring, because that is what it's for.
In fact use-package
does the same thing as leaf
.
(use-package p1
:straight t
:after p2)
(progn
(straight-use-package 'p1)
(defvar use-package--warning145
#'(lambda
(keyword err)
(let
((msg
(format "%s/%s: %s" 'p1 keyword
(error-message-string err))))
(display-warning 'use-package msg :error))))
(condition-case-unless-debug err
(eval-after-load 'p2
'(let
((now
(current-time)))
(message "%s..." "Loading package p1")
(prog1
(if
(not
(require 'p1 nil t))
(display-warning 'use-package
(format "Cannot load %s" 'p1)
:error))
(let
((elapsed
(float-time
(time-subtract
(current-time)
now))))
(if
(> elapsed 0.1)
(message "%s...done (%.3fs)" "Loading package p1" elapsed)
(message "%s...done" "Loading package p1"))))))
(error
(funcall use-package--warning145 :catch err))))
so everything is ok here, i don't think there's somthing leaf
should do.
Thanks @Hxppdv.
@hans-d, I cannot understand the issue, closing for now, but please re-open if you have any questions.
Description
I'm using
leaf
together withstraight
. The combination:ensure
and:after
is somehow not working ok-ish, or I'm missing how I should do it.If have
p1
beforep2
in theinit.el
(generated out of a.org
) and was expecting this is how I could control load order.example 1
Issue leaf-block
macroexpand-1
leaf-blockExpected leaf-block
example 2
Issue leaf-block
macroexpand-1
leaf-blockExpected leaf-block
using straight on ensure