From: Bastien <bzg@gnu.org>
To: John Hendy <jw.hendy@gmail.com>
Cc: emacs-orgmode <emacs-orgmode@gnu.org>
Subject: Re: Proposal for images in markdown export (ox-md)
Date: Mon, 10 Feb 2014 10:07:01 +0100 [thread overview]
Message-ID: <87eh3b9w0a.fsf@bzg.ath.cx> (raw)
In-Reply-To: <CA+M2ft8EmSzvwEH5JybBkw46bFZn84e9u64YN_kUY+tN=7NKBQ@mail.gmail.com> (John Hendy's message of "Sun, 9 Feb 2014 18:21:51 -0600")
[-- Attachment #1: Type: text/plain, Size: 396 bytes --]
Hi John,
John Hendy <jw.hendy@gmail.com> 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,
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ox-md-fix-img-name.patch --]
[-- Type: text/x-diff, Size: 494 bytes --]
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")
[-- Attachment #3: Type: text/plain, Size: 14 bytes --]
--
Bastien
next prev parent reply other threads:[~2014-02-10 9:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-10 0:21 Proposal for images in markdown export (ox-md) John Hendy
2014-02-10 9:07 ` Bastien [this message]
2014-02-10 16:43 ` Nicolas Goaziou
2014-02-10 17:03 ` John Hendy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87eh3b9w0a.fsf@bzg.ath.cx \
--to=bzg@gnu.org \
--cc=emacs-orgmode@gnu.org \
--cc=jw.hendy@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).