all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Experiences with "literate elisp" and ob-tangle?
@ 2011-08-22 14:20 John Wiegley
  2011-08-22 17:09 ` Eric Schulte
  0 siblings, 1 reply; 3+ messages in thread
From: John Wiegley @ 2011-08-22 14:20 UTC (permalink / raw)
  To: emacs-orgmode

Hi all, I'm considering switching my lengthy .emacs over to a literate Org
file, using ob-tangle, and as I was wondering if others had any experience
with this, and if so, does it slow down startup much?  Is there a way to get
ob-tangle to compile the resulting Elisp file?  I'm guessing it does not
regenerate the .el file if no changes have been made to the .org, right?

Thanks,
  John

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Experiences with "literate elisp" and ob-tangle?
  2011-08-22 14:20 Experiences with "literate elisp" and ob-tangle? John Wiegley
@ 2011-08-22 17:09 ` Eric Schulte
  2011-08-22 18:18   ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 3+ messages in thread
From: Eric Schulte @ 2011-08-22 17:09 UTC (permalink / raw)
  To: John Wiegley; +Cc: emacs-orgmode

Hi John,

John Wiegley <jwiegley@gmail.com> writes:

> Hi all, I'm considering switching my lengthy .emacs over to a literate Org
> file, using ob-tangle, and as I was wondering if others had any experience
> with this, and if so, does it slow down startup much?

The first load after a .org file is changed will require re-tangling of
the file, but in most cases the .el files are loaded directly and there
should be no slowdown.  I've been using this for over a year now with no
noticable slowdown.  For an example of a large config structured using
.org files and based on Emacs24 see [1].

> Is there a way to get ob-tangle to compile the resulting Elisp file?

Yes, see the makefile in the repo I pointed to above [2].

> 
> I'm guessing it does not regenerate the .el file if no changes have
> been made to the .org, right?
>

That is correct, the `org-babel-load-file' function compares the
modification dates of the .el and .org file to see if re-tangling is
required.

Best of luck -- Eric

>
> Thanks,
>   John
>
>


Footnotes: 
[1]  https://github.com/eschulte/emacs24-starter-kit

[2]  https://github.com/eschulte/emacs24-starter-kit/blob/master/Makefile

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Experiences with "literate elisp" and ob-tangle?
  2011-08-22 17:09 ` Eric Schulte
@ 2011-08-22 18:18   ` Darlan Cavalcante Moreira
  0 siblings, 0 replies; 3+ messages in thread
From: Darlan Cavalcante Moreira @ 2011-08-22 18:18 UTC (permalink / raw)
  To: Eric Schulte; +Cc: John Wiegley, emacs-orgmode


I've been using the Emacs starter kit for some time and I must say it is
excellent. Before making the change, I already had my Emacs initialization
broken-down into smaller .el files that were loaded by the master file. It
was as much organized as I could be, but not enough. It always required
more work when I needed to make any changes than I would like.

With the starter-kit I now use only a single org file for everything. The
outline-structure of org-mode allows me to have my initialization broken
down into smaller pieces in a more natural way without any extra
work. Also, it is much easier to locate any part of my initialization that
I want to change, since everything is in a single file and now I have tags.

Another bonus feature is that I can easily disable/enable parts of my
initialization simple by setting the tangle property of a sub-tree to
"nil", as well as putting "COMMENT" in the beginning of it (COMMENT will be
red, but has no effect besides identify a disabled sub-tree). This is
better than locating and commenting the undesired/desired lisp code in my
previous .el files. This allowed me to identify bottlenecks and optimize my
Emacs initialization.

--
Darlan

At Mon, 22 Aug 2011 11:09:17 -0600,
Eric Schulte wrote:
> 
> Hi John,
> 
> John Wiegley <jwiegley@gmail.com> writes:
> 
> > Hi all, I'm considering switching my lengthy .emacs over to a literate Org
> > file, using ob-tangle, and as I was wondering if others had any experience
> > with this, and if so, does it slow down startup much?
> 
> The first load after a .org file is changed will require re-tangling of
> the file, but in most cases the .el files are loaded directly and there
> should be no slowdown.  I've been using this for over a year now with no
> noticable slowdown.  For an example of a large config structured using
> .org files and based on Emacs24 see [1].
> 
> > Is there a way to get ob-tangle to compile the resulting Elisp file?
> 
> Yes, see the makefile in the repo I pointed to above [2].
> 
> > 
> > I'm guessing it does not regenerate the .el file if no changes have
> > been made to the .org, right?
> >
> 
> That is correct, the `org-babel-load-file' function compares the
> modification dates of the .el and .org file to see if re-tangling is
> required.
> 
> Best of luck -- Eric
> 
> >
> > Thanks,
> >   John
> >
> >
> 
> 
> Footnotes: 
> [1]  https://github.com/eschulte/emacs24-starter-kit
> 
> [2]  https://github.com/eschulte/emacs24-starter-kit/blob/master/Makefile
> 
> -- 
> Eric Schulte
> http://cs.unm.edu/~eschulte/
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-08-22 18:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-22 14:20 Experiences with "literate elisp" and ob-tangle? John Wiegley
2011-08-22 17:09 ` Eric Schulte
2011-08-22 18:18   ` Darlan Cavalcante Moreira

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.