emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Carsten Dominik <dominik@science.uva.nl>
To: Julien Barnier <julien@no-log.org>
Cc: emacs-orgmode@gnu.org
Subject: Re: Re: Org-mode with multiple major modes
Date: Sun, 30 Sep 2007 16:10:31 +0200	[thread overview]
Message-ID: <ea7ea735adbcc8db2bd71dedb826ae75@science.uva.nl> (raw)
In-Reply-To: <87y7epb1tj.fsf@gnugnus.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

      reply	other threads:[~2007-09-30 14:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-28  9:04 Org-mode with multiple major modes Julien Barnier
2007-09-28 10:26 ` Adam Spiers
2007-09-28 11:23   ` Julien Barnier
2007-09-29 12:49     ` Carsten Dominik
2007-09-29 21:26       ` Julien Barnier
2007-09-30 14:10         ` Carsten Dominik [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea7ea735adbcc8db2bd71dedb826ae75@science.uva.nl \
    --to=dominik@science.uva.nl \
    --cc=emacs-orgmode@gnu.org \
    --cc=julien@no-log.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).