emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: Ihor Radchenko <yantar92@posteo.net>
Cc: "João Pedro" <jpedrodeamorim@gmail.com>, emacs-orgmode@gnu.org
Subject: Re: Possible to set block switches "globally"?
Date: Fri, 3 May 2024 10:12:21 -0700	[thread overview]
Message-ID: <CA+G3_PPfxQwg09kt52jcNY+XzV+u-m-N8A+bDyiZO3248ZxGXQ@mail.gmail.com> (raw)
In-Reply-To: <87a5l7t7i0.fsf@localhost>

Hi,
   Thanks for getting things going on this again João.

Based on what is in org-element-example-block-parser
and org-element-src-block-parser I think

:number-lines (yes|no|continue) as João proposes
:indent           (preserve|align|???) not sure about naming
:labels          (link|keep|remove|remove-whitespace)
:label-format  regexp-string

Defaults would be :number-lines no, :indent align,
:labels remove-whitespace and :label-format would
inherit from the default.

The remove-whitespace option would remove the label
itself along with any whitespace leading up to it, this
avoids the user needing to specify the leading whitespace
in :label-format. The remove option by itself is retained
in the event that someone has aligned their labels and
wants to retain the whitespace. This may be too complex
though and remove-whitespace is not needed because
:label-format can be modified as needed.

Header arguments need to have a single value, so I think
we should split :labels and :label-format, that way users
can also specify :label-format without having to specify
:labels first (otherwise there is ambiguity about what a single
argument :labels means.

Best,
Tom


  reply	other threads:[~2024-05-03 17:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-29  2:07 Possible to set block switches "globally"? João Pedro
2024-04-29 17:34 ` Ihor Radchenko
2024-05-02 19:16   ` João Pedro
2024-05-03 12:17     ` Ihor Radchenko
2024-05-03 17:12       ` Tom Gillespie [this message]
2024-05-04  3:04         ` João Pedro
2024-05-04 12:19           ` Ihor Radchenko
2024-05-04 20:57             ` Tom Gillespie
  -- strict thread matches above, loose matches on Subject: below --
2024-04-29  2:07 João Pedro

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=CA+G3_PPfxQwg09kt52jcNY+XzV+u-m-N8A+bDyiZO3248ZxGXQ@mail.gmail.com \
    --to=tgbugs@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=jpedrodeamorim@gmail.com \
    --cc=yantar92@posteo.net \
    /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).