I'm new to emacs and I'm trying to setup my init file using a .org file with org-babel-load-file. I've read that it's a good idea to use package use-package to configure packages and to make sure they are installing when moving my init file to another PC (:ensure t).

But the problem is that my setup does not install everything properly. For example, when installing flycheck, I'm using this configuration (this lines of code are available in the flycheck READ.me, also):

#+begin_src emacs-lisp

(use-package flycheck
  :ensure t
  :init (global-flycheck-mode))

(use-package flycheck-irony
  :ensure t)

(use-package flycheck-rtags
  :ensure t)

#+end_src emacs-lisp

But, when I open emacs on another computer, I have to manually install flycheck and even use M-x global-fly-check-mode because the init does not work either. I really don't know what to do. I was trying to install cmake-ide but the same thing happened. I'm contantly pushing my init file to https://github.com/mrisso/dotfiles

I'd be glad if you guys help me with that. Thanks!

  • I found out that using #+end_src emacs-lisp instead of just #+end_src makes the org-babel loader to misinterpret the config file. That's it. Sry for the trouble :/ – Matheus Hemerly Risso Jun 14 '17 at 20:09
  • You can add that as an answer yourself and accept that in few days. – Kaushal Modi Jun 15 '17 at 19:28
up vote 0 down vote accepted

The problem was that I was using #+END_SRC emacs_lisp instead of just #+END_SRC and that thing confused the org-babel interpreter. Now it works (:

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.