emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orgmode] Re: include file contents in org files?


From: Carsten Dominik
Subject: Re: [Orgmode] Re: include file contents in org files?
Date: Wed, 22 Aug 2007 13:07:52 +0200

On Aug 22, 2007, at 12:54, Rainer Stengele wrote:

Taking the idea a little "around the corner" I wonder if it would be possible to hide everything that begins with a "#" before the first heading. Application: I have my org files under subversion control and carry around this line at the beginning of my files:


# SVN $Revision: 385 $ $Date: 2007-08-21 23:50:43 +0200 (Di, 21 Aug 2007) $

I would like to hide that and similar lines unless showing all with "C-c C-a". Also a possible "#include" line could be hidden. If somebody wants to see the lines - of course - a config option would do it.

Rainer

The easiest way is this:

   * COMMENT setup section
   #+STARTUP: overview
   more stuff that should be hidden

   * The first "real" headline in the file.

Another possibility woud be to use a drawer for this,
for example a SETUP drawer.

   (setq org-drawers '("PROPERTIES" "SETUP"))

Then you could write

   :SETUP:
   #+STARTUP: overview
   more stuff that should be hidden
   :END:

   * The first "real" headline in the file.

All you then need to do is to make sure that the drawer will
be closed when first visiting the file, for example

   (add-hook 'org-mode-hook
      (lambda () (org-cycle-hide-drawers 'all)))

- Carsten





reply via email to

[Prev in Thread] Current Thread [Next in Thread]