Robert Nikander <robert.nikan...@icloud.com> writes:

> I started reading about “blocks" in the manual. I wanted a chunk of text that 
> I could hide, so I tried this:
>
> * Test
> Some text
> #+BEGIN 
> Hide this
> #+END
>
> Hitting TAB on the BEGIN line does nothing. But if I add a blank line before 
> it,
> then hitting TAB hides and shows the block. Is that a bug? Or am I doing it
> wrong? Seems like it should work without the blank line.
>
> * Test
> Some text
>
> #+BEGIN 
> Hide this
> #+END
>
> M-x org-version => 9.5.1.

The problem here is that your blocks are not correctly specified. If you
run M-x org-lint on your example, it will tell you the blocks may not be
correctly specified. You need to tell org what sort of block it is. Org
supports a number of different block types, such as source code blocks
(#+begin_src/#+end_src), example blocks (#+begin_example/#+end_example),
centred blocks (#+begin_center/#+end_center) etc. You can use C-c C-, to
run the command org-insert-structured-template to select the block type.
If you first highlight the region, it will be wrapped in the block you
select.


Reply via email to