el-get icon indicating copy to clipboard operation
el-get copied to clipboard

el-get-bundle silently ignores :after argument

Open EDmitry opened this issue 9 years ago • 6 comments

I am trying:

(el-get-bundle evil :after (evil-mode))

This is supposed to be working, right? Or am I missing anything? Evil-mode initializes correctly but doesn't run the command.

EDmitry avatar Apr 01 '15 21:04 EDmitry

It seems for the el-get-bundle macro you are supposed to leave out the :after, it's handled automatically.

(el-get-bundle evil :after (evil-mode)) ;; -> (el-get-bundle-el-get '(:name evil :after nil))
(el-get-bundle evil (evil-mode)) ;; -> (el-get-bundle-el-get '(:name evil :after ((evil-mode))))
;; where -> means "macroexpands to"

@tarao: el-get-bundle shouldn't silently drop the :after argument, either both the above forms should do the same, or the first should at least trigger a warning.

npostavs avatar Apr 01 '15 21:04 npostavs

Thanks for a workaround!

Should the following work as well?: (el-get-bundle evil (evil-mode) :after (set evil-want-C-u-scroll t)) ?

I am basically trying to replace my use-package usage with el-get. Is this the right way to do it in general?

EDmitry avatar Apr 01 '15 22:04 EDmitry

That macroexpands to

(el-get-bundle-el-get
 '(:name evil :after
         ((evil-mode)
          :after
          (set evil-want-C-u-scroll t))))

which seems unlikely to work right. I think you want

(el-get-bundle evil
  (evil-mode)
  (setq evil-want-C-u-scroll t)) ; setq, not set

There are some examples in the chapter 6.4 of the manual.

npostavs avatar Apr 02 '15 00:04 npostavs

OK, I will fix it not to drop the :after argument.

tarao avatar Apr 02 '15 01:04 tarao

In my case I have to set an option before the require, the following works:

(el-get-bundle-el-get
 '(:name
   evil
   :after
   ((evil-mode t)) ;; why does this need nested parens?
   :before
   (setq evil-want-C-u-scroll t)))

Am I doing something wrong by using it this way? I am just trying to use el-get in use-package fashion. I need the functionality of use-package while being able to specify sources for my packages and get them loaded automatically. I could find any el-get-bundle-el-get mentions in the documentation.

EDmitry avatar Apr 02 '15 01:04 EDmitry

el-get-bundle-el-get is an internal function, so the interface isn't really meant for humans, try

(el-get-bundle evil
  :before (setq evil-want-C-u-scroll t)
  (evil-mode))

Basically, you have an implicit :after added for the keywordless ending forms. Maybe the docs could be improved to explain that better.

npostavs avatar Apr 02 '15 01:04 npostavs