Nicolas Goaziou <n.goaz...@gmail.com> writes:

> Hello,
>
> In the following example (latest Org), with point at "|", when TAB is
> pressed, block gets hidden at the "name" level.
>
> |#+name: test
> #+begin_src emacs-lisp
> "test"
> #+end_src
>
> It is because `org-babel-result-regexp' is matched in
> `org-babel-hide-result-toggle-maybe'. But, should it be the case?
>
> In particular, if I look at `org-babel-data-names', upon which
> `org-babel-result-regexp' is built, I'm not sure that "name" keyword
> should define a result line. As such, I would guess that it should be
> removed from that list.
>

Hi Nicolas,

"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

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, however if
others do, it wouldn't be difficult to insert a check for a special case
in the code that hides results to inhibit the behavior if the data
following "name" happens to be a code block.

Best -- Eric

>
>
> Regards,

-- 
Eric Schulte
http://cs.unm.edu/~eschulte/

Reply via email to