emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Juan Manuel Macías" <maciaschain@posteo.net>
To: Ihor Radchenko <yantar92@gmail.com>
Cc: orgmode <emacs-orgmode@gnu.org>, "Fraga, Eric" <e.fraga@ucl.ac.uk>
Subject: Re: numbering src blocks in HTML export
Date: Wed, 20 Jul 2022 12:07:58 +0000	[thread overview]
Message-ID: <87h73c3s2p.fsf@posteo.net> (raw)
In-Reply-To: <87a6944eqi.fsf@localhost> (Ihor Radchenko's message of "Wed, 20 Jul 2022 11:58:29 +0800")

Ihor Radchenko writes:

> AFAIU, source block switches are never inherited.
> Dear All, may we should provide a normal header arg as an equivalent of
> switches? Honestly, this whole switch syntax sounds unnecessary and only
> over-complicates things.

I think that web pages or documents that contain several code examples
(tutorials, documentation, etc.) tend to unify the style in this regard:
either all examples are line-numbered or all examples are unnumbered;
therefore, if the first option is chosen, it would be good to have some
global setting, when there are many blocks. But I also think this can be
easily achieved with some function locally hooked to
org-export-before-processing-hook. Or even within the document on the

A global 'factory setting' would also have the extra complication that
there would be two global numbering versions (at least): a) a separate
numbering for each block; b) each block continuing the numbering of the
previous block. And there could be a subtype of b) where it is necessary
to restart the numbering when starting a new section. Or a) and b) could
be arbitrarily mixed in the same document. All this seems complicated
to implement...

But one thing that could be nice is to give an option (perhaps with a
prefix argument) for org-babel-demarcate-block (C-c C-v C-d) to inherit
the switches:


#+begin_src emacs-lisp -n

after C-c C-v C-d

#+begin_src emacs-lisp -n

#+begin_src emacs-lisp +n

Best regards,

Juan Manuel 

  parent reply	other threads:[~2022-07-20 12:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 15:00 numbering src blocks in HTML export Fraga, Eric
2022-07-19 15:28 ` Juan Manuel Macías
2022-07-19 16:15   ` Fraga, Eric
2022-07-19 16:18   ` Fraga, Eric
2022-07-20  3:58     ` Ihor Radchenko
2022-07-20  9:14       ` Fraga, Eric
2022-07-20 12:07       ` Juan Manuel Macías [this message]
2022-07-22 14:42       ` Greg Minshall

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:

  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=87h73c3s2p.fsf@posteo.net \
    --to=maciaschain@posteo.net \
    --cc=e.fraga@ucl.ac.uk \
    --cc=emacs-orgmode@gnu.org \
    --cc=yantar92@gmail.com \


* 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


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).