From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: [BUG] Inconsistency in src block hiding Date: Sun, 20 Nov 2011 20:33:21 +0100 Message-ID: <87bos6pp1a.fsf@gmail.com> References: <8739djqfkv.fsf@gmail.com> <87fwhiwwr0.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:48760) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSDAI-0004VB-TH for emacs-orgmode@gnu.org; Sun, 20 Nov 2011 14:35:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RSDAH-0006V9-QG for emacs-orgmode@gnu.org; Sun, 20 Nov 2011 14:34:58 -0500 Received: from mail-ww0-f41.google.com ([74.125.82.41]:43699) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RSDAH-0006V1-Jo for emacs-orgmode@gnu.org; Sun, 20 Nov 2011 14:34:57 -0500 Received: by wwf25 with SMTP id 25so4210459wwf.0 for ; Sun, 20 Nov 2011 11:34:56 -0800 (PST) In-Reply-To: <87fwhiwwr0.fsf@gmail.com> (Eric Schulte's message of "Sun, 20 Nov 2011 08:53:53 -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: Org Mode List Eric Schulte writes: > "name" is and should be an element of the `org-babel-data-names' list as > it is the preferred way to name data in an Org-mode file, e.g., > > #+name: foo > - 1 > - 2 > - 3 I agree. > The only reason that "tblname" and "results" are included in the list > are because "tblname" is used by other parts of Org-mode, and "results" > was retained because it was felt that a "name" line without an actual > name (e.g., as the results of an un-named code block) would look funny. > > I don't view the "results style" hiding as inconsistent It is inconsistent when keywords stack on top of each other. If you have only a "#+name:" keyword, block with fold at the "#+name:" level. If you have both "#+name:" and, for example "#+results" below, block will fold at the "#+result:" level and TAB will not respond at "#+name:". If you have, from top to bottom, "name", "results" "header", nothing will fold. In all those cases, I think a consistent behaviour could be to hide the block, with any number of keywords above, and TAB pressed at any of them. I'm not sure that "#+results:" or "#+name:" keywords should allow to hide whole parts of the buffer. I realize that toggling "#+results:" visibility has been in core for a while. But now that every Org blob can have a "#+name" attached to it, one can hide almost anything in the buffer. Until now we could hide contents with headlines, blocks, drawers, and items (with an option to prevent it). And we had a global mechanism to handle visibility toggling just fine (namely S-TAB with different numbers of prefixes). But hiding independently each list, table or paragraph with no possibility to make them appear in groups just doesn't sound right. Hence, I suggest to think again about it: we can live happily with outlines, blocks and drawers as folding entities. Moreover, there is another problem related to that. `org-export-blocks-preprocess' will remove all "#+name:" keywords in the buffer. It mustn't: again "#+name:" is a general naming mechanism for almost any Org syntax. It may/will be also used for other purpose than Babel. That information is important even after blocks have been processed. Regards, -- Nicolas Goaziou