emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* How to customize the heading definition in org-mode
@ 2012-11-09 20:57 Avner Moshkovitz
  2012-11-10 10:38 ` Memnon Anon
  0 siblings, 1 reply; 4+ messages in thread
From: Avner Moshkovitz @ 2012-11-09 20:57 UTC (permalink / raw)
  To: emacs-orgmode@gnu.org; +Cc: avner.moshkovitz@gmail.com, avner@telus.net

[-- Attachment #1: Type: text/plain, Size: 881 bytes --]

Hello,

I want to use a lisp file (the .emacs file) in org-mode. This will help me to navigate through sections of the .emacs configuration file.
To do this I will need to customize the heading and change it from '*' to e.g. ';' (or else my .emacs file will fail to load.)

I noticed that in outline-mode there is an option to customize the heading definition.
I looked for an equivalent to this in org-mode but couldn't find a way to customize the heading definition.
Is there a way to do so?

Regards,

Avner Moshkovitz

________________________________
This e-mail may contain information that is privileged, confidential or otherwise exempt from disclosure under applicable laws. Unauthorized use, reproduction or dissemination of the e-mail is strictly prohibited. If you have received this e-mail in error, please contact the sender immediately. [11EABB509DF]

[-- Attachment #2: Type: text/html, Size: 3330 bytes --]

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

* Re: How to customize the heading definition in org-mode
  2012-11-09 20:57 How to customize the heading definition in org-mode Avner Moshkovitz
@ 2012-11-10 10:38 ` Memnon Anon
  2012-11-10 15:58   ` David Rogers
  0 siblings, 1 reply; 4+ messages in thread
From: Memnon Anon @ 2012-11-10 10:38 UTC (permalink / raw)
  To: emacs-orgmode

Hi,

Avner Moshkovitz <avnermoshkovitz@lighthausvci.com> writes:

> I want to use a lisp file (the .emacs file) in org-mode. This will
> help me to navigate through sections of the .emacs configuration file.

I do so with the following setup:

I have a minimal init.el file in my ~/.emacs.d directory.
It basically looks like this:

--8<---------------cut here---------------start------------->8---
(require 'cl)

;; Load Path to org and babel
(setq load-path (cons "path/to/elisp/org-latest/lisp" load-path))
(setq load-path (cons "path/to/elisp/org-latest/contrib/lisp" load-path))
(setq load-path (cons "path/to/elisp/org-latest/contrib/babel/lisp" load-path))

;; modules got to be set _before_ org is loaded
(setq org-modules '(org-bbdb org-bibtex org-gnus org-info org-jsinfo 
                    org-irc org-vm org-w3m org-crypt org-learn
                    org-collector org-habit org-depend org-timer))

;; load up Org-mode and Org-babel
(require 'org)
;;(require 'org-babel-init)

;; Load my .emacs
(org-babel-load-file "path/to/emacs.org")
--8<---------------cut here---------------end--------------->8---

That last org-babel-load-file bit actually loads my other settings.
(see http://memnon.sdf-eu.org/emacs.html
     http://memnon.sdf-eu.org/emacs.org for an example)

> I looked for an equivalent to this in org-mode but couldn't find a way
> to customize the heading definition.
>
> Is there a way to do so?

AFAIK, the * is a fixed part of the org syntax and is not customizable.

hth
Memnon

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

* Re: How to customize the heading definition in org-mode
  2012-11-10 10:38 ` Memnon Anon
@ 2012-11-10 15:58   ` David Rogers
  2012-11-12  1:42     ` Darlan Cavalcante Moreira
  0 siblings, 1 reply; 4+ messages in thread
From: David Rogers @ 2012-11-10 15:58 UTC (permalink / raw)
  To: emacs-orgmode

On Sat, 10 Nov 2012 10:38:41 +0000 (UTC)
Memnon Anon <gegendosenfleisch@googlemail.com> wrote:

> Avner Moshkovitz <avnermoshkovitz@lighthausvci.com> writes:

> > I looked for an equivalent to this in org-mode but couldn't find a
> > way to customize the heading definition.
> >
> > Is there a way to do so?
> 
> AFAIK, the * is a fixed part of the org syntax and is not
> customizable.

Yes, there was a discussion here not so long ago - the result of the
discussion was (and I'm only paraphrasing) "It's true there is no way to
change it, and we're intentionally keeping it that way to prevent
needless complexity in org-mode".

-- 
David

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

* Re: How to customize the heading definition in org-mode
  2012-11-10 15:58   ` David Rogers
@ 2012-11-12  1:42     ` Darlan Cavalcante Moreira
  0 siblings, 0 replies; 4+ messages in thread
From: Darlan Cavalcante Moreira @ 2012-11-12  1:42 UTC (permalink / raw)
  To: David Rogers; +Cc: emacs-orgmode

At Sat, 10 Nov 2012 07:58:40 -0800,
David Rogers wrote:

But for this specific need (organizing the Emacs configuration with
org-mode), there is really no need for changing the headline
definition. You instead change your Emacs configuration to 'real' org-mode
files with the actual configuration inside Emacs-lisp src blocks. This is
much more powerful. As Memnon Anon mentioned, you only need a minimal
configuration in your init.el file and the rest can go all in one or more
org files that you load with org-babel-load-file.

I have converted my configuration to an org-mode file a good time ago and I
can tell you it is VERY worth the time invested. You can benefit from all
org-mode features. What org-babel-load-file does is tangling all of the
Emacs-lisp src blocks (only emacs-lisp blocks) to an Emacs lisp file and
then load that file. The org-babel-load-file function is smart enough to
only tangle the org file if something has changed. Therefore the delay
caused by the tangle process only happens when you change something.

A bonus side effect of this tangling process is that you can disable a
whole part of your Emacs configuration easily simple by setting the
'TANGLE' property of a headline containing the source blocks you want to
disable to 'no'.

--
Darlan

> 
> On Sat, 10 Nov 2012 10:38:41 +0000 (UTC)
> Memnon Anon <gegendosenfleisch@googlemail.com> wrote:
> 
> > Avner Moshkovitz <avnermoshkovitz@lighthausvci.com> writes:
> 
> > > I looked for an equivalent to this in org-mode but couldn't find a
> > > way to customize the heading definition.
> > >
> > > Is there a way to do so?
> > 
> > AFAIK, the * is a fixed part of the org syntax and is not
> > customizable.
> 
> Yes, there was a discussion here not so long ago - the result of the
> discussion was (and I'm only paraphrasing) "It's true there is no way to
> change it, and we're intentionally keeping it that way to prevent
> needless complexity in org-mode".
> 
> -- 
> David
> 

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

end of thread, other threads:[~2012-11-12  1:42 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-09 20:57 How to customize the heading definition in org-mode Avner Moshkovitz
2012-11-10 10:38 ` Memnon Anon
2012-11-10 15:58   ` David Rogers
2012-11-12  1:42     ` Darlan Cavalcante Moreira

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).