all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "João Pedro" <jpedrodeamorim@gmail.com>
To: Tom Gillespie <tgbugs@gmail.com>, Ihor Radchenko <yantar92@posteo.net>
Cc: emacs-orgmode@gnu.org
Subject: Re: Possible to set block switches "globally"?
Date: Sat, 04 May 2024 00:04:27 -0300	[thread overview]
Message-ID: <87ikzu2s78.fsf@ergo> (raw)
In-Reply-To: <CA+G3_PPfxQwg09kt52jcNY+XzV+u-m-N8A+bDyiZO3248ZxGXQ@mail.gmail.com>

Em sexta, 03/05/2024 às 10:12 (-07), Tom Gillespie <tgbugs@gmail.com> escreveu:

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

No problem! I've been meaning to get my feet wet on some Org-mode
hacking for a while now.

> 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

Yeah, as Ihor pointed out I did forget about -i, though I'm not really
sure what that does.

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

Sure, makes sense to separate it.

I tried searching for where switches are parsed in the code, but
couldn't find much. Could you provide me with some pointers and files I
should be looking at?

Cheers,

-- 
João Pedro de A. Paula
IT bachelors at Universidade Federal do Rio Grande do Norte (UFRN)

  reply	other threads:[~2024-05-04  3:10 UTC|newest]

Thread overview: 10+ 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
2024-05-04  3:04         ` João Pedro [this message]
2024-05-04 12:19           ` Ihor Radchenko
2024-05-04 20:57             ` Tom Gillespie
2024-07-10  7:32             ` Ihor Radchenko
  -- 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

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

  git send-email \
    --in-reply-to=87ikzu2s78.fsf@ergo \
    --to=jpedrodeamorim@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=tgbugs@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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.