Skip to content

Commit

Permalink
Fixed some brokenness, Udated Ruby
Browse files Browse the repository at this point in the history
Fixed general brokenness in the install process (and others)
Prepped to ditch projeckt.
Generalized some things better
Set up ruby better, prepped for rails install
  • Loading branch information
Jonathan Arkell authored and Jonathan Arkell committed Apr 15, 2013
1 parent bf514fe commit f77a320
Show file tree
Hide file tree
Showing 8 changed files with 598 additions and 23 deletions.
5 changes: 3 additions & 2 deletions Emagician-Helpers.org
Original file line number Diff line number Diff line change
Expand Up @@ -215,10 +215,11 @@


* RSS reading through Newsticker
** TODO re-enable this if it can stop sucking
** Set up emagician feeds
This is set up as it's own variable, so you can add it. Because, hopefully it's useful.

#+begin_src emacs-lisp
#+begin_src emacs-lisp :tangle no
(setq emagician/newsticker-url-list
'(("Emacs Wiki" "http://www.emacswiki.org/emacs/?action=rss")
("Reddit" "http://www.reddit.com/r/emacs/.rss") ; I've never seen a more wretched hive of scum and mysogeny. but /r/emacs is mostly okay.
Expand All @@ -236,7 +237,7 @@

** Set up newsticker proper
*** TODO set up external dependency here for w3m :external:
#+begin_src emacs-lisp
#+begin_src emacs-lisp :tangle no
(require 'newsticker)

; W3M HTML renderer isn't essential, but it's pretty useful.
Expand Down
21 changes: 9 additions & 12 deletions Emagician-Install.org
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,10 @@ Let there be light
#+name: set-this-dir-as-var
#+begin_src emacs-lisp
(defvar emagician-dir
"/Users/jonathana/projects/emagicians-starter-kit/"
"/Users/jarkell/projects/emagicians-starter-kit/"
"Automagically generated variable where the emagicians kit is located")
#+end_src

#+RESULTS: set-this-dir-as-var
: emagician-dir


*** Step Two: Making it go.
Expand Down Expand Up @@ -186,7 +184,7 @@ granular if need be.
Then again, maybe you need to seperate customizations out by user account. Why not?

#+begin_src emacs-lisp :results silent
(emagician-invoke-custom-dir (user-login-name))
(emagician-invoke-custom-file (user-login-name))
#+end_src

** Testing
Expand All @@ -204,6 +202,8 @@ Then again, maybe you need to seperate customizations out by user account. Why n
Note that you will need to quit the new instance of emacs, so
control can return to this instance of emacs.

*** TODO fix this little block here. It runs the /usr/bin/emacs inside of OSX

#+source make-a-tha-test-script
#+begin_src emacs-lisp :results raw
(concat "#+begin_src sh :results silent\n"
Expand All @@ -217,11 +217,7 @@ Then again, maybe you need to seperate customizations out by user account. Why n
)
#+end_src

#+results:
#+begin_src sh :results silent
# run this code block to test your emacs starter kit
emacs -q -l /Users/joneathana/projects/emagicians-starter-kit/init.el &
#+end_src
*** No org-babel-execute function for sh?

If you get the message ~org-babel-execute-src-block: No
org-babel-execute function for sh!~ then you need to enable shell
Expand All @@ -231,6 +227,8 @@ Then again, maybe you need to seperate customizations out by user account. Why n
(require 'ob-sh)
#+end_src

*** what you should see when it works

If it is working properly, the ~*Messages*~ buffer of the new emacs
instance should read something like:

Expand All @@ -250,6 +248,8 @@ cross-lingual macros.
In fact, when the starter kit builds itself, it will use this
cross-lingual aspect to figure out where it is.



** Taking the plunge

One you run the next source block, you will have fully installed
Expand All @@ -265,9 +265,6 @@ mv -v ~/.emacs.d/init.el $FILE
cp -v ./init.el ~/.emacs.d/
#+end_src

#+results:
: ./init.el -> /Users/jonathana/.emacs.d/init.el


* The actual Init file

Expand Down
5 changes: 3 additions & 2 deletions Emagician-Interface.org
Original file line number Diff line number Diff line change
Expand Up @@ -231,8 +231,9 @@ For some reason powerline wants to be reset using ~powerline-center-theme~
(global-set-key [f4 f6] '(lambda () (interactive) (memo-pop "~/Dropbox/org/Career.org")))
(global-set-key [f4 f7] '(lambda () (interactive) (memo-pop "~/Dropbox/org/Game.org")))

** Prosjekt
#+begin_src emacs-lisp
** Prosjekt
*** TODO Figure out a better project manager and disable this one probably
#+begin_src emacs-lisp :tangle no
(add-to-list 'load-path (expand-file-name "dist/prosjekt/prosjekt" emagician-dir))
(add-to-list 'load-path (expand-file-name "dist/prosjekt/prosjekt/ext" emagician-dir))
(require 'prosjekt)
Expand Down
1 change: 1 addition & 0 deletions Emagician-Jonnay.org
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,5 @@
(emagician-starter-kit-load "Emagician-Meta.org")
(emagician-starter-kit-load "Emagician-Lamp.org")
(emagician-starter-kit-load "Emagician-C.org")
(emagician-starter-kit-load "Emagician-Ruby.org")
#+end_src
6 changes: 4 additions & 2 deletions Emagician-Meta.org
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,16 @@ $green: #859900;

Maybe they should be moved? Maybe they should say? I don't know.

#+begin_src emacs-lisp :tangle empa/recipes/prosjekt
was in empa/recipes/prosjekt
#+begin_src emacs-lisp :tangle no
(prosjekt
:doc "A emacs extension for working with projects"
:repo "abingham/prosjekt"
:fetcher github)
#+end_src

#+begin_src emacs-lisp :tangle empa/recipes/emacs-achievements
was in empa/recipes/emacs-achievements
#+begin_src emacs-lisp :tangle no
(emacs-achievements
:doc "a fun way to learn about Emacs."
:repo "abingham/prosjekt"
Expand Down
73 changes: 69 additions & 4 deletions Emagician-Ruby.org
Original file line number Diff line number Diff line change
@@ -1,22 +1,87 @@
* Ruby
#+title: Ruby

More and more the tools I use require Ruby. One day I will dive into that. But for now, this file is ... just enough.

Ruby Genii are encouraged to make this org-setup file awesome.

** Make RVM go
* Ruby version management

** Set up through rbenv

*** TODO fix problem with path not working on eshell. BOO.
**** TODO kludge it
- [ ] find out how addpath works in eshell
- [ ] then do the same thing automagickally through a hook
*** From the readme on the "neckbeard setup"
#+begin_src emacs-lisp
(defun emagician/add-to-path (path &rest front)
(setenv "PATH"
(concat
(if front
path
(getenv "PATH"))
":"
(if front
(getenv "PATH")
path))))

(emagician/add-to-path "~/.rbenv/shims" t)

#+end_src

*** Add a rehash command
#+begin_src emacs-lisp
(defun emagician/ruby-rbenv-rehash ()
"Run the rbenv rehash command"
(interactive)
(start-process-shell-command "rbenv-rehash" nil "rbenv rehash"))

(emagician/ruby-rbenv-rehash)
#+end_src

*** Add a gem install command
#+begin_src emacs-lisp
(defun emagician/ruby-gem-install (gem)
"Installs a Ruby Gem."
(interactive "sGem to install?: ")
(let ((proc (start-process-shell-command "gems" "*ruby*" (concat "gem install " gem))))
(set-process-sentinel proc
#'(lambda (proc event)
(when (string= event "finished")
(emagician/ruby-rbenv-rehash))))))
#+end_src

*** Testing
Just in case it doesn't work, these command can be helpful for testing.
#+begin_src emacs-lisp :tangle no
(start-process-shell-command "gems" "*gem*" "echo $PATH")
(start-process-shell-command "gems" "*gem*" "ruby" "--version")

#+end_src

** RVM
thorugh some research it appears RVM is *not* the way to go. This is kept here for reference however
*** Make RVM go

#+begin_src emacs-lisp :tangle no
(emagician-expect-package 'rvm)
(rvm-use-default)
#+end_src

** Add gems dir to path :fixme:path:

#+begin_src emacs-lisp
*** Add gems dir to path :fixme:path:
**** TODO this should really be set up as an emagician/add-path function
#+begin_src emacs-lisp :tangle no
(setenv "PATH"
(concat (getenv "PATH")
":"
(substring (shell-command-to-string "~/.rvm/bin/rvm gemdir") 0 -1)
"/bin"))
#+end_src

* Rinari

#+begin_src emacs-lisp
(emagician-expect-package 'rinari)
(emagician-expect-package 'rhtml-mode)
#+end_src
3 changes: 2 additions & 1 deletion Emagician-WebDev.org
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ Originally called esk-pp-json, from the Emacs Starter Kit."

**** Slime-js
***** TODO set up dev-mode for this.
#+begin_src emacs-lisp
#+begin_src emacs-lisp :tangle no
(when (not (string= system-name "my-melody"))
(add-to-list 'load-path "~/Dropbox/Creativity/code/emacs-projects/slime-js")
(slime-setup '(slime-js slime-repl))
Expand All @@ -132,6 +132,7 @@ Originally called esk-pp-json, from the Emacs Starter Kit."
;; (setq slime-js-swank-command "/usr/local/bin/npm")
;; (setq slime-js-swank-args '("run" "swank"))
#+end_src
***** TODO set up swank js properly through a combo on NPM magic and making the package available

**** Node Setup

Expand Down
Loading

0 comments on commit f77a320

Please sign in to comment.