all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Better support admonitions blocks
@ 2024-04-04 14:04 JD Smith
  2024-04-04 17:04 ` Ihor Radchenko
  0 siblings, 1 reply; 3+ messages in thread
From: JD Smith @ 2024-04-04 14:04 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 726 bytes --]


Pandoc recently added read/write support <https://github.com/jgm/pandoc/issues/9475> for "admonitions", which are a GFM construct <https://github.com/orgs/community/discussions/16925> already supported by other org-exporters, and on GH in markdown.  This refcard <https://github.com/fniessen/refcard-org-mode?tab=readme-ov-file#base-admonitions> references an org #{begin,end}_{note,warning,tip,caution,important} syntax which pandoc now follows (though it does not support the extra admonitions like danger/error/etc.). 

It would be nice to add org support for these 5 admonition blocks to the C-c C-, org block structure templates, and perhaps allow block face styling for these as well (ala org-src-block-faces).



[-- Attachment #2: Type: text/html, Size: 1121 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Better support admonitions blocks
  2024-04-04 14:04 Better support admonitions blocks JD Smith
@ 2024-04-04 17:04 ` Ihor Radchenko
  2024-04-04 21:35   ` Adam Porter
  0 siblings, 1 reply; 3+ messages in thread
From: Ihor Radchenko @ 2024-04-04 17:04 UTC (permalink / raw)
  To: JD Smith, Adam Porter; +Cc: emacs-orgmode

JD Smith <jdtsmith@gmail.com> writes:

> Pandoc recently added read/write support <https://github.com/jgm/pandoc/issues/9475> for "admonitions", which are a GFM construct <https://github.com/orgs/community/discussions/16925> already supported by other org-exporters, and on GH in markdown.  This refcard <https://github.com/fniessen/refcard-org-mode?tab=readme-ov-file#base-admonitions> references an org #{begin,end}_{note,warning,tip,caution,important} syntax which pandoc now follows (though it does not support the extra admonitions like danger/error/etc.). 
>
> It would be nice to add org support for these 5 admonition blocks to the C-c C-, org block structure templates, and perhaps allow block face styling for these as well (ala org-src-block-faces).

CCing Adam. We recently discussed "highlight" blocks in the context of
WORG publishing.

I do not see much problem adding such blocks, although I am not sure if
we want them by default.

What we may do is to implement something akin link's :export and
:active-func parameters to allow custom fontification and export.
(... and add a new :structure-template parameter to auto-add them to
structure templates)

Then, we can add optional support for all the proposed blocks that will
define how to insert, export, and fontify them.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Better support admonitions blocks
  2024-04-04 17:04 ` Ihor Radchenko
@ 2024-04-04 21:35   ` Adam Porter
  0 siblings, 0 replies; 3+ messages in thread
From: Adam Porter @ 2024-04-04 21:35 UTC (permalink / raw)
  To: Ihor Radchenko, JD Smith; +Cc: emacs-orgmode

Hi Ihor, JD, et al,

On 4/4/24 12:04, Ihor Radchenko wrote:
> JD Smith <jdtsmith@gmail.com> writes:
> 
>> Pandoc recently added read/write support
>> <https://github.com/jgm/pandoc/issues/9475> for "admonitions",
>> which are a GFM construct
>> <https://github.com/orgs/community/discussions/16925> already
>> supported by other org-exporters, and on GH in markdown.  This
>> refcard
>> <https://github.com/fniessen/refcard-org-mode?tab=readme-ov-file#base-admonitions>
>> references an org #{begin,end}_{note,warning,tip,caution,important}
>> syntax which pandoc now follows (though it does not support the
>> extra admonitions like danger/error/etc.).
>> 
>> It would be nice to add org support for these 5 admonition blocks
>> to the C-c C-, org block structure templates, and perhaps allow
>> block face styling for these as well (ala org-src-block-faces).
> 
> CCing Adam. We recently discussed "highlight" blocks in the context
> of WORG publishing.

Thanks.

> I do not see much problem adding such blocks, although I am not sure
> if we want them by default.

I would tend to agree that they probably shouldn't be part of Org's
default configuration (at least, not yet--if they were to become very
widespread in usage, then maybe we could reconsider).

> What we may do is to implement something akin link's :export and 
> :active-func parameters to allow custom fontification and export. 
> (... and add a new :structure-template parameter to auto-add them to 
> structure templates)
> 
> Then, we can add optional support for all the proposed blocks that
> will define how to insert, export, and fontify them.

That would seem good to me.

As far as Worg goes, I'd be in favor of having them available on Worg by 
default; they should be useful for writing documentation.

Thanks,
Adam


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-04-04 21:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-04 14:04 Better support admonitions blocks JD Smith
2024-04-04 17:04 ` Ihor Radchenko
2024-04-04 21:35   ` Adam Porter

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.