[Top][All Lists]

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

Re: [O] [BUG] Inconsistency in src block hiding

From: Nicolas Goaziou
Subject: Re: [O] [BUG] Inconsistency in src block hiding
Date: Sat, 28 Jan 2012 17:08:00 +0100


Eric Schulte <address@hidden> 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
- 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?


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

Nicolas Goaziou

reply via email to

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