From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id qNx1Mrse6mEPewEAgWs5BA (envelope-from ) for ; Fri, 21 Jan 2022 03:47:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eE47K7se6mFajwAAG6o9tA (envelope-from ) for ; Fri, 21 Jan 2022 03:47:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id D75671207B for ; Fri, 21 Jan 2022 03:47:22 +0100 (CET) Received: from localhost ([::1]:60996 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nAjxR-0004EG-VO for larch@yhetil.org; Thu, 20 Jan 2022 21:47:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44018) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nAjwo-0004Da-QE for emacs-orgmode@gnu.org; Thu, 20 Jan 2022 21:46:42 -0500 Received: from [2607:f8b0:4864:20::934] (port=43752 helo=mail-ua1-x934.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nAjwm-0005er-EE for emacs-orgmode@gnu.org; Thu, 20 Jan 2022 21:46:42 -0500 Received: by mail-ua1-x934.google.com with SMTP id 2so14458475uax.10 for ; Thu, 20 Jan 2022 18:46:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LdVSmMHjMnO6PI7cC7o2nkhKzFrTTrO8dKVioHccwTg=; b=fflL6iD/rFLffqGNYj0/d8qDad5uBHBeINg+u/Jh1ZcMQJdvyfgOxA5ljlhAALfP77 PP4Zwh8wrzJ3cKOFIjmzd9HPX0/0R0mESKoZevTbwa1LsMydoVaolK3AC/TFIrntFGtD z7y0uPdN1agSu/5daYlJKM73YFPF0+KszVchMCuPMJ0fRpS/PsaRG5UfS93b/ye7TeGr ZmPFG6utvgRkxAYbcsKcnKxeUE8XTRZL+Ec+/IFM1/DG7wdy4H+ZWZ4VSUXHma1Jqk5R XJA1a0et4RvzoxTQQZrTHfnlDCHXkWVYjLgHTKuV2PtyEtt9LgoX5SlZte3/het/Scyn mB3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LdVSmMHjMnO6PI7cC7o2nkhKzFrTTrO8dKVioHccwTg=; b=1xUKkNSnk9m+lL19qmBbCfUtnOcU7bZOO/UbTVNXxumzHZOMDmfeLhnU+5hK0cSSPJ ZBr0EvcNIysgGU8/zF3W31vMIuM1QLom82gy85TFF2rO+3xFDycp5WTKo8e6BOWeTJtL BP30OiQri9pXulwybc4k4KKNA1dBa2/kEy0s4y5sSZjBFeKl9tATe4EDV1rN8g47hoHB VZXvds4SFDROe8+fP7gWuRVVPwanXMzY8wZTEjtJmyCN23Ki3BIHvhDiEgJF/yQwY7Vp cZH/rgjmO0y84lQwMtrwmklHhgLxC+FfROVd88Nw+QMCrs6/djQYcm/uL2JZ0hZIxZic pQUQ== X-Gm-Message-State: AOAM532ekvy8bgK6xhIHLOH7f4iKCBK+EWtirJUiDDpg4Os9ikYmMRFK t084V2MiyMoEL9pQTPNDB2wyVTTeuWT/oUHe2R69pkpv6J0= X-Google-Smtp-Source: ABdhPJxzV+adMiDLOmWK3VwF6UV+jnaA/elpTE45+9Tg1ma1OhwUeq6KzkPiBf2pfaP3RsU7JPrpPYYQ7lrl00859oM= X-Received: by 2002:ab0:77da:: with SMTP id y26mr1031330uar.68.1642733199405; Thu, 20 Jan 2022 18:46:39 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Matt Price Date: Thu, 20 Jan 2022 21:46:28 -0500 Message-ID: Subject: Re: handling as special special block in derived export To: John Kitchin Content-Type: multipart/alternative; boundary="000000000000cfb53d05d60ea087" X-Host-Lookup-Failed: Reverse DNS lookup failed for 2607:f8b0:4864:20::934 (failed) Received-SPF: pass client-ip=2607:f8b0:4864:20::934; envelope-from=moptop99@gmail.com; helo=mail-ua1-x934.google.com X-Spam_score_int: 9 X-Spam_score: 0.9 X-Spam_bar: / X-Spam_report: (0.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, PDS_HP_HELO_NORDNS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_DOTEDU=1.997 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Org Mode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642733243; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=LdVSmMHjMnO6PI7cC7o2nkhKzFrTTrO8dKVioHccwTg=; b=tkROULkMVGf1USsiO6lDyG+E+N+sDyboq5j+yAeAECdla7Ee2sEkatBPMhdjJnavxhZy/o 49F2Z+v5H58ztZjcrD3OSq9v4PR5G0OUJs3cM/VFxmF6mNRIUjDu+uFGmFCl7tWbf2ugZg X4rtD00xt5BryqmJnmoYYoxNXduE1vQ6E7m0ecCxe1jX+QEfj96Ee7hJQv3poqLxZ4mPgX rmc8F95R1aoIGzd9wBmKF0pF7jSUtfrG6e/5TiVc5PRCWUoflotPv73OfSru6n1IEgCG4m Wqsls6xr+m0ArRIKtueq4Ag4k1AD0Qbd3/5Vq/1iAQLfSPZgPZ+KWKu+IWqjFQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642733243; a=rsa-sha256; cv=none; b=AfFYoFG0Hbts3xbFvbHQOs5Uspxkc7ZfLVjQzLLS3jaAVhkPB9CAAOPsqcUqVH5sv0f5TM omU7EGSGhDEyJIBF+HKKvxAgmHqZZ/8n+0yrj7rYowkKv28vV0JPS9EGPw183pdsVdUgYX v8mq84z7n9tTIp/X2k6Pm3j7DxLTP1Mv3BcWj7mmMc3gCbDlAXyxKSFlyCgGXdSs4FBFov kXhkq+zvqYIt5v2/njhaWewA/AoVEWr/E7Vd3V9bDZDstMCxMTCj+XXOjR65RShnUz6/H9 AjNl+TlWKtMeEe6bmQCRj1t+VtNP2HkzxcigCS3X+CfAuuMeCNSY4hxqaWzNcw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="fflL6iD/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -8.93 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b="fflL6iD/"; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: D75671207B X-Spam-Score: -8.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: XZ2EVw9R863B --000000000000cfb53d05d60ea087 Content-Type: text/plain; charset="UTF-8" On Thu, Jan 20, 2022 at 11:12 AM John Kitchin wrote: > It depends on what the src things look like. You might be able to just > call ffap or some variant of it. Here is an example of the follow part that > works for a file and url for me. > > #+BEGIN_SRC emacs-lisp > (org-link-set-parameters > "rstack" > :follow (lambda (path) > (ffap (or (ffap-url-at-point) > (ffap-file-at-point))))) > #+END_SRC > > #+RESULTS: > | :follow | (lambda (path) (ffap (or (ffap-url-at-point) > (ffap-file-at-point)))) | > > > [[rstack:(("./screenshots/date-20-01-2022-time-10-36-54.png" . fade-out) > (src2 . fade-in) ("https://google.com" . fade-out))]] > > > This is what I have so far. I'm pretty happy with it; it's quite concise, and will fill in default values for the fade in and out instructions. When I asked my question, I left out an optional second parameter that these stacking images can take -- a "fragment-index" number. I'm trying to figure out a way to add that additional info into the link without making it (a) unnecessarily long, esp for the majority of cases where I won't use that index; or (b) impossible to read. I guess I could make each list element a plist instead? Like ((:s ~/image.png :i 4 :f fade-in-then-out))? Anyway, here's my code: (defun r-stack-follow (path) (let* ((srcs (read path )) (completions (-map (lambda (src) (car src)) srcs) ) (chosen (completing-read "Follow link to: " completions))) (if (ffap-url-p chosen) (browse-url chosen) (find-file-ace-window chosen)))) (defun r-stack-export (path desc backend) (cond ((eq 'html backend) (let ((srcs (read path))) (format "
\n%s
\n" (string-join (cl-loop for index from 1 for (src . data-fragment) in srcs collect (format " " (or data-fragment (cond ((eql 1 index) "fade-out") ((eql (length srcs) index) "fade-in") (t "fade-in-then-out"))) src)) "\n")))))) (org-link-set-parameters "r-stack" :follow 'r-stack-follow :export 'r-stack-export :face '(:foreground "red") :help-echo "Click me for a message.") > John > > ----------------------------------- > Professor John Kitchin (he/him/his) > Doherty Hall A207F > Department of Chemical Engineering > Carnegie Mellon University > Pittsburgh, PA 15213 > 412-268-7803 > @johnkitchin > http://kitchingroup.cheme.cmu.edu > > > > On Thu, Jan 20, 2022 at 10:21 AM Matt Price wrote: > >> >> >> On Wed, Jan 19, 2022 at 12:18 PM John Kitchin >> wrote: >> >>> I am not sure this is quite what you are looking for. You could use a >>> macro like this. >>> >>> >>> >>> {{{r-stack(((src1 . fade-out) (src2 . fade-in) (src3 . fade-out)))}}} >>> >>> * code :noexport: >>> >>> #+macro: r-stack (eval (r-stack $1)) >>> >>> #+BEGIN_SRC emacs-lisp >>> (defun r-stack (src-alist) >>> "SRC-alist will be a string containing a list of (src . data-fragment) >>> src is a url or filename >>> data-fragment >>> >>> Returns a string for export." >>> (let ((src (read src-alist))) >>> (format "#+BEGIN_EXPORT html >>>
>>> %s >>>
>>> ,#+END_EXPORT" >>> (string-join >>> (cl-loop for (src . data-fragment) in src >>> collect >>> (format " " >>> data-fragment src)) >>> "\n")))) >>> >>> >>> (r-stack "((src1 . fade-out) (src2 . fade-in) (src3 . fade-out))") >>> #+END_SRC >>> >>> #+RESULTS: >>> : #+BEGIN_EXPORT html >>> :
>>> : >>> : >>> : >>> :
>>> : #+END_EXPORT >>> >>> You could also make a link do that. >>> >> >> Huh. This wasn't at all what I was thinking but it may be a much better >> way than I'd htought of. >> >> A link seems like it would be a great solution, especially if I could >> figure out how to get the :follow function to open an individual ~src~ >> path. Would you use "looking-at" to get the right candidate, or can you >> think of a way to get completion candidates for a function that opens the >> file? I'm looking at your eamples in >> https://kitchingroup.cheme.cmu.edu/blog/2016/11/04/New-link-features-in-org-9 >> but can't quite follow the code. >> >> Thank so mjch for this really interesting solution. >> >>> >>> John >>> >>> ----------------------------------- >>> Professor John Kitchin (he/him/his) >>> Doherty Hall A207F >>> Department of Chemical Engineering >>> Carnegie Mellon University >>> Pittsburgh, PA 15213 >>> 412-268-7803 >>> @johnkitchin >>> http://kitchingroup.cheme.cmu.edu >>> >>> >>> >>> On Wed, Jan 19, 2022 at 9:42 AM Matt Price wrote: >>> >>>> I am trying ot figure out if I can create a simplified syntax for a >>>> particular special block in a derived HTML exporter. >>>> >>>> I'm trying to produce HTML like this: >>>> >>>>
>>>> >>>> The derived backend (org-re-reveal) already has an >>>> >>>> #+ATTR_REVEAL that an make the data-fragment attributes, so it's not hard to produce >>>> the desired outpu: >>>> >>>> #+begin_r-stack >>>> #+ATTR_REVEAL: :frag appear[[imglink1]] >>>> #+ATTR_REVEAL: :frag appear[[imglink2]]#+end_r-stack >>>> >>>> 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? >>>> >>>> Thanks for your help as always! >>>> >>>> Matt >>>> >>>> --000000000000cfb53d05d60ea087 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


=
On Thu, Jan 20, 2022 at 11:12 AM John= Kitchin <jkitchin@andrew.cmu= .edu> wrote:
It depends on what the src things look like. You might= be able to just call ffap or some variant of it. Here is an example of the= follow part that works for a file and url for me.

#+BEG= IN_SRC emacs-lisp
(org-link-set-parameters
=C2=A0"rstack"=C2=A0:follow (lambda (path)
=C2=A0 (ffap (or (ffap-url-at-point) =C2=A0 =C2=A0 (ffap-file-at-point)))))
#+END_SRC

#+RESULTS:| :follow | (lambda (path) (ffap (or (ffap-url-at-point) (ffap-file-at-po= int)))) |


[[rstack:(("./screenshots/date-20-01-2022-time-10= -36-54.png" . fade-out) (src2 . fade-in) ("https://google.com" . fade-out))]]


This i= s what I have so far. I'm pretty happy with it; it's quite concise,= and=C2=A0 will fill in default values for the fade in and out instructions= .

When I asked my question, I left out an opt= ional second parameter that these stacking images can take -- a "fragm= ent-index" number. I'm trying to figure out a way to add that addi= tional info into the link without making it (a) unnecessarily long, esp for= the majority of cases where I won't use that index; or (b) impossible = to read. I guess I could make each list element a plist instead? Like ((:s = ~/image.png :i 4 :f fade-in-then-out))?

Anywa= y, here's my code:

(defun r-stack-follow = (path)
=C2=A0 (let* ((srcs (read path ))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0(completions (-map (lambda (src) (car src)) srcs) =C2=A0)
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0(chosen =C2=A0(completing-read "Follow link= to: " completions)))
=C2=A0 =C2=A0 (if (ffap-url-p chosen) (browse= -url chosen) (find-file-ace-window chosen))))
(defun r-stack-export (pat= h desc backend)
=C2=A0 (cond
=C2=A0 =C2=A0((eq 'html backend)=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(let ((srcs (read path)= ))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(format "= <div class=3D\"r-stack\">\n%s</div>\n"
=C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(string-join
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 (cl-loop for index from 1
=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0for (src . data-fragment) in srcs
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0collect
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0(format " =C2=A0<img class=3D\"fragment %s\&q= uot; src=3D\"%s\"/>"
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(or data-fragment
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0(cond
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 ((eql 1 index) "fade-out")
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 ((eql =C2=A0(length srcs) index) =C2=A0"fade-in")
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 (t "fade-in-then-out")))
=C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0src))
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "\n&quo= t;))))))


(org-link-set-parameters
=C2=A0"r-stack"=C2=A0:follow 'r-stack-follow
=C2=A0:export 'r-stack-export=C2=A0:face '(:foreground "red")
=C2=A0:help-echo "C= lick me for a message.")


=C2= =A0
Joh= n

-----------------------------------
Professor John Kitchin (he/= him/his)
Doherty Hall A207F
Department of Chemical Engineering
Car= negie Mellon University
Pittsburgh, PA 15213
412-268-7803


On Thu, Jan 20, 2022 at 10:21 AM Matt Price= <moptop99@gmail= .com> wrote:


On Wed, Jan 19, 2022 at 12:18 PM = John Kitchin <jkitchin@andrew.cmu.edu> wrote:
I am not sure this is quite= what you are looking for. You could use a macro like this.=C2=A0



{{{r-stack(((src1 . fade-out) (src2 . fade-in) (src= 3 . fade-out)))}}}

* code :noexport:

#+macro: r-stack (eval (= r-stack $1))

#+BEGIN_SRC emacs-lisp
(defun r-stack (src-alist)=C2=A0 "SRC-alist will be a string containing a list of (src . data-f= ragment)
src is a url or filename
data-fragment

Returns a str= ing for export." =C2=A0
=C2=A0 (let ((src (read src-alist)))
=C2= =A0 =C2=A0 (format "#+BEGIN_EXPORT html
<div class=3D\"r-st= ack\">
%s =C2=A0 =C2=A0 =C2=A0
</div>
,#+END_EXPOR= T"
=C2=A0 =C2=A0(string-join
=C2=A0 =C2=A0 (cl-loop for (src= . data-fragment) in src
=C2=A0 =C2=A0 =C2=A0collect
=C2=A0 =C2= =A0 =C2=A0(format " =C2=A0<img data-fragment=3D\"%s\" src= =3D\"%s\"/>"
=C2=A0 =C2=A0 =C2=A0data-fragment src= ))
=C2=A0 =C2=A0 "\n"))))


(r-stack "((src1 .= fade-out) (src2 . fade-in) (src3 . fade-out))")
#+END_SRC

#= +RESULTS:
: #+BEGIN_EXPORT html
: <div class=3D"r-stack"= >
: =C2=A0 <img data-fragment=3D"fade-out" src=3D"s= rc1"/>
: =C2=A0 <img data-fragment=3D"fade-in" src= =3D"src2"/>
: =C2=A0 <img data-fragment=3D"fade-out= " src=3D"src3"/> =C2=A0 =C2=A0 =C2=A0
: </div>=
: #+END_EXPORT

You could also make a link = do that.

Huh.=C2=A0 This wasn&#= 39;t at all what I was thinking but it may be a much better way than I'= d htought of.=C2=A0

A link seems like it woul= d be a great solution, especially if I could figure out how to get the :fol= low function to open an individual ~src~ path. Would you use "looking-= at" to get the right candidate, or can you think of a way to get compl= etion candidates for a function that opens the file? I'm looking at you= r eamples in https://kitchingroup.cheme.cm= u.edu/blog/2016/11/04/New-link-features-in-org-9 but can't quite fo= llow the code.

Thank so mjch for this really inter= esting solution.

John

-----------------------------------
P= rofessor John Kitchin (he/him/his)
Doherty Hall A207F
Department of C= hemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213412-268-7803


On Wed, Jan 19, 2022 at 9:42 = AM Matt Price <m= optop99@gmail.com> wrote:
I am trying ot figure out if I can c= reate a simplified syntax for a particular special block in a derived HTML = exporter.=C2=A0

I'm trying to produce HTM= L like this:

<div class=3D"r-stack>
=
  <img data-fragment=3D"fade-out" src=3D"...."/>
  <img data-fragment=3D"fade-in" src=3D"..."/>
=
</div>


The derived backend =
(org-re-reveal) already has an 
#+ATTR_REVEAL that an make the data-fr=
agment attributes, so it's not hard to produce
the desired outpu:
#+begin_r-stack
#+ATTR_REVEAL: :frag appear [= [imglink1]]
#+ATTR_REVEAL: = :frag appear
[= [imglink2]] #= +end_r-stack

However, I'd really like to add a less verbose syntax, like t=
his:

#+begin_r-stack :frag (appear appear) [= [imglink1]] [= [imglink2]] #= +end_r-stack
My question is: will the exporter preserve information from these hea=
der-like arguments, and is 
there a mechanism I can use in a custom ~spe= cial-block-function~ to make use of htem?

Thanks for your help as =
always!

Matt
--000000000000cfb53d05d60ea087--