emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@gmail.com>
To: Robert Pluim <rpluim@gmail.com>
Cc: rms@gnu.org,  theophilusx@gmail.com,  eliz@gnu.org,
	monnier@iro.umontreal.ca,  acm@muc.de,  emacs-devel@gnu.org,
	emacs-orgmode@gnu.org
Subject: Cusom special block export, similar org org-link :export parameter (was: Org mode and Emacs)
Date: Wed, 15 Jun 2022 14:13:37 +0800	[thread overview]
Message-ID: <87edzqv4ha.fsf@localhost> (raw)
In-Reply-To: <87zgifxt48.fsf@gmail.com>

Robert Pluim <rpluim@gmail.com> writes:

>     Ihor> However, we have special blocks for this purpose. They are extendable,
>     Ihor> as I descibed above. Though some improvements in Org core might be
>     Ihor> needed if we have to use this extensibility more frequently.
>
> My first thought here was Org macros, but as far as I can tell they canʼt
> be multi-line, which would make them a bit cumbersome to use. Tell us
> more about special blocks, the documentation on them is a bit sparse.

Macros are meant to configure per-document level of export. Not global,
usually.

Special blocks are Org blocks with the following syntax:

#+begin_environment [optional parameters]
#+end_environment

With "environment" being any word except "center", "quote", "comment",
"example", "export", "src", and "verse".

Currently, latex export directly translates such blocks into
\begin{environment}
\end{environment}

plain text export supports special handling of
environment=justifyleft, justifyright.

html export supports
'("article" "aside" "audio" "canvas" "details" "figcaption"
    "figure" "footer" "header" "menu" "meter" "nav" "output"
    "progress" "section" "summary" "video")
special blocks

texinfo export translates special blocks into
@environment [options]
@end

odt exprot supports "annotation" and "textbox" blocks.

etc.

Because "environment" can be pretty much anything, we can have a
pre-processor in org-export-filter-parse-tree-functions that transforms
different special blocks into appropriate form for a given export
backend (texinfo, latex, ascii, html, etc). This way, we will not have
to rely on backend-specific handling.

Such pre-processor currently does not exist, but it would be fairly
trivial to implement. We may even introduce an interface similar to
org-link-set-parameters for easier configuration of various types of
special blocks.

WDYT?

Best,
Ihor



      parent reply	other threads:[~2022-06-15  6:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <YpuV9DKe9kzNt5np@ACM>
     [not found] ` <871qw31ois.fsf@yahoo.com>
     [not found]   ` <8735gj4ceo.fsf@gnu.org>
     [not found]     ` <87ee038ipt.fsf@gmx.de>
     [not found]       ` <87o7z61v59.fsf@gmail.com>
     [not found]         ` <Yp3l+rjJ0mAIcVZJ@ACM>
     [not found]           ` <87bkv527p5.fsf@gmail.com>
     [not found]             ` <835yld93w7.fsf@gnu.org>
     [not found]               ` <877d5t0yrn.fsf@gmail.com>
     [not found]                 ` <Yp92eI2pEuc/gQu4@ACM>
     [not found]                   ` <jwvtu8wbbjb.fsf-monnier+emacs@gnu.org>
     [not found]                     ` <87r140yuof.fsf@gmail.com>
     [not found]                       ` <E1nzQh5-0001OB-22@fencepost.gnu.org>
     [not found]                         ` <875yl9e7zm.fsf@gmail.com>
     [not found]                           ` <83czfh12kp.fsf@gnu.org>
     [not found]                             ` <87pmjhghu2.fsf@localhost>
     [not found]                               ` <835yl910gp.fsf@gnu.org>
     [not found]                                 ` <87wndndbhq.fsf@gmail.com>
     [not found]                                   ` <83bkuzznws.fsf@gnu.org>
     [not found]                                     ` <877d5mqmkh.fsf@localhost>
     [not found]                                       ` <E1o0sgC-0000jg-U3@fencepost.gnu.org>
2022-06-14  0:43                                         ` Org mode and Emacs (was: Convert README.org to plain text README while installing package) Ihor Radchenko
2022-06-15  5:58                                           ` Ihor Radchenko
2022-06-16 10:05                                             ` Tom Gillespie
2022-06-18 10:56                                               ` Simplified Org mode for newcomer Emacs veterans (was: Org mode and Emacs (was: Convert README.org to plain text README while installing package)) Ihor Radchenko
2022-06-18 22:04                                                 ` Tim Cross
2022-06-19  8:49                                                   ` Ihor Radchenko
2022-06-17  6:42                                             ` Org syntax compatibility with texinfo syntax " Ihor Radchenko
     [not found]                                   ` <E1o0Bgv-0008SK-Gs@fencepost.gnu.org>
     [not found]                                     ` <874k0qbrhe.fsf@localhost>
     [not found]                                       ` <E1o0WEH-0004wk-Hw@fencepost.gnu.org>
     [not found]                                         ` <87v8t3wfgd.fsf@localhost>
     [not found]                                           ` <87zgifxt48.fsf@gmail.com>
2022-06-15  6:13                                             ` Ihor Radchenko [this message]

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=87edzqv4ha.fsf@localhost \
    --to=yantar92@gmail.com \
    --cc=acm@muc.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    --cc=rpluim@gmail.com \
    --cc=theophilusx@gmail.com \
    /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).