From mboxrd@z Thu Jan 1 00:00:00 1970 From: Carsten Dominik Subject: Re: Re: Org-mode with multiple major modes Date: Sun, 30 Sep 2007 16:10:31 +0200 Message-ID: References: <87ir5vyxcs.fsf@ens-lsh.fr> <20070928102646.GA2518@atlantic.linksys.moosehall> <87abr7yqxo.fsf@ens-lsh.fr> <899c3924f4334afc19938765504b17ac@science.uva.nl> <87y7epb1tj.fsf@gnugnus.org> Mime-Version: 1.0 (Apple Message framework v624) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IbzV9-00087w-Sa for emacs-orgmode@gnu.org; Sun, 30 Sep 2007 10:10:31 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IbzV9-00086s-4Z for emacs-orgmode@gnu.org; Sun, 30 Sep 2007 10:10:31 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IbzV9-00086j-0l for emacs-orgmode@gnu.org; Sun, 30 Sep 2007 10:10:31 -0400 Received: from korteweg.uva.nl ([146.50.98.70]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IbzV9-0001oM-3O for emacs-orgmode@gnu.org; Sun, 30 Sep 2007 10:10:31 -0400 In-Reply-To: <87y7epb1tj.fsf@gnugnus.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Julien Barnier Cc: emacs-orgmode@gnu.org 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. > Emacs-orgmode@gnu.org > 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