From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [BUG] Inconsistency in src block hiding Date: Tue, 24 Jan 2012 21:39:00 +0100 Message-ID: <87k44gg7iz.fsf@gmail.com> References: <8739djqfkv.fsf@gmail.com> <87fwhiwwr0.fsf@gmail.com> <87bos6pp1a.fsf@gmail.com> <8739dhnxjs.fsf@gmail.com> <87ipmcxboo.fsf@gmail.com> <87pqgjipu8.fsf@gmail.com> <87y5v6x3lv.fsf@gmail.com> <87fwh86533.fsf@gmail.com> <87ehwbdxk2.fsf@gnu.org> <874nx782wi.fsf@gmx.com> <87lip76p48.fsf@norang.ca> <87d3ai2p98.fsf@gmail.com> <8762ga6whl.fsf@norang.ca> <87pqehrnjv.fsf@gmx.com> <8739bc3ob5.fsf@gmail.com> <87ehuv4la3.fsf@gmx.com> <87ty3r4hop.fsf@gmail.com> <87k44hn4uz.fsf@gmx.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:55308) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpnAw-00027h-7w for emacs-orgmode@gnu.org; Tue, 24 Jan 2012 15:41:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RpnAu-0006Bf-J4 for emacs-orgmode@gnu.org; Tue, 24 Jan 2012 15:41:06 -0500 Received: from mail-we0-f169.google.com ([74.125.82.169]:34337) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RpnAu-0006BX-AE for emacs-orgmode@gnu.org; Tue, 24 Jan 2012 15:41:04 -0500 Received: by wera13 with SMTP id a13so2104194wer.0 for ; Tue, 24 Jan 2012 12:41:03 -0800 (PST) In-Reply-To: <87k44hn4uz.fsf@gmx.com> (Eric Schulte's message of "Mon, 23 Jan 2012 20:41:48 -0700") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Eric Schulte Cc: Rick Frankel , emacs-orgmode@gnu.org Hello, Eric Schulte writes: > Nicolas Goaziou writes: > Changing the default drawer export behavior from "don't export" to "do > export" would be surprising Probably at first, but not for too long. > would break many existing work flows Not at all, since it's just a d:nil away from old behaviour. Note that the current behavour is _not_ a d:t away from what I want to implement. Indeed, even with d:t, you still need to change default handler for drawers (org-export-format-drawer-function) as the default one (org-export-format-drawer) will change drawer's contents into a fixed-width area. For that task, an example block would have achieved the same (hiding + verbatim). > would likely make drawers less useful. Certainly not, but I will that explain later. > In general I think the Org-mode specification is best defined by how > Org-mode is used and how it may be more easily and intuitively used in > the future. Org-mode doesn't currently have a formal specification, and > I think that is a good thing. Formal specification don't prevent bugs, > they just move them from the code to the spec. Then we may be running into problems, since my objective, with org-element, is to provide a formal specification and normalization of Org syntax. Along the way, some parts (hopefully few) in Org syntax will need to be defined or re-defined. Because only a very small number of persons can pretend to know every part of Org syntax and even less (if any) to actually use them, we definitely need guidelines to offer relevant future improvements. Some current uses just don't fit in a global view: a recent example was given by the caption syntax, which was heavily LaTeX oriented. > 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 > > There is likely a better option but this is the best that comes to mind. > Personally I am also content with the current behavior in which anything > under a #+name: may be hidden. Drawers should not add any semantics to the contents they are hiding. They should be, as a default, neutral entities useful to hide stuff in an Org buffer but certainly not to interfere with export. 1. There are already many ways to remove arbitrary contents from export. Among them, one can find the :noexport: tag, comment blocks... There's absolutely no need to add more. 2. They are better handled with regards to visibility cycling, which in not the case of single keywords. Allowing to hide every single Org syntax with a #+name: keyword could potentially be a mess. 3. By essence, drawers are better suited for hiding stuff than keywords, since they allow to group any number of elements, whereas keywords only apply to one keyword at a time. 4. Drawers are flexible. All major back-ends allow to configure behaviour of drawers with regards to export. You can always decide to keep :FOO: drawers transparent but remove any :BAR: drawer. It will be even simpler with the new export engine. On the other hand, I don't think that adding another special type for drawers is the way to go. In general, adding new syntax should be done with parsimony. In this case, it unnecessarilyrestricts possibilities: why enforce a special behaviour for :RESULTS: since (point 4) you can choose it? I still vote for neutral drawers. Regards, -- Nicolas Goaziou