From: Adriaan Sticker <adriaan.sticker@gmail.com>
To: John Kitchin <jkitchin@andrew.cmu.edu>
Cc: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>,
Instructor account <instructor@andrew.cmu.edu>
Subject: Re: auto hiding src blocks upon toggling headers
Date: Thu, 9 Oct 2014 11:11:40 +0200 [thread overview]
Message-ID: <CAOrF+Ny_G0q008YP=P-kdyoxD2Q4gUNKqUcxQHnP0RMoPOjRaA@mail.gmail.com> (raw)
In-Reply-To: <m24mvef873.fsf@vpn-128-237-144-17.library.vpn.cmu.edu>
[-- Attachment #1: Type: text/plain, Size: 1257 bytes --]
Works perfectly!
thanks!
2014-10-09 1:33 GMT+02:00 John Kitchin <jkitchin@andrew.cmu.edu>:
> Sorry for the weird from email below. This was from me. I have a
> separate email setup in Emacs for a class I am teaching.
>
> Instructor account <instructor@andrew.cmu.edu> writes:
>
> > Adriaan Sticker <adriaan.sticker@gmail.com> writes:
> >
> > This is not perfect but it seems close:
> >
> > #+BEGIN_SRC emacs-lisp
> > (defun my-hide (state)
> > (message "%s" state)
> > (if (or (eq state 'children)
> > (eq state 'subtree))
> > (save-restriction
> > (org-narrow-to-subtree)
> > (org-hide-block-all))))
> >
> > (add-hook 'org-cycle-hook 'my-hide)
> > #+END_SRC
> >
> >
> >
> >
> >> Hi all
> >>
> >> Is there a way to automatically hide a source block when toggling the
> >> fold status of the parent header.
> >>
> >> Currently the hide status is remembered when folding its parent
> >> headers but this turned out not to be to practical in my current
> >> workflow.
> >>
> >> Greetings
> >>
>
> --
> -----------------------------------
> John Kitchin
> Professor
> Doherty Hall A207F
> Department of Chemical Engineering
> Carnegie Mellon University
> Pittsburgh, PA 15213
> 412-268-7803
> http://kitchingroup.cheme.cmu.edu
>
[-- Attachment #2: Type: text/html, Size: 2142 bytes --]
prev parent reply other threads:[~2014-10-09 9:11 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-08 13:26 auto hiding src blocks upon toggling headers Adriaan Sticker
2014-10-08 18:27 ` Instructor account
2014-10-08 23:33 ` John Kitchin
2014-10-09 9:11 ` Adriaan Sticker [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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAOrF+Ny_G0q008YP=P-kdyoxD2Q4gUNKqUcxQHnP0RMoPOjRaA@mail.gmail.com' \
--to=adriaan.sticker@gmail.com \
--cc=emacs-orgmode@gnu.org \
--cc=instructor@andrew.cmu.edu \
--cc=jkitchin@andrew.cmu.edu \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.