emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Alain.Cochard@unistra.fr
To: Ihor Radchenko <yantar92@gmail.com>
Cc: alain.cochard@unistra.fr, Org Mode List <emacs-orgmode@gnu.org>
Subject: Re: Suspected bug: example block in a footnote doesn't fold if starts with 2 blank lines
Date: Wed, 31 Aug 2022 14:23:30 +0200	[thread overview]
Message-ID: <25359.21186.842934.778547@gargle.gargle.HOWL> (raw)
In-Reply-To: <87zgflp443.fsf@localhost>

Ihor Radchenko writes on Wed 31 Aug 2022 09:57:

 > This is not a bug. Just unintuitive syntax:
 > [...]
 > 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>

Thanks a lot for answering.

Is there an official definition for "major org element" ? (I could not
find anything relevant in the manual.)

I guess a headline would qualify (and it would not have occurred to me
to use a headline within a footnote; the manual is clear in that
respect anyway).

But then a list item would probably qualify as well?  But, as far as I
can see, lists and footnotes work perfectly well together... (because
2 consecutive empty lines also mark the end of a list item?)

Furthermore, as long as there is not more than one empty line in a
row, blocks also appear to me to work just fine within footnotes,
including upon latex export, and I use things like the following all
the time:

   #+LATEX_HEADER: \usepackage{fancyvrb}
   #+LATEX_HEADER: \VerbatimFootnotes
   foot[fn:1]

   [fn:1] note 
   #+begin_src fortran
	 print*,"foo"
   #+end_src

I simply never had to use 2 consecutive empty lines in blocks up to
now...

So I guess I'll turn my "suspected bug" into a feature request: that
#+BEGIN ... #+END blocks behave the same way whether they are within a
footnote or not.

Regards

-- 
EOST (École et Observatoire des Sciences de la Terre) 
ITE (Institut Terre & Environnement) | alain.cochard@unistra.fr
5 rue René Descartes   [bureau 106]  | Phone: +33 (0)3 68 85 50 44 
F-67084 Strasbourg Cedex, France     | [ slot available for rent ]



  reply	other threads:[~2022-08-31 12:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-30  7:54 Suspected bug: example block in a footnote doesn't fold if starts with 2 blank lines Alain.Cochard
2022-08-31  1:57 ` Ihor Radchenko
2022-08-31 12:23   ` Alain.Cochard [this message]
2022-09-02 12:41     ` Syntax of footnote-definition: can we allow double empty lines inside? (was: Suspected bug: example block in a footnote doesn't fold if starts with 2 blank lines) Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=25359.21186.842934.778547@gargle.gargle.HOWL \
    --to=alain.cochard@unistra.fr \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).