Re: [O] Using Org/babel for Emacs config files

2013-01-24 Thread Thorsten Jolitz
t...@tsdye.com (Thomas S. Dye) writes:

 I've been working with Nicolas Goaziou's new LaTeX exporter recently and
 the gap between Org mode and AucTeX has narrowed considerably.

Thats of course always true for Org-mode, and often the problem isn't
really in the software, but sits in front of the computer and is not
up-to-date or forgot how to do it. 

 The new exporter is *really* nice. 

Agreed ... 

-- 
cheers,
Thorsten




[O] Using Org/babel for Emacs config files (was: OT: Learning ELISP)

2013-01-23 Thread Karl Voit
Hi!

* Jonathan Arkell jonath...@criticalmass.com wrote:
 I am a huge advocate of using org files and literate programming in your
 config files.

Great.

I am not completely convinced to convert my config to org/babel but
I am not oppose either. Not sure, if there are that many advantages,
that it is worth my effort, that's all.

 A few reasons why:
   - Makes it easy to logically group sections of your init and
 configuration

Well, this is also possible with pure elisp and comments. Folding is
a different topic tough.

   - Agenda tags search on your initialization file?  Yes please!
 Extremely useful for those cross-cutting bits.  I have tags like
 keybinding, osx and linux, and working on others as appropriate.

Hm. Interesting but I guess this is not my use-case (except for
:keybinding:). I do use (when (system-is-linux) ... ) and similar
all over my configuration.

Although I am a huge fan of tagging, I don't see the use when
editing my emacs config (yet).

   - Add TODOs to your init file.

I am using ~/org/mainfile.org - * shorts - ** TODO do this
:hostname: all the time. Also for my config tasks. No worries: I do
see your point but I like to have all my sysadmin-tasks combined in
mainfile.org/shorts. So maybe this is just me.

 Here is my example, but I stand on the shoulders of giants:

 https://github.com/jonnay/emagicians-starter-kit

Thanks for sharing!

One thing which I would appreciate would be that it is more easy to
write documentation (including URLs; outside of elisp sections) in
org.


Naive question: Are there any performance issues with not being able
to compile my config.org to config.elc as it is possible with
config.el files?

-- 
Karl Voit




Re: [O] Using Org/babel for Emacs config files (was: OT: Learning ELISP)

2013-01-23 Thread Darlan Cavalcante Moreira

I also have my Emacs configuration in org mode and it is really great.
Before moving to an org-mode initialization file I had multiple elisp files
and the main initialization file loaded the individual files. But having
everything in one place with the outline and search powers of org-modemuch
better. You can even put todos there if you want.

There are many benefits of using tags in your initialization. You can, for
instance, put a Keybinds tag in all headlines that change some
keybindings. You can put a Flymake tag in all headlines configuring
flymake for the different programming languages you use. If you need to
locate the flymake configuration specific for python, for instance, all
that is necessary is to do a tag search for the Flymake and Python tags.

Note that Emacs does not evaluate your initialization org-mode file
directly. It tangles all elisp blocks in that file to an elisp file and
then load that elisp file as usual. The tangling can be slow if you have
many blocks, but it only does that once after editing the org-mode
file. Therefore, you don't get a performance hit by having your
initialization in an org-mode file.

You can also take advantage of this tangle process. For instance, I have a
Themes headline where each child headline configures Emacs with a
different theme. I set the TANGLE property of all of these headlines to
no except one. Then Emacs will use that theme. You can easily
enable/disable big parts of your configuration like this and I find it
easier then commenting and uncommenting different parts of an elisp
file. For visual feedback, I like to add the COMMENT keyword in the
headlines where I have set the TANGLE property to no.

--
Darlan

At Wed, 23 Jan 2013 15:40:35 +0100,
Karl Voit wrote:
 
 Hi!
 
 * Jonathan Arkell jonath...@criticalmass.com wrote:
  I am a huge advocate of using org files and literate programming in your
  config files.
 
 Great.
 
 I am not completely convinced to convert my config to org/babel but
 I am not oppose either. Not sure, if there are that many advantages,
 that it is worth my effort, that's all.
 
  A few reasons why:
- Makes it easy to logically group sections of your init and
  configuration
 
 Well, this is also possible with pure elisp and comments. Folding is
 a different topic tough.
 
- Agenda tags search on your initialization file?  Yes please!
  Extremely useful for those cross-cutting bits.  I have tags like
  keybinding, osx and linux, and working on others as appropriate.
 
 Hm. Interesting but I guess this is not my use-case (except for
 :keybinding:). I do use (when (system-is-linux) ... ) and similar
 all over my configuration.
 
 Although I am a huge fan of tagging, I don't see the use when
 editing my emacs config (yet).
 
- Add TODOs to your init file.
 
 I am using ~/org/mainfile.org - * shorts - ** TODO do this
 :hostname: all the time. Also for my config tasks. No worries: I do
 see your point but I like to have all my sysadmin-tasks combined in
 mainfile.org/shorts. So maybe this is just me.
 
  Here is my example, but I stand on the shoulders of giants:
 
  https://github.com/jonnay/emagicians-starter-kit
 
 Thanks for sharing!
 
 One thing which I would appreciate would be that it is more easy to
 write documentation (including URLs; outside of elisp sections) in
 org.
 
 
 Naive question: Are there any performance issues with not being able
 to compile my config.org to config.elc as it is possible with
 config.el files?
 
 -- 
 Karl Voit
 
 



Re: [O] Using Org/babel for Emacs config files (was: OT: Learning ELISP)

2013-01-23 Thread Kyle Machulis
Building on these idea, eric schulte's emacs 24 starter kit actually
uses tags to configure what should and shouldn't be tangled, to make
things easily configurable by others (not really a feature most of us
are looking for in configs, but interesting nonetheless). Check out
the starter-kit-load function in
https://raw.github.com/eschulte/emacs24-starter-kit/master/starter-kit.org

On Wed, Jan 23, 2013 at 2:06 PM, Darlan Cavalcante Moreira
darc...@gmail.com wrote:

 I also have my Emacs configuration in org mode and it is really great.
 Before moving to an org-mode initialization file I had multiple elisp files
 and the main initialization file loaded the individual files. But having
 everything in one place with the outline and search powers of org-modemuch
 better. You can even put todos there if you want.

 There are many benefits of using tags in your initialization. You can, for
 instance, put a Keybinds tag in all headlines that change some
 keybindings. You can put a Flymake tag in all headlines configuring
 flymake for the different programming languages you use. If you need to
 locate the flymake configuration specific for python, for instance, all
 that is necessary is to do a tag search for the Flymake and Python tags.

 Note that Emacs does not evaluate your initialization org-mode file
 directly. It tangles all elisp blocks in that file to an elisp file and
 then load that elisp file as usual. The tangling can be slow if you have
 many blocks, but it only does that once after editing the org-mode
 file. Therefore, you don't get a performance hit by having your
 initialization in an org-mode file.

 You can also take advantage of this tangle process. For instance, I have a
 Themes headline where each child headline configures Emacs with a
 different theme. I set the TANGLE property of all of these headlines to
 no except one. Then Emacs will use that theme. You can easily
 enable/disable big parts of your configuration like this and I find it
 easier then commenting and uncommenting different parts of an elisp
 file. For visual feedback, I like to add the COMMENT keyword in the
 headlines where I have set the TANGLE property to no.

 --
 Darlan

 At Wed, 23 Jan 2013 15:40:35 +0100,
 Karl Voit wrote:

 Hi!

 * Jonathan Arkell jonath...@criticalmass.com wrote:
  I am a huge advocate of using org files and literate programming in your
  config files.

 Great.

 I am not completely convinced to convert my config to org/babel but
 I am not oppose either. Not sure, if there are that many advantages,
 that it is worth my effort, that's all.

  A few reasons why:
- Makes it easy to logically group sections of your init and
  configuration

 Well, this is also possible with pure elisp and comments. Folding is
 a different topic tough.

- Agenda tags search on your initialization file?  Yes please!
  Extremely useful for those cross-cutting bits.  I have tags like
  keybinding, osx and linux, and working on others as appropriate.

 Hm. Interesting but I guess this is not my use-case (except for
 :keybinding:). I do use (when (system-is-linux) ... ) and similar
 all over my configuration.

 Although I am a huge fan of tagging, I don't see the use when
 editing my emacs config (yet).

- Add TODOs to your init file.

 I am using ~/org/mainfile.org - * shorts - ** TODO do this
 :hostname: all the time. Also for my config tasks. No worries: I do
 see your point but I like to have all my sysadmin-tasks combined in
 mainfile.org/shorts. So maybe this is just me.

  Here is my example, but I stand on the shoulders of giants:
 
  https://github.com/jonnay/emagicians-starter-kit

 Thanks for sharing!

 One thing which I would appreciate would be that it is more easy to
 write documentation (including URLs; outside of elisp sections) in
 org.


 Naive question: Are there any performance issues with not being able
 to compile my config.org to config.elc as it is possible with
 config.el files?

 --
 Karl Voit






Re: [O] Using Org/babel for Emacs config files

2013-01-23 Thread David Bjergaard
Hi,

 Naive question: Are there any performance issues with not being able
 to compile my config.org to config.elc as it is possible with
 config.el files?
I used an init.org file in my initialization, and as long as you haven't
recently modified your init.org, emacs won't re-tangle the org file (ie
its as if you have a config.el file that's getting loaded)  Of course,
you can set emacs up to automatically recompile the config.el file when
its generated so, there are literally no performance issues because you
can still compile elisp code to load with the exception of when you edit
your configuration.

Dave


Karl Voit devn...@karl-voit.at writes:

 Hi!

 * Jonathan Arkell jonath...@criticalmass.com wrote:
 I am a huge advocate of using org files and literate programming in your
 config files.

 Great.

 I am not completely convinced to convert my config to org/babel but
 I am not oppose either. Not sure, if there are that many advantages,
 that it is worth my effort, that's all.

 A few reasons why:
   - Makes it easy to logically group sections of your init and
 configuration

 Well, this is also possible with pure elisp and comments. Folding is
 a different topic tough.

   - Agenda tags search on your initialization file?  Yes please!
 Extremely useful for those cross-cutting bits.  I have tags like
 keybinding, osx and linux, and working on others as appropriate.

 Hm. Interesting but I guess this is not my use-case (except for
 :keybinding:). I do use (when (system-is-linux) ... ) and similar
 all over my configuration.

 Although I am a huge fan of tagging, I don't see the use when
 editing my emacs config (yet).

   - Add TODOs to your init file.

 I am using ~/org/mainfile.org - * shorts - ** TODO do this
 :hostname: all the time. Also for my config tasks. No worries: I do
 see your point but I like to have all my sysadmin-tasks combined in
 mainfile.org/shorts. So maybe this is just me.

 Here is my example, but I stand on the shoulders of giants:

 https://github.com/jonnay/emagicians-starter-kit

 Thanks for sharing!

 One thing which I would appreciate would be that it is more easy to
 write documentation (including URLs; outside of elisp sections) in
 org.


 Naive question: Are there any performance issues with not being able
 to compile my config.org to config.elc as it is possible with
 config.el files?



Re: [O] Using Org/babel for Emacs config files

2013-01-23 Thread Thorsten Jolitz
Karl Voit devn...@karl-voit.at writes:

Hi, 

 I am not completely convinced to convert my config to org/babel but
 I am not oppose either. Not sure, if there are that many advantages,
 that it is worth my effort, that's all.

its a bit like writing with LaTeX - in some simpler but common cases its
just great to write your stuff in Org and simply press a few keys for
the LaTeX export. But dealing with LaTeX AND Org-mode when writing a big
complex document might not be such a good idea, there will be enough
problems with LaTeX only. 

I must admit I went back from Org-based multi-file config to a single
big .el init file because of two reasons:

- I frequently found myself looking for stuff in the tangled .el files
  instead of the .org files, because I was only interested in the lisp
  code and did not want to see all those comments in the .org files. 
- after figuring out that I can have full outline functionality in .el
  files too, the (in my eyes) main advantage of an org-based config was
  gone. 

Otherwise I really liked the org based starter-kit, it was well
organized and definitely better than what I had before. 

-- 
cheers,
Thorsten