From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Schmitt Subject: Re: is there a macro to have backend-specific behavior? Date: Thu, 01 Feb 2018 14:46:48 +0100 Message-ID: References: <87bmh8yl2b.fsf@nicolasgoaziou.fr> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37194) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ehFCa-0000ci-6C for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 08:46:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ehFCX-0005XG-Kn for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 08:46:56 -0500 Received: from mail3-relais-sop.national.inria.fr ([192.134.164.104]:27871) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ehFCX-0005WE-86 for emacs-orgmode@gnu.org; Thu, 01 Feb 2018 08:46:53 -0500 In-Reply-To: <87bmh8yl2b.fsf@nicolasgoaziou.fr> (Nicolas Goaziou's message of "Thu, 01 Feb 2018 13:02:36 +0100") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: Nicolas Goaziou Cc: emacs-orgmode --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2018-02-01 13:02, Nicolas Goaziou writes: >> My use case is this one: I have a link to a custom id, and I want to >> export it as [[#id]] in latex and [[file:file.org::#id]] for html >> *before* link resolution happens (so that the custom id in the latex >> export is substituted with the correct label). >> >> Is this possible? > > Could you simply preprocess the document to export with a function doing > the change above? Functions in `org-export-before-parsing-hook' are > called with the back-end as the sole argument. Thank you for the suggestion, I think this is the simplest solution. Best, Alan =2D-=20 OpenPGP Key ID : 040D0A3B4ED2E5C7 Monthly Athmospheric CO=E2=82=82, Mauna Loa Obs. 2017-12: 406.82, 2016-12: = 404.42 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEzBAEBCgAdFiEE6lXof/BsSVW56ZmGBA0KO07S5ccFAlpzGkkACgkQBA0KO07S 5cdZ9AgApRu3m5Py4Pq0r70RbZ8Sh5hKO8k4zj/VgNts1QdLVScXcH2Xf+x/xnuE B74TCH0Pk4AJfsTMOBijFBmcMX3jY4ni1cNcGIYiDUa1QhX8O3CBv5MTZYdSiy8h EYQ41/TBOZiReHzJ0ixFxR+XTDzZs/w1u6bdzl8aorZSRNh4iSSJEZy6I+ZIAKwV UQYNnch+xGfIF+uoEJfC19cMLbg8ajhLWvp4Zyl/h9F5Mbwb0/8KOMvuY6pBr473 pcjAgnsIY+hHrk0ZfR4kjihvMmiX4tWZ7P4DJHxiMek6288HiyXgbLRygI4nEFMS K3CBX8QPU4dUL9SIy5ktxltQwYQ6nw== =VLpf -----END PGP SIGNATURE----- --=-=-=--