emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Johan Bolmsjö" <org-mode@johan.bitmaster.se>
To: emacs-orgmode@gnu.org
Subject: Re: [BUG] ox-html does not export captions of source blocks without language
Date: Wed, 14 Dec 2022 23:05:11 +0100	[thread overview]
Message-ID: <8d77438d-cde2-489d-9982-7c09b520b6c0@app.fastmail.com> (raw)
In-Reply-To: <CAFyQvY3L4rukp1tzT84HWwHj_usLTP7zkYJb54B+5+12ESbQdA@mail.gmail.com>

On Wed, Dec 14, 2022, at 22:51, Kaushal Modi wrote:
> On Wed, Dec 14, 2022, 4:44 PM Johan Bolmsjö <org-mode@johan.bitmaster.se> wrote:
>> The caption "Caption 1" is not exported by ox-html in the following
>> source block.
>> 
>> #+caption: Caption 1
>> #+begin_src
>> foo bar baz
>> #+end_src
> 
> The begin_src block always requires a "language" as far as I know. If you don't want to specify a language, you can use #+begin_example instead. 
> 
> You can even do "#+begin_src text".
> 
> It's a different issue as to why you are seeing a different behavior between the two exporters. 

Okay, the manual confirms that the language is mandatory.
https://orgmode.org/manual/Structure-of-Code-Blocks.html

"#+begin_src text" exports the caption with both ox-html and ox-ascii.
"#+begin_example" export the caption with neither ox-html nor ox-ascii.

So the only discrepancy is how the two exporters handles this non-conforming source block.


  reply	other threads:[~2022-12-14 22:06 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-14 21:40 [BUG] ox-html does not export captions of source blocks without language Johan Bolmsjö
2022-12-14 21:51 ` Kaushal Modi
2022-12-14 22:05   ` Johan Bolmsjö [this message]
2022-12-15  9:31 ` [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language) Ihor Radchenko
2022-12-15 10:32   ` Kaushal Modi
2022-12-15 11:32   ` Max Nikulin
2022-12-15 14:29     ` Tim Cross
2022-12-15 15:07       ` Ihor Radchenko
2022-12-17  5:17         ` Tom Gillespie
2022-12-18  1:33           ` Tim Cross
2022-12-17 14:47         ` [Syntax discussion] Should we treat src blocks without LANG as paragraphs? Max Nikulin
2022-12-18 13:35           ` [BUG] org-latex-src-block-backend is directly used as variable instead of querying export option (was: [Syntax discussion] Should we treat src blocks without LANG as paragraphs?) Ihor Radchenko
2022-12-18 13:40             ` Timothy
2022-12-21 12:14               ` Ihor Radchenko
2022-12-27 14:18           ` [FR] Present list of errors in separate buffer when running org-export, similar to what org-lint does " Ihor Radchenko
2022-12-27 18:39             ` Tim Cross
2022-12-17  9:56     ` [Syntax discussion] Should we treat src blocks without LANG as paragraphs? (was: [BUG] ox-html does not export captions of source blocks without language) Ihor Radchenko
2022-12-15 13:32   ` Timothy
2022-12-27 14:08 ` [BUG] ox-html does not export captions of source blocks without language Ihor Radchenko
2023-01-16 10:09   ` Ihor Radchenko
2023-01-16 10:31     ` [ANN] orgtbl-fit tbanelwebmin
2023-01-24 19:55       ` Ihor Radchenko
2023-01-25 15:02         ` tbanelwebmin
2023-01-26 10:35           ` Ihor Radchenko
2023-01-26 19:13             ` tbanelwebmin
2023-02-20 10:50               ` Ihor Radchenko
2023-03-01 11:48                 ` tbanelwebmin
2023-03-03 15:13                   ` Ihor Radchenko
2023-03-05 18:46                     ` tbanelwebmin
2023-01-23 13:32     ` [BUG] ox-html does not export captions of source blocks without language 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=8d77438d-cde2-489d-9982-7c09b520b6c0@app.fastmail.com \
    --to=org-mode@johan.bitmaster.se \
    --cc=emacs-orgmode@gnu.org \
    /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).