[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] Re: org-style folding for a .emacs
From: |
Sébastien Vauban |
Subject: |
[Orgmode] Re: org-style folding for a .emacs |
Date: |
Tue, 14 Jul 2009 13:55:20 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.94 (gnu/linux) |
Hello Michael,
>> Does anyone have a recipe for easy org-style folding of an elisp file? I'd
>> like to divide my .emacs into segments to make it easier to oversee and
>> navigate.
I asked myself this question a couple of days ago. Telepathy. For real.
Good it has been asked, and answered.
In my case, I am very interested as well by the literate programming approach.
But I will comment on this later.
> In summary, add the following to your ~/.emacs.el:
>
> (defun th-outline-regexp ()
> "Calculate the outline regexp for the current mode."
> (let ((comment-starter (replace-regexp-in-string
> "[[:space:]]+" "" comment-start)))
> (when (string= comment-start ";")
> (setq comment-starter ";;"))
> (concat "^" comment-starter "\\*+")))
>
> (defun th-outline-minor-mode-init ()
> (interactive)
> (setq outline-regexp (th-outline-regexp)))
>
> (add-hook 'outline-minor-mode-hook
> 'th-outline-minor-mode-init)
>
> and add the following as the top line of your ~/.emacs.el:
>
> ; -*- mode: emacs-lisp; mode: outline-minor; -*-
>
> Now you can add ;;* and ;;**, etc as headings in your .emacs.el and
> cycle using M-tab, M-left and M-right will collapse or expand all
> headings respectively. I am guessing you mean to make segments such as
> ;;* SHORTCUTS and ;;* VARIABLES, this will do that, but not too much
> more.
Done.
Though, is there a way to get the font used for org-levels in the Emacs config
file? That would really greatly improve the readability, then!
Best regards,
Seb
--
Sébastien Vauban
- [Orgmode] org-style folding for a .emacs, Scot Becker, 2009/07/13
- Re: [Orgmode] org-style folding for a .emacs, Eric S Fraga, 2009/07/13
- Re: [Orgmode] org-style folding for a .emacs, Dan Davison, 2009/07/13
- Re: [Orgmode] org-style folding for a .emacs, Scot Becker, 2009/07/14
- Re: [Orgmode] org-style folding for a .emacs, Eric Schulte, 2009/07/15
- [Orgmode] Re: org-style folding for a .emacs, Sébastien Vauban, 2009/07/15
- Re: [Orgmode] Re: org-style folding for a .emacs, Eric Schulte, 2009/07/16
- [Orgmode] Re: org-style folding for a .emacs, Sébastien Vauban, 2009/07/28
- Re: [Orgmode] Re: org-style folding for a .emacs, Eric Schulte, 2009/07/31
Re: [Orgmode] org-style folding for a .emacs, Michael Zeller, 2009/07/14
- [Orgmode] Re: org-style folding for a .emacs,
Sébastien Vauban <=
Re: [Orgmode] org-style folding for a .emacs, Daniel Clemente, 2009/07/15
Re: [Orgmode] org-style folding for a .emacs, Bastien, 2009/07/16