emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Matt Price <moptop99@gmail.com>
Cc: Org Mode <emacs-orgmode@gnu.org>
Subject: Re: handling as special special block in derived export
Date: Thu, 20 Jan 2022 09:42:12 -0500	[thread overview]
Message-ID: <CAN_Dec_2atsYa_mznNvtcYmyMOnYXDr--=QikOza6QpRwZpRKQ@mail.gmail.com> (raw)
In-Reply-To: <472D6327-20E1-460E-BB8F-043BD6D94B10@health.ucsd.edu>

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

On Wed, Jan 19, 2022 at 3:56 PM Berry, Charles <ccberry@health.ucsd.edu>
wrote:

> Matt,
>
> > On Jan 19, 2022, at 5:52 AM, Matt Price <moptop99@gmail.com> wrote:
> >
> > However, I'd really like to add a less verbose syntax, like this:
> >
> > #+begin_r-stack :frag (appear appear)
> > [[imglink1]]
> > [[imglink2]]
> > #+end_r-stack
> >
> > My question is: will the exporter preserve information from these
> header-like arguments, and is
> > there a mechanism I can use in a custom ~special-block-function~ to make
> use of htem?
> >
>
> Not as you have it there, but
>
> #+header: :frag (appear appear)
> #+begin_r-stack
> [[imglink1]]
> [[imglink2]]
> #+end_r-stack
>
>
> parses as
>
> (special-block
>  (:type "r-stack" :begin 727 :end 815 :contents-begin 775 :contents-end
> 801 :post-blank 0 :post-affiliated 759 :header
>         (":frag (appear appear)")
>         :mode nil :granularity element :parent nil))
>
> if that helps.
>

Ah, thank you. I had never used #+header: before.

THis helps a little, but I guess the parser works from the inside out. That
is, the special block contents are already parsed before the block itself.
As a result, I don't see how to add classes to the contents on the basis of
the block headers.  Also, it doesn't seem trivial to identify the "direct
children" of the block, the way one might in javaScript with, say,
~document.querySelectorAll()~.or just ~elem.children()~.   So I'm not
convinced my initial impulse to solve the problem this way will be
fruitful.

>
> Chuck
>

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

      reply	other threads:[~2022-01-20 20:22 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-19 13:52 Matt Price
2022-01-19 17:18 ` John Kitchin
2022-01-20 15:21   ` Matt Price
2022-01-20 16:12     ` John Kitchin
2022-01-21  2:46       ` Matt Price
2022-01-19 20:56 ` Berry, Charles
2022-01-20 14:42   ` Matt Price [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='CAN_Dec_2atsYa_mznNvtcYmyMOnYXDr--=QikOza6QpRwZpRKQ@mail.gmail.com' \
    --to=moptop99@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    --subject='Re: handling as special special block in derived export' \
    /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

Code repositories for project(s) associated with this 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).