From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daimrod Subject: Help on org-export-filter-link-functions Date: Fri, 03 Oct 2014 13:19:31 +0200 Message-ID: <87lhox2yf0.fsf@tanger.home> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa0tj-0004a4-Qg for emacs-orgmode@gnu.org; Fri, 03 Oct 2014 07:19:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xa0ta-00082X-Of for emacs-orgmode@gnu.org; Fri, 03 Oct 2014 07:19:43 -0400 Received: from mail-wi0-x22d.google.com ([2a00:1450:400c:c05::22d]:41951) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa0ta-00082F-Hb for emacs-orgmode@gnu.org; Fri, 03 Oct 2014 07:19:34 -0400 Received: by mail-wi0-f173.google.com with SMTP id fb4so2433684wid.6 for ; Fri, 03 Oct 2014 04:19:33 -0700 (PDT) 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-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, I've wrote a simple filter to customize how links are exported in latex: #+BEGIN_SRC (defun dmd--latex-bib-link-filter (data backend info) "Convert a bib link to a citation (e.g. bib:foo93 -> \cite{foo93})." (let* ((beg (next-property-change 0 data)) (link (if beg (get-text-property beg :parent data)))) (cond ((and link (org-export-derived-backend-p backend 'latex) (string=3D (org-element-property :type link) "bib")) (format "\\cite{%s}" (org-element-property :path link))) ((and link (org-export-derived-backend-p backend 'latex) (string=3D (org-element-property :type link) "file") (string=3D (org-element-property :path link) "~/.bib.bib")) (format "\\cite{%s}" (org-element-property :search-option link))) (t data)))) #+END_SRC And I was wondering whether there is an easier way to retrieve the org properties stored in the text properties of DATA. Best, =2D-=20 Daimrod/Greg --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJULoZDAAoJEBNzVHcrZRiUCFwQAKgGoRck8EC61mrpW3/YCWkB fich/TBKFXq2tXOSfuwC46qQlUP6VoDEhjNdQdcc/BeM/1OfdfZiz0bHe7/+Pejc dNXlZUQz1H4I+VuJ08jxXWcGrFuULPOqEkv/cy2h+ywFDawdjiCk1Cgy6+1l79UT Pj8NFCicfp+6el87pu5CGfkC5TmytZ8gfSki6uL5K58zqcK95k/bkSJsKm/h4puH /RxN/dGsLYaG5b1ROHvO4EILvNFlgD9sDnrrR4JVMbt4RNjeqPjFcmxfyN2Pmw8c MmFxikiJuaFeong9ezwvUM7164hoFMmrg3IAiirWrkL8HShKYnTEfaZ0nOTXnPLZ VpNWiALV4V9DgaLwVJWYohJNxdEvfd1CxM/DhMPZDnbfCg9cwC8UPJLiS6aIxHyT pUGpifCXafQ4qHyMC8rTBYNQC9XSsGml9ncN3wUL3noFLvm5wOZDg+zz0zmHGn0u 3ZwPA3F9zga8t85fA3lQmIV2+xQrclP9BEq7n+g0oHrQb2T1gHXWdnnRjoy2tTEX nS9WMgrEG/XAognfX5/LVBsGfje+S0kU+OprMXtAdYtc/7qbqBTgyoMFeBMfdvV9 6N9GnuXnOCboN0lrYYavsT38QvoW4Fy9ONjvm9qUgK2qTNcvHpdQccjT8dQ8eJSa Ia4+8N650qa7ier5Gi9H =onZO -----END PGP SIGNATURE----- --=-=-=--