[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Suspected bug: example block in a footnote doesn't fold if starts wi
From: |
Ihor Radchenko |
Subject: |
Re: Suspected bug: example block in a footnote doesn't fold if starts with 2 blank lines |
Date: |
Wed, 31 Aug 2022 09:57:00 +0800 |
Alain.Cochard@unistra.fr writes:
> Hello. When I visit an org buffer containing only:
>
> foo[fn:1]
>
> [fn:1] bar
> #+begin_example
>
>
> x
> #+end_example
>
> then, hitting <TAB> when the cursor is on either '#' does nothing
> (i.e., no folding).
This is not a bug. Just unintuitive syntax:
https://orgmode.org/manual/Creating-Footnotes.html#Creating-Footnotes
>> A footnote is started by a footnote marker in square brackets in
>> column 0, no indentation allowed. It ends at the next footnote
>> definition, headline, or after two consecutive empty lines. The
>> footnote reference is simply the marker in square brackets, inside
>> text. Markers always start with ‘fn:’.
The important part is:
It ends at the next footnote definition, headline, or after two consecutive
empty lines.
So, your example is
foo[fn:1]
<begin footnote-definition>[fn:1] bar
#+begin_example ;; <- this is not considered an example block because no
major org elements can be inside a footnote definition.
<end footnote-definition after two empty lines>
<begin paragraph>x
#+end_example
<end paragraph>
--
Ihor Radchenko,
Org mode contributor,
Learn more about Org mode at https://orgmode.org/.
Support Org development at https://liberapay.com/org-mode,
or support my work at https://liberapay.com/yantar92