From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id aFW2MfEKxF8uagAA0tVLHw (envelope-from ) for ; Sun, 29 Nov 2020 20:56:17 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id kDSGLfEKxF8cVQAA1q6Kng (envelope-from ) for ; Sun, 29 Nov 2020 20:56:17 +0000 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 1A9B694011A for ; Sun, 29 Nov 2020 20:56:17 +0000 (UTC) Received: from localhost ([::1]:59224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjTjz-0000Gy-M1 for larch@yhetil.org; Sun, 29 Nov 2020 15:56:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:58362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjTjL-0000G9-OQ for emacs-orgmode@gnu.org; Sun, 29 Nov 2020 15:55:35 -0500 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]:36762) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjTjJ-0006fk-6D for emacs-orgmode@gnu.org; Sun, 29 Nov 2020 15:55:35 -0500 Received: by mail-wr1-x42a.google.com with SMTP id z7so12651223wrn.3 for ; Sun, 29 Nov 2020 12:55:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=/3Py0Su8GEgZPIT0BpNClJxoX2xNAT0LIOqrjc6U2uM=; b=p9wNOuvQKTlLcGfZ54qgmiT52HLwuiTR4qiu2Auk/W3GO6GNcXtHNUXUPyBAwH8L6a NnHlB+fFx2fO0UPy9q4KTbT317bL4Skz7p6CyVPBKawpb8GsvulJJFaQpWre4eYO7/do Za+QCntCf3WNPL5nzA9U6y/BrvUTPrMZwjgc/jf+dol8eWQyFkm+GrMMBNvXLGMwPTI6 TAhy2QEHgQAmeLLXslLLQ2LvO6s6sUnwgyd8f6wGiQmmnvErmw7KJdHstjoKdtPkaF7a orxvjLt48BBDz06SqNsX58XPsY7HiQVhoZi4bJI8nQ/4ZZY89haorHl0jf0N31DAF/sS bXFA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/3Py0Su8GEgZPIT0BpNClJxoX2xNAT0LIOqrjc6U2uM=; b=sRqZPgkW6dN2xkQRSZ75Q2gKcTlNTuSRAgZvwqKdeeHvsPLt8rwFO2+vDf+QuJjkgJ kzHIrKBFgF9EfRscq9XgiZ/cUULCs321cDEDpEMsRFDrp+BPSlAj/mO7HBCqPWNjWTIk c81KjtygTi0CX+AwFUKPqUsrSclsQ7sDA+6+9jzzxXlMM9pA3Jm3pXtEEWEU9lVyPTiS AGiF2F5vXG7Z5LrQxMRxi7gnULBVN6opemfgX4gQdexnQ9yqJkfVahWJgTzOWU8aFRbP NbigM2GR3sPfU16RVosD/naucmnsH6mbTpjpZDhaNA2cTkSXsmOyDmrKUydSPDLBrZTs /g9A== X-Gm-Message-State: AOAM531wpTMRAv/yboCj8VKxGeJ6RiQTRGmmKHI43lPCt7xQxIACBPOF uoq3x0RJce7uIR2kpuxYagAsT7fW4miLXavT3Y/eIr4Ygx4= X-Google-Smtp-Source: ABdhPJzr2z54eaD71beCnN9X9Lq9sb8PRMdsVw49Ral9wtZDMzueE8VXTV80bqDEaf/P54AwkIRE+P16RM16gk3hBcI= X-Received: by 2002:adf:916e:: with SMTP id j101mr24879661wrj.55.1606683330613; Sun, 29 Nov 2020 12:55:30 -0800 (PST) MIME-Version: 1.0 References: <20201121105633.kgwzxc2l6oo5yeau@localhost.localdomain> <871rgkpe8r.fsf@ucl.ac.uk> <20201123130232.vjdpunu3tx2rhuwh@localhost.localdomain> <87blfomd2q.fsf@ucl.ac.uk> <20201129173009.urv3yegrzvqn57er@localhost.localdomain> <871rgcqcp7.fsf@ucl.ac.uk> In-Reply-To: <871rgcqcp7.fsf@ucl.ac.uk> From: Tom Gillespie Date: Sun, 29 Nov 2020 15:55:18 -0500 Message-ID: Subject: Re: looking for a macro eval workaround (9.1 vs 9.2 and +) for export backend test To: Bruno BEAUFILS Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2a00:1450:4864:20::42a; envelope-from=tgbugs@gmail.com; helo=mail-wr1-x42a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: emacs-orgmode Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.98 X-Scanner: ns3122888.ip-94-23-21.eu Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=p9wNOuvQ; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-TUID: ZrtyXRzdfDfu 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. Best, Tom The example from the quickstart: #+MACRO: red @@html:$1@@@@latex:\textcolor{red}{$1}@@