From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bastien Subject: Re: Proposal for images in markdown export (ox-md) Date: Mon, 10 Feb 2014 10:07:01 +0100 Message-ID: <87eh3b9w0a.fsf@bzg.ath.cx> References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:36315) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCmpe-0002K3-JA for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 04:07:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WCmpY-0007Cs-I3 for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 04:07:14 -0500 Received: from rs249.mailgun.us ([209.61.151.249]:33803) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WCmpY-0007Co-CU for emacs-orgmode@gnu.org; Mon, 10 Feb 2014 04:07:08 -0500 In-Reply-To: (John Hendy's message of "Sun, 9 Feb 2014 18:21:51 -0600") 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: John Hendy Cc: emacs-orgmode --=-=-= Content-Type: text/plain Hi John, John Hendy writes: > So, my proposal would be that if either are present, Org could > (should?) use html image specifications instead of markdown. I'll let Nicolas decide on this. In the meantime, I find the attached patch useful. It uses the file-name instead of [img] when the image link has no description. If you find this useful, I'll apply it. Thanks, --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=ox-md-fix-img-name.patch diff --git a/lisp/ox-md.el b/lisp/ox-md.el index 76bea94..26a36e2 100644 --- a/lisp/ox-md.el +++ b/lisp/ox-md.el @@ -306,7 +306,8 @@ a communication channel." (caption (org-export-data (org-export-get-caption (org-export-get-parent-element link)) info))) - (format "![img](%s)" + (format "![%s](%s)" + (file-name-nondirectory path) (if (not (org-string-nw-p caption)) path (format "%s \"%s\"" path caption))))) ((string= type "coderef") --=-=-= Content-Type: text/plain -- Bastien --=-=-=--