emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [Orgmode] Re: Org-mode with multiple major modes


From: Carsten Dominik
Subject: Re: [Orgmode] Re: Org-mode with multiple major modes
Date: Sun, 30 Sep 2007 16:10:31 +0200


On Sep 29, 2007, at 23:26, Julien Barnier wrote:

Hi,

(setq org-startup-folded nil)

Thanks for your answer, but it doesn't do what I wish. If I have some
part of my file folded and others not, with org-startup-folded set to
nil, when I move from a code chunk to a doc chunk, everything is
unfolded.

This is a different issue, and happens because is because outline-mode
pushes a `show-all' onto `change-major-mode-hook'.  Normally, this is
a good thing, of course, but not in your case.  So you need to
do something like

(add-hook 'org-mode-hook
   (lambda () (remove-hooK 'change-major-mode-hook 'show-all)))

However, written like this it will *always* be removed, so you need to
program it a bit more complex, with a test that the current buffer is
this is a noweb buffer or somwthing similar.

Hope this helps.

- Carsten



What I'd like is a way to disable this feature, or to enable it only
when I open the file, not when I switch from another mode to org-mode
in the same buffer.

But maybe it is a bit complicated for a minor issue.

Thanks again,

--
Julien



_______________________________________________
Emacs-orgmode mailing list
Remember: use `Reply All' to send replies to the list.
address@hidden
http://lists.gnu.org/mailman/listinfo/emacs-orgmode



--
Carsten Dominik
Sterrenkundig Instituut "Anton Pannekoek"
Universiteit van Amsterdam
Kruislaan 403
NL-1098SJ Amsterdam
phone: +31 20 525 7477





reply via email to

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