* Status of macro expansion
@ 2015-08-06 15:52 Fabrice Popineau
2015-08-06 16:03 ` Nicolas Goaziou
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Popineau @ 2015-08-06 15:52 UTC (permalink / raw)
To: emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 570 bytes --]
Hi,
I was looking at what text can serve as macro arguments and it seems there
are a couple of restrictions. Namely, if I export the following to html:
#+MACRO: leftcolumn @@html:<div class="left">$1</div>@@
#+MACRO: rightcolumn @@html:<div class="right">$1</div>@@
* Title
** Section
{{{leftcolumn(
[[http://www.google.com/]]
)}}}
{{{rightcolumn(
Line 1
Line 2
)}}}
Neither one of the macros work.
Is it expected ? (I assume yes)
What is the best way to put stuff side-by-side on ox-reveal (is anybody
here has already done that).
Thanks in advance,
Fabrice
[-- Attachment #2: Type: text/html, Size: 1008 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Status of macro expansion
2015-08-06 15:52 Status of macro expansion Fabrice Popineau
@ 2015-08-06 16:03 ` Nicolas Goaziou
2015-08-06 16:10 ` Fabrice Popineau
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Goaziou @ 2015-08-06 16:03 UTC (permalink / raw)
To: Fabrice Popineau; +Cc: emacs-orgmode@gnu.org
Hello,
Fabrice Popineau <fabrice.popineau@gmail.com> writes:
> I was looking at what text can serve as macro arguments and it seems there
> are a couple of restrictions. Namely, if I export the following to html:
>
> #+MACRO: leftcolumn @@html:<div class="left">$1</div>@@
> #+MACRO: rightcolumn @@html:<div class="right">$1</div>@@
>
> * Title
>
> ** Section
>
> {{{leftcolumn(
> [[http://www.google.com/]]
> )}}}
>
> {{{rightcolumn(
> Line 1
>
> Line 2
> )}}}
>
> Neither one of the macros work.
> Is it expected ? (I assume yes)
AFAICT the first macro is correctly expanded. What makes you think it
doesn't work?
However, macros, being objects, cannot cross paragraphs. The second
example is really 2 paragraphs, not a macro containing two lines.
Regards,
--
Nicolas Goaziou
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Status of macro expansion
2015-08-06 16:03 ` Nicolas Goaziou
@ 2015-08-06 16:10 ` Fabrice Popineau
0 siblings, 0 replies; 3+ messages in thread
From: Fabrice Popineau @ 2015-08-06 16:10 UTC (permalink / raw)
To: Fabrice Popineau, emacs-orgmode@gnu.org
[-- Attachment #1: Type: text/plain, Size: 582 bytes --]
2015-08-06 18:03 GMT+02:00 Nicolas Goaziou <mail@nicolasgoaziou.fr>:
>
> AFAICT the first macro is correctly expanded. What makes you think it
> doesn't work?
>
Arrgh. My mistake.
It expands as I expected if I write the macro as:
#+MACRO: leftcolumn @@html:<div class="left">@@$1@@html:</div>@@
However, macros, being objects, cannot cross paragraphs. The second
> example is really 2 paragraphs, not a macro containing two lines.
>
>
Ok, so thanks for the confirmation (looking into old mails from the list,
that might have work at some point quite far in the past).
Fabrice
[-- Attachment #2: Type: text/html, Size: 1197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-08-06 16:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-06 15:52 Status of macro expansion Fabrice Popineau
2015-08-06 16:03 ` Nicolas Goaziou
2015-08-06 16:10 ` Fabrice Popineau
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.