emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Brady Trainor <algebrat@uw.edu>
To: emacs-orgmode@gnu.org
Subject: sharing my firsts, org babel tangle and "init" .org file
Date: Thu, 17 Apr 2014 16:43:45 -0700	[thread overview]
Message-ID: <lipovi$hv$1@ger.gmane.org> (raw)


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

             reply	other threads:[~2014-04-17 23:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-17 23:43 Brady Trainor [this message]
2014-04-18 11:15 ` sharing my firsts, org babel tangle and "init" .org file Bastien
2014-04-20  1:50   ` Eric Schulte
2014-04-19  0:24 ` Pete Ley
2014-04-19  1:58   ` Grant Rettke
2014-04-19 15:05   ` Charles Berry

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='lipovi$hv$1@ger.gmane.org' \
    --to=algebrat@uw.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).