Re: [O] sharing my firsts, org babel tangle and init .org file

2014-04-19 Thread Charles Berry
Pete Ley peteley11235 at gmail.com writes:

 
 I've looked at the solution on worg and, though I didn't actually try to
 implement, it seems like tangling your init file every time you open
 Emacs is a little cumbersome. Please correct me if I'm wrong in this
 assumption. 


OK, here goes:

In `org-babel-load-file' the code following the comment

;; tangle if the org-mode file is newer than the elisp file

appears to only re-tangle the .el file iff it is older than the .org file

HTH,

Chuck




Re: [O] sharing my firsts, org babel tangle and init .org file

2014-04-19 Thread Eric Schulte
Bastien b...@gnu.org writes:

 Brady Trainor algeb...@uw.edu writes:

 Have you migrated your init files into .org file(s)? What's your
 setup?

 I do, and find it very convenient.

 My setup is here: http://bzg.fr/emacs.html

My setup is available here.

https://github.com/eschulte/emacs24-starter-kit

It is designed to be a good starting point for personalized configs.

Also, as Chuck mentioned, tangling does *not* take place every time
Emacs starts, only when the .org file is newer than the .el file.

Best,

-- 
Eric Schulte
https://cs.unm.edu/~eschulte
PGP: 0x614CA05D



Re: [O] sharing my firsts, org babel tangle and init .org file

2014-04-18 Thread Bastien
Brady Trainor algeb...@uw.edu writes:

 Have you migrated your init files into .org file(s)? What's your
 setup?

I do, and find it very convenient.

My setup is here: http://bzg.fr/emacs.html

-- 
 Bastien



Re: [O] sharing my firsts, org babel tangle and init .org file

2014-04-18 Thread Pete Ley
I've looked at the solution on worg and, though I didn't actually try to
implement, it seems like tangling your init file every time you open
Emacs is a little cumbersome. Please correct me if I'm wrong in this
assumption. I also have a sync script hooked into my tangling that has
to do with exporting some of my config sections to my gopher site so
they're always up to date, so maybe it's just that my tangling
experience is especially involved. 

Here's what I do. Since I probably only edit my config ~10% of the times
that I open Emacs, it seems easier to just have a statically-tangled
init file, so I just basically use C-c C-v C-t instead of C-x C-s to
save my init.org. I also use somewhat customized init files on a few
different hosts which share the same .emacs.d. They share come common
functionality and differ slightly, so there are a few init files tangled
into ~/.emacs.d of the form hostname.el and the init.el file is
basically a switch which chooses which one to load on startup.

Short reference:
http://gopher.floodgap.com/gopher/gw?gopher://sdf.org:70/0/users/framling/emacs/init



Re: [O] sharing my firsts, org babel tangle and init .org file

2014-04-18 Thread Grant Rettke
Good thing to consider. On my slow machine it takes 6 minutes to tangle my
init and on my faster machine 1.5 minutes so I follow the static approach.

Grant Rettke | AAAS, ACM, FSF, IEEE, Sigma Xi
gret...@acm.org | http://www.wisdomandwonder.com/
“Wisdom begins in wonder.” --Socrates
((λ (x) (x x)) (λ (x) (x x)))
“Life has become immeasurably better since I have been forced to stop
taking it seriously.” --Thompson


On Fri, Apr 18, 2014 at 7:24 PM, Pete Ley peteley11...@gmail.com wrote:

 I've looked at the solution on worg and, though I didn't actually try to
 implement, it seems like tangling your init file every time you open
 Emacs is a little cumbersome. Please correct me if I'm wrong in this
 assumption. I also have a sync script hooked into my tangling that has
 to do with exporting some of my config sections to my gopher site so
 they're always up to date, so maybe it's just that my tangling
 experience is especially involved.

 Here's what I do. Since I probably only edit my config ~10% of the times
 that I open Emacs, it seems easier to just have a statically-tangled
 init file, so I just basically use C-c C-v C-t instead of C-x C-s to
 save my init.org. I also use somewhat customized init files on a few
 different hosts which share the same .emacs.d. They share come common
 functionality and differ slightly, so there are a few init files tangled
 into ~/.emacs.d of the form hostname.el and the init.el file is
 basically a switch which chooses which one to load on startup.

 Short reference:

 http://gopher.floodgap.com/gopher/gw?gopher://sdf.org:70/0/users/framling/emacs/init




[O] sharing my firsts, org babel tangle and init .org file

2014-04-17 Thread Brady Trainor


Have you migrated your init files into .org file(s)? What's your setup?

Below is my first setup for fellow newbs, or for the interested 
developer. And please let me know if I'm missing some logic or 
conventions/practices.


In the short history of my Emacs init file evolution (~ oct '13), I had 
considered packages like dot-emacs.org, but for some reason had not 
succeeded (I thought it had demanded Emacs 24.3.50+, but I don't see 
that in the description now).


So when I recently felt motivated to try such a .org Literation of my 
init files (my project of making agenda custom commands and capture 
templates was starting to topple), I tried let's say a more basic approach.


I worked mostly from the tutorial in
Babel: Introduction / Emacs Initialization with Babel

http://orgmode.org/worg/org-contrib/babel/intro.html#emacs-initialization

It took just a little wrestling with a clean tty2 Emacs, but here is my 
interpretation of a minimal setup for initializing via org babel 
tangling:


 
/

 make sure org has been installed in an emacs -q

(require 'package)
(package-initialize)
(require 'org)

;; declare org indentation before we might manually open org to tangle
(setq org-startup-indented t)
(setq org-hide-block-startup t)
;; declare source indentation before we might manually open org to tangle
(setq org-src-fontify-natively t)
(setq org-edit-src-content-indentation 0)

;; default I/O in windows is undecided-dos/unix for de/encoding respectively
(prefer-coding-system 'utf-8-unix)

;; load org initialization files
(require 'ob-tangle)
(org-babel-load-file /e/emacs-config/dot-emacs-test.org)

\


Some of those aren't necessary but for aesthetics before manually 
stepping through lines for testing the initialization (starting emacs -q 
tangling and/or executing one-by-one).


The character encoding is there as I have some utf-8 Fahrenheit symbols 
in my (.org) init file.


Initially (while troubleshooting) I had some dired customizations 
(vertical omit, horizontal hide), font family and color-theming in this 
code block, as I have a hard time looking at plain Emacs for too long.


You may also want to toggle some tangles in your (first ever) init file, 
this can be done per file, subtree or source block, via


#+PROPERTY: header-args :tangle yes
 or
:PROPERTIES:
:header-args: :tangle no
:END:
 or
#+BEGIN_SRC emacs-lisp :tangle no

And the latter take precendence.


TWIMC, HTH

Brady