Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it supposed to require backwards? #2256

Closed
lethjakman opened this issue Oct 9, 2015 · 3 comments
Closed

Is it supposed to require backwards? #2256

lethjakman opened this issue Oct 9, 2015 · 3 comments
Labels

Comments

@lethjakman
Copy link

I was having issues with my shell not including hg which is a requirement for some of the packages I wanted to install (evil). I think it's because I use zsh instead of bash and all of my pathing isn't in the normal bashrc because of that. The way I had to resolve this was by using exec-path-from-shell. I originally attempted to get it working like this

(setq
 el-get-sources '(
   (:name exec-path-from-shell
      :after (progn
             (when (memq window-system '(mac ns))
               (exec-path-from-shell-initialize))
        (message "hello")
   ))
   (:name ace-jump-mode)
   (:name evil
      :after (progn
           (setq evil-want-C-u-scroll t) ; must appear before require 'evil
           (modify-syntax-entry ?_ "w") ; Make _ a part of the search word
           (evil-set-initial-state 'git-commit-mode 'insert)
           (evil-mode 1)
           )
  )
   )
 )

This however changed nothing. In order to get this package working I had to move the exec-path-from-shell to the end of the script like so:

(setq
 el-get-sources '(
   (:name ace-jump-mode)
   (:name evil
      :after (progn
           (setq evil-want-C-u-scroll t) ; must appear before require 'evil
           (modify-syntax-entry ?_ "w") ; Make _ a part of the search word
           (evil-set-initial-state 'git-commit-mode 'insert)
           (evil-mode 1)
           )
   )
   (:name exec-path-from-shell
      :after (progn
             (when (memq window-system '(mac ns))
               (exec-path-from-shell-initialize))
        (message "hello")
   ))
   )
 )

Is this intenttional for some reason? Also, is there a better way to do this to make sure requirements get executed first?

@npostavs
Copy link
Collaborator

npostavs commented Oct 9, 2015

The order of el-get-sources doesn't determine anything by itself. El-get has :depends but that is for runtime dependency, and what you're talking about is install/build time.

If you're doing some like (el-get 'sync (mapcar 'el-get-source-name el-get-sources)), then I think explicitly installing exec-path-from-shell first should do the trick:

(el-get 'sync 'exec-path-from-shell)
(el-get 'sync (remove "exec-path-from-shell" (mapcar #'el-get-source-name el-get-sources)))

@lethjakman
Copy link
Author

Why are you removing exec-path-from-shell? Won't that mean it has to reinstall on every start up?

@npostavs
Copy link
Collaborator

No, it just avoids initializing it twice. Reinstall only happens if you explictly el-get-reinstall or el-get-remove a package.

With the el-get-sources you posted, the 2 lines I posted are basically the same as doing

(el-get 'sync 'exec-path-from-shell) ; first exec-path-from-shell
(el-get 'sync (list "ace-jump-mode" "evil")) ; then the rest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants