From: Florian Beck <fb@miszellen.de>
To: emacs-orgmode@gnu.org
Subject: Some Experiences with org-babel-load-file
Date: Mon, 10 Dec 2012 23:33:39 +0100 [thread overview]
Message-ID: <50C66343.2010202@miszellen.de> (raw)
Hello!
As an experiment, I moved my .emacs and all my personal packages into an
org-file and now load it with 'org-babel-load-file. This works fine
enough: the source code blocks can handle several thousand lines of code
(for later splitting) without any quirks, tough editing in the org-file
sure gets slow.
A couple of observations:
1. `org-babel-load-file' doesn't seem to be in the org docu. The
instructions on worg are obsolete (mentions `org-install') and
needlessly complicated. Just putting
(package-initialize) ;; only if you use the newest org
(require 'ob-tangle)
(org-babel-load-file "/path/to/your/org-init-file.org")
into your .emacs (no need for .emacs.d/init.el) seems to suffice.
2. Unless you are only setting variables, you want your functions to be
byte-compiled. I modified `org-babel-load-file' to do that. Any reason
not to?
3. While it saves some keystrokes not to have to write "tangle: yes", it
seems to be at odds with `org-tangle-file (though it does respect
"tangle: no").
4. When I babel-load "my-package.org", all emacs sees is the tangled
"my-package.el", which of course is right. The problem, however, is that
I often search for one of my functions, change it … and loose the
changes the next time I start emacs (I already got zapped a couple of
times). Integrating org-tangle with the emacs documentation would be
tough I guess. But how about setting a read-only file locale variable to
block the most stupid mistakes?
Overall, very nice. Thank you.
--
Florian Beck
next reply other threads:[~2012-12-10 23:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-10 22:33 Florian Beck [this message]
2012-12-11 14:52 ` Some Experiences with org-babel-load-file Eric Schulte
2012-12-11 19:52 ` Florian Beck
2012-12-12 3:35 ` Eric Schulte
2012-12-11 17:01 ` Memnon Anon
2012-12-11 17:36 ` Jonathan Leech-Pepin
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=50C66343.2010202@miszellen.de \
--to=fb@miszellen.de \
--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).