From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Peloquin Subject: custom link export and ox-md Date: Sun, 23 Feb 2014 21:12:20 -0500 Message-ID: <530AAA84.3000402@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHl1x-0004O0-09 for emacs-orgmode@gnu.org; Sun, 23 Feb 2014 21:12:34 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WHl1r-0005Z6-0V for emacs-orgmode@gnu.org; Sun, 23 Feb 2014 21:12:28 -0500 Received: from mail-qa0-x22f.google.com ([2607:f8b0:400d:c00::22f]:46507) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WHl1q-0005Ys-ST for emacs-orgmode@gnu.org; Sun, 23 Feb 2014 21:12:22 -0500 Received: by mail-qa0-f47.google.com with SMTP id j5so5622594qaq.6 for ; Sun, 23 Feb 2014 18:12:22 -0800 (PST) Received: from [192.168.1.101] (c-69-140-9-160.hsd1.md.comcast.net. [69.140.9.160]) by mx.google.com with ESMTPSA id q3sm45404489qam.12.2014.02.23.18.12.21 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 23 Feb 2014 18:12:21 -0800 (PST) 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 Greetings, I'm trying to define a custom link in org mode with custom export formatting, but I get unexpected results when exporting to markdown. Minimal example: `minimal-init.el` (add-to-list 'load-path "~/.emacs.d/elpa/org-20140217") (require 'org) (add-to-list 'org-export-backends "md") (org-add-link-type "cite" nil (lambda (path desc format) (format "[@%s]" path))) `minimal.org` Some text [[cite:citekey]]. When I export `minimal.org` to markdown using C-c C-e m M, I get: Some text . Whereas I expected: Some text [@citekey]. I tried this with a clean emacs configuration (`emacs -Q -l minimal-init.el`). `org-version` returns 8.2.5h, which as far as I know is the latest version. `emacs-version` is 24.3.1. I do get the expected export result if I export to latex or html, so the link export definition in init.el does work. Am I doing something wrong? Is this a bug in ox-md? Best regards, John Peloquin