emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nicolas Goaziou <n.goaziou@gmail.com>
To: Eric Schulte <eric.schulte@gmx.com>
Cc: Rick Frankel <rick@rickster.com>, emacs-orgmode@gnu.org
Subject: Re: [BUG] Inconsistency in src block hiding
Date: Sat, 28 Jan 2012 17:08:00 +0100	[thread overview]
Message-ID: <871uqjresf.fsf@gmail.com> (raw)
In-Reply-To: <87k44hn4uz.fsf@gmx.com> (Eric Schulte's message of "Mon, 23 Jan 2012 20:41:48 -0700")

Hello,

Eric Schulte <eric.schulte@gmx.com> writes:

> To my mind a better path moving forward would be to change the behavior
> of the :RESULTS: drawer so that it is exported but *not* to change the
> default drawer export behavior.  This way with a :wrap header argument
> the code block results could be hidden with tab but would still be
> exported.
>
>    PRO: allows hiding code block results with tab, makes it clear where
>         results begin and end, uses drawers for hiding which is what
>         they are designed for, avoids the potential for hiding anything
>         with a name
>
>    CON: more syntactic weight around results, changes the existing
>         default behavior, makes the "RESULTS" drawer a special type of
>         drawer

While implementing a recent patch about drawers insertion, I realized my
current view about drawers had a flaw. Indeed, while I had correctly put
aside properties drawers, which are very different from regular drawers,
I had overlooked special drawers like LOGBOOK and CLOCK.

Those drawers are different from regular drawers, since they are
attached to an headline (this is not the case of a RESULTS drawer), and
as such should be classified in another category.

Therefore, I suggest the following fixed behaviour with regards to
export for drawers:

- Properties drawers :: Still ignored in export, independently on "d"
     option or `org-export-with-drawers' value. Obviously, back-end can
     ignore this specification, but it should be followed by major ones.

- Special drawers :: Not exported by default. Though, their export can
     be configured with a new "sd" option item (i.e. "sd:t") or
     `org-export-with-special-drawers' variable. This category only
     includes LOGBOOK[1] and CLOCK drawers at the moment.

     If their export is activated, the special
     `org-backend-format-drawer-function' (i.e.
     `org-e-latex-format-drawer-function') can allow to tweak their
     output.
     
- Regular drawers :: Exported by default. "d:nil" turns that off. This
     category includes RESULTS drawers and every user created drawer.
     `org-backend-format-drawer-function' still can help tweaking their
     output. Thus, it can be used to filter out some types of drawers.

With that model, drawers will be able to fill a niche by allowing to
hide data in an Org buffer while still wanting to export it.

As a reminder, currently with "d:nil", drawers are redundant
with #+begin_comment blocks, and with "d:t" they are redundant
with #+begin_example blocks. "d:'(some names)" is just a mix of comment
and example blocks.

Note that it has the same advantages as your suggestion.

What do you think?


Regards,

[1] Or whatever the user specified in `org-log-into-drawer'.

-- 
Nicolas Goaziou

  parent reply	other threads:[~2012-01-28 16:10 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-20 10:00 [BUG] Inconsistency in src block hiding Nicolas Goaziou
2011-11-20 15:53 ` Eric Schulte
2011-11-20 19:33   ` Nicolas Goaziou
2011-11-21 18:24     ` Eric Schulte
2011-11-22 16:15       ` Eric Schulte
2011-11-22 18:19       ` Nicolas Goaziou
2011-11-22 23:23         ` Eric Schulte
2011-11-23 15:25           ` Nicolas Goaziou
2011-11-28  8:09             ` Eric Schulte
2011-12-11 13:53               ` Bastien
2011-12-11 14:08                 ` Nicolas Goaziou
2011-12-11 16:25                   ` Eric Schulte
2011-12-11 16:04                 ` Eric Schulte
2011-12-11 17:04                   ` Bastien
2012-01-17  2:26                   ` Bernt Hansen
2012-01-17 17:49                     ` Nicolas Goaziou
2012-01-17 17:59                       ` Bernt Hansen
2012-01-18 10:45                         ` Leo Alekseyev
2012-01-18 16:02                           ` Rick Frankel
2012-01-18 16:19                             ` Eric Schulte
2012-01-18 17:36                               ` Nicolas Goaziou
2012-01-19 12:10                                 ` Martyn Jago
2012-01-19 14:48                                   ` Eric Schulte
2012-01-19 15:22                                   ` Rick Frankel
2012-01-19 19:18                                   ` Nicolas Goaziou
2012-01-19 14:41                                 ` Eric Schulte
2012-01-19 19:26                                   ` Nicolas Goaziou
2012-01-24  3:41                                     ` Eric Schulte
2012-01-24  4:23                                       ` Leo Alekseyev
2012-01-24  4:44                                         ` Jambunathan K
2012-01-24  7:59                                       ` Andreas Leha
2012-01-24 20:39                                       ` Nicolas Goaziou
2012-01-28 16:08                                       ` Nicolas Goaziou [this message]
2012-01-25  0:00                         ` Nick Dokos
2012-01-25  2:23                           ` Bernt Hansen

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=871uqjresf.fsf@gmail.com \
    --to=n.goaziou@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=eric.schulte@gmx.com \
    --cc=rick@rickster.com \
    /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).