bbatsov/prelude

Loading personal files

BuddhiLW opened this issue · 3 comments

I want to use some packages without having to load them by hand.

For example, for orgmode, I would like to be able to run python, without going to "personal/orgmode/org-python.el"

and running C-c C-c on

(require 'org)
(eval
 (org-babel-do-load-languages
  'org-babel-load-languages
  '((emacs-lisp . t)
    ;; (julia . t)
    (python . t)
    (jupyter . t)
    (ein . t)
    (ipython . t))))

Further, I had an issue with snippets. Even after avaluating by hand this code:

(require 'prelude-core)
(prelude-require-packages '(yasnippet yasnippet-snippets))
(use-package yasnippet
  :ensure t
  :config
  (use-package yasnippet-snippets
    :ensure t)
  (yas-reload-all))
;; aahhh (the sound of despair)

I could not make the snippets work as expected. For example typing "co" and TAB. Nothing happened; or any other snippet.

You can just use load from the main personal config file you have to refer to files in subfolders there. I guess that'd be the easiest approach.

So, to go to my ~/.emacs.d/personal/custom.el and write:

(load "~/.emacs.d/personal/Orgmode/Jupyter.el")
(load "~/.emacs.d/personal/Julia/hook.el")
(load "~/.emacs.d/personal/Julia/ein.el")
(load "~/.emacs.d/personal/Python/jedi.el")
(load "~/.emacs.d/personal/Orgmode/babel.el")
(load "~/.emacs.d/personal/Orgmode/globalbindings.el")
(load "~/.emacs.d/personal/Orgmode/extra-exports.el")
(load "~/.emacs.d/personal/Orgmode/Bibtex.el")
(load "~/.emacs.d/personal/Orgmode/Clojure.el")

etc?

Ok, so I did it,

Something has changed. But, still, when I go to my orgfile, and C-c C-c a piece of code, it says "No org-babel-execute function for ein-python!".

Still, initially, I had to go to my custom.el and evaluate (load "~/.emacs.d/personal/Orgmode/Jupyter.el"). Then, I changed the order of load, so Jupyter.el was the first. And, It worked. I guess some eval interrupted the functioning of loading the rest of the files.

But, if you know of any other solution that would load recursive, or something like that, I would appreciate. If it doesn't come to mind, that's fine too.

Thank you, @bbatsov , for your time and disposition. Great piece of software; it feels like arch based distributions of linux, but emacs.

I was wondering if it's ok to delete custom.el at all, as I have my own .el file with all my config. I have noticed that sometimes some of the config get copied onto custom.el and messes things ups if I change them back in my own .el file (because of the order in which the .el files are called).