emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Tom Gillespie <tgbugs@gmail.com>
To: Bruno BEAUFILS <bruno@boulgour.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: looking for a macro eval workaround (9.1 vs 9.2 and +) for export backend test
Date: Sun, 29 Nov 2020 15:55:18 -0500	[thread overview]
Message-ID: <CA+G3_PN2c1D8rDeCMEzPe0+qsznJV4fRBtd49iSp8hTQ1G6xsQ@mail.gmail.com> (raw)
In-Reply-To: <871rgcqcp7.fsf@ucl.ac.uk>

Not sure if this helps, but the example that I came up with for the
quickstart https://orgmode.org/quickstart.html#macros has an example
(see below) of using multiple @@ export snippets in a single macro. If
you have consistent naming conventions for pdf vs svg you might be
able to write a variant #+macro: image that works like
{{{image(file-name-without-extension)}}}. Not sure this will get you
what you want though since I imagine that you want to modify how links
such as [[file:file-name.ext]] are exported. One alternative would be
to define a custom link type
https://orgmode.org/manual/Adding-Hyperlink-Types.html that would do
the type setting for you. If you want those definitions to live in the
org file you could use Eric's eval: (org-sbe startup) local variable
approach to ensure that the elisp definitions are always available.

The example from the quickstart:
#+MACRO: red @@html:<span class="red">$1</span>@@@@latex:\textcolor{red}{$1}@@

      reply	other threads:[~2020-11-29 20:56 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-21 10:56 looking for a macro eval workaround (9.1 vs 9.2 and +) for export backend test Bruno BEAUFILS
2020-11-21 13:18 ` Tim Cross
2020-11-22 20:49   ` Bruno BEAUFILS
2020-11-23 10:19 ` Eric S Fraga
2020-11-23 13:02   ` Bruno BEAUFILS
2020-11-23 13:12     ` Eric S Fraga
2020-11-29 17:30       ` Bruno BEAUFILS
2020-11-29 17:45         ` Eric S Fraga
2020-11-29 20:55           ` Tom Gillespie [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:

  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=CA+G3_PN2c1D8rDeCMEzPe0+qsznJV4fRBtd49iSp8hTQ1G6xsQ@mail.gmail.com \
    --to=tgbugs@gmail.com \
    --cc=bruno@boulgour.com \
    --cc=emacs-orgmode@gnu.org \


* 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


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).