From mboxrd@z Thu Jan  1 00:00:00 1970
From: Jake Romer <jkrmr.io@gmail.com>
Subject: Re: ox-md.el: Export TOC and Footnotes as Markdown rather than HTML
Date: Sun, 21 Aug 2016 22:31:01 -0700
Message-ID: <CAJT_U1OscFV3dyrNaxVcSck0WYPpmm05hEJJr3kw0Tg3ZLy_Kg@mail.gmail.com>
References: <CAJT_U1MpXdSoKd6ounOd6Fedior8F4nSEy_=ZF0RurNO7CcOXg@mail.gmail.com>
	<871t1z9ye1.fsf@saiph.selenimh>
	<CAJT_U1NcvQvu__xRS0dDLQCTXBWgFe=O6aARAa5xNCK2jgg9xw@mail.gmail.com>
	<87fuq6ujtz.fsf@saiph.selenimh>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary=001a114dfab4bfdabc053aa25b46
Return-path: <emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
Received: from eggs.gnu.org ([2001:4830:134:3::10]:49990)
	by lists.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jkrmr.io@gmail.com>) id 1bbhpV-0004UK-RR
	for emacs-orgmode@gnu.org; Mon, 22 Aug 2016 01:31:28 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
	(envelope-from <jkrmr.io@gmail.com>) id 1bbhpT-0005Nw-9L
	for emacs-orgmode@gnu.org; Mon, 22 Aug 2016 01:31:25 -0400
Received: from mail-ua0-x229.google.com ([2607:f8b0:400c:c08::229]:36525)
	by eggs.gnu.org with esmtp (Exim 4.71)
	(envelope-from <jkrmr.io@gmail.com>) id 1bbhpS-0005Nq-W1
	for emacs-orgmode@gnu.org; Mon, 22 Aug 2016 01:31:23 -0400
Received: by mail-ua0-x229.google.com with SMTP id 97so170374358uav.3
	for <emacs-orgmode@gnu.org>; Sun, 21 Aug 2016 22:31:22 -0700 (PDT)
In-Reply-To: <87fuq6ujtz.fsf@saiph.selenimh>
List-Id: "General discussions about Org-mode." <emacs-orgmode.gnu.org>
List-Unsubscribe: <https://lists.gnu.org/mailman/options/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=unsubscribe>
List-Archive: <http://lists.gnu.org/archive/html/emacs-orgmode/>
List-Post: <mailto:emacs-orgmode@gnu.org>
List-Help: <mailto:emacs-orgmode-request@gnu.org?subject=help>
List-Subscribe: <https://lists.gnu.org/mailman/listinfo/emacs-orgmode>,
	<mailto:emacs-orgmode-request@gnu.org?subject=subscribe>
Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org
Sender: "Emacs-orgmode"
	<emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org>
To: emacs-orgmode@gnu.org, Nicolas Goaziou <mail@nicolasgoaziou.fr>

--001a114dfab4bfdabc053aa25b46
Content-Type: multipart/alternative; boundary=001a114dfab4bfdaa7053aa25b44

--001a114dfab4bfdaa7053aa25b44
Content-Type: text/plain; charset=UTF-8

Thanks for the pointers! I appreciate your patience -- I'm still a noob
with Org :-)

Here's the updated patch with entries in ORG-NEWS and the manual.

Cheers,

Jake



On Mon, Aug 15, 2016 at 8:34 AM, Nicolas Goaziou <mail@nicolasgoaziou.fr>
wrote:

> Hello,
>
> Jake Romer <jkrmr.io@gmail.com> writes:
>
> > I'm not as familiar with Org's TOC facilities as I should be, so I'll
> > update to handle these cases after some research. I want to avoid letting
> > these patches get too big, too.
>
> See `org-html-toc' and `org-html--toc-text' for an illustration.
>
> > Here's the patch for generating the footnotes section as Markdown, let me
> > know what you think.
>
> It looks good. However, I'm not able to apply them, they seem to be
> created from a subdirectory instead of the root dir.
>
> > From 63d985425d3995985bd340fe195d8e25bd7f2cc6 Mon Sep 17 00:00:00 2001
> > From: Jake Romer <jkrmr@github.com>
> > Date: Sat, 13 Aug 2016 11:45:34 -0400
> > Subject: [PATCH 1/4] Extract org-md-headline-title to generate title
> >
> > In order to generate a headline title in the preferred Markdown
> > style ('atx or 'setext), I extracted this bit of logic from
> > `org-md-headline'.
> >
> > Since `org-md-headline' doesn't process the headline for the footnotes
> > section, extracting `org-md-headline-title' will allow us to generate
> > the Footnote section header in the preferred Markdown style without
> > duplicating the logic for doing so.
> >
> > As an enhancement, `org-md-headline-title' places the anchor tag above
> > the section header. This makes it so that in a browser, clicking on the
> > TOC entry for that section scrolls to the section header without
> > obscuring it.
> >
> > Example generated section title:
> >
> >     <a id="orgheadline1"></a>
>
> Great. However, you need to supply modified variables and functions
> names in the commit message, e.g.,
>
> * lisp/ox-md.el (org-md-headline-title): New function.
> (org-md-headline): Use new function.
>
> >     Summary of Changes
> >     ==================
> > ---
> >  ox-md.el | 37 +++++++++++++++++++++++--------------
> >  1 file changed, 23 insertions(+), 14 deletions(-)
> >
> > diff --git a/ox-md.el b/ox-md.el
> > index 0aaade6..4bd445c 100644
> > --- a/ox-md.el
> > +++ b/ox-md.el
> > @@ -216,20 +216,29 @@ a communication channel."
> >                         (car (last (org-export-get-headline-number
> >                                     headline info))))
> >                        "."))))
> > -       (concat bullet (make-string (- 4 (length bullet)) ?\s) heading
> tags
> > -               "\n\n"
> > -               (and contents
> > -                    (replace-regexp-in-string "^" "    " contents)))))
> > -       ;; Use "Setext" style.
> > -       ((eq style 'setext)
> > -     (concat heading tags anchor "\n"
> > -             (make-string (length heading) (if (= level 1) ?= ?-))
> > -             "\n\n"
> > -             contents))
> > -       ;; Use "atx" style.
> > -       (t (concat (make-string level ?#) " " heading tags anchor "\n\n"
> > -               contents))))))
> > -
> > +       (concat bullet (make-string (- 4 (length bullet)) ?\s) heading
> tags "\n\n"
> > +               (and contents (replace-regexp-in-string "^" "    "
> contents)))))
> > +       (t (concat (org-md-headline-title style level title anchor tags)
> contents))))))
> > +
> > +
> > +;; Headline Title
> > +
> > +(defun org-md-headline-title (style level title &optional anchor tags)
>
> I suggest to name it `org-md--headline-title' to highlight the fact that
> it is an internal function.
>
> > +  "Generate a headline title in the preferred Markdown headline style.
> > +STYLE is the preferred style ('atx or 'setext)
> > +LEVEL is the header level.
> > +TITLE is the headline title.
> > +ANCHOR is the HTML anchor tag for the section as a string.
> > +TAGS are the tags set on the section."
> > +  (let ((anchor-lines (if anchor (concat anchor "\n\n") nil)))
>
>   (and anchor (concat anchor "\n\n"))
>
> > Subject: [PATCH 2/4] Add customizable footnotes-related variables
> >
> > Taking a cue from `ox-html.el', this patch adds
> > `org-md-footnotes-section' and `org-md-footnote-format' to allow user
> > customization of the formatting for the footnotes section and individual
> > footnotes, respectively.
>
> Ditto (variable names...)
>
> > +(defcustom org-md-footnotes-section "%s%s"
> > +  "Format for the footnotes section.
>
> Format string for...
>
> > +The first %s placeholder will be replaced with the localized Footnotes
> section
> > +heading, the second with the contents of the Footnotes section."
> > + :group 'org-export-md
> > +  :type 'string)
>
> You need to provide additional keywords, i.e.,
>
>   :version "25.1"
>   :package-version '(Org . "9.0")
>
>
> > +(defcustom org-md-footnote-format "<sup>%s</sup>"
> > +  "The format for the footnote reference.
> > +The %s will be replaced by the footnote reference itself."
> > +  :group 'org-export-md
> > +  :type 'string)
>
> Ditto.
>
> > Subject: [PATCH 3/4] Add footnote-generating functions
> >
> > Introduces the following functions:
> >
> > * `org-md-footnote-formatted'
> > * `org-md-footnote-section'
>
> See above.
>
> > +;;;; Footnote Section
> > +
> > +(defun org-md-footnote-formatted (footnote info)
>
> Suggestion: `org-md--footnote-formatted'
>
> > +  "Formats a single footnote entry FOOTNOTE.
>
> You should specify the data type for FOOTNOTE, i.e., a cons cell
>
>   (number . definition)
>
> > +INFO is a plist with contextual information."
> > +  (let* ((fn-num (car footnote))
> > +         (fn-text (cdr footnote))
> > +         (fn-format (plist-get info :md-footnote-format))
> > +         (fn-anchor (format "fn.%d" fn-num))
> > +         (fn-href (format " href=\"#fnr.%d\"" fn-num))
> > +         (fn-link-to-ref (org-html--anchor fn-anchor fn-num fn-href
> info)))
> > +    (concat (format fn-format fn-link-to-ref) " " fn-text "\n")))
> > +
> > +(defun org-md-footnote-section (info)
> > +  "Format the footnote section.
> > +INFO is a plist used as a communication channel."
> > +  (let* ((fn-alist (org-export-collect-footnote-definitions info))
> > +         (fn-alist (loop for (n type raw) in fn-alist collect
> > +                         (cons n (org-trim (org-export-data raw
> info)))))
>
> `cl-loop'
>
> > +         (headline-style (plist-get info :md-headline-style))
> > +         (section-title (org-html--translate "Footnotes" info)))
> > +    (when fn-alist
> > +      (format (plist-get info :md-footnotes-section)
> > +              (org-md-headline-title headline-style 1 section-title)
> > +              (mapconcat #'(lambda (fn) (org-md-footnote-formatted fn
> info))
>
>   (mapconcat (lambda (fn) ...) ...)
>
> > +                         fn-alist
> > +                         "\n")))))
> > +
> >  ;;;; Template
> >
> >  (defun org-md-inner-template (contents info)
> > --
> > 2.9.2
> >
> >
> > From a2e353da09d0db9bbde14641bd94e12e156a143c Mon Sep 17 00:00:00 2001
> > From: Jake Romer <jkrmr@github.com>
> > Date: Sat, 13 Aug 2016 13:11:26 -0400
> > Subject: [PATCH 4/4] Update org-md-inner-template to Markdown footnotes
> >
> > Updates `org-md-inner-template' to use `org-md-footnotes-section' to
> > generate a Markdown version of the footnotes section.
> >
> > Also appends `:md-footnote-format' and `md-footnotes-section' to the
> > exporter :options-alist.
> > ---
> >  ox-md.el | 15 +++++++++++++--
> >  1 file changed, 13 insertions(+), 2 deletions(-)
> >
> > diff --git a/ox-md.el b/ox-md.el
> > index 19b8912..7d78ff7 100644
> > --- a/ox-md.el
> > +++ b/ox-md.el
> > @@ -105,7 +105,10 @@ The %s will be replaced by the footnote reference
> itself."
> >                    (src-block . org-md-example-block)
> >                    (template . org-md-template)
> >                    (verbatim . org-md-verbatim))
> > -  :options-alist '((:md-headline-style nil nil org-md-headline-style)))
> > +  :options-alist
> > +  '((:md-headline-style nil nil org-md-headline-style)
> > +    (:md-footnote-format nil nil org-md-footnote-format)
> > +    (:md-footnotes-section nil nil org-md-footnotes-section)))
>
> These new parameters need to be documented in the manual: (info "(org)
> Publishing options").
>
> Would you mind providing an entry in ORG-NEWS and send again the patches
> from root directory so I can apply them?
>
> Thank you!
>
> Regards,
>
> --
> Nicolas Goaziou
>

--001a114dfab4bfdaa7053aa25b44
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Thanks for the pointers! I appreciate your patience -- I&#=
39;m still a noob with Org :-)<div><br></div><div>Here&#39;s the updated pa=
tch with entries in ORG-NEWS and the manual.</div><div><br></div><div>Cheer=
s,</div><div><br></div><div>Jake</div><div><br></div><div><br></div><div cl=
ass=3D"gmail_extra"><br><div class=3D"gmail_quote">On Mon, Aug 15, 2016 at =
8:34 AM, Nicolas Goaziou <span dir=3D"ltr">&lt;<a href=3D"mailto:mail@nicol=
asgoaziou.fr" target=3D"_blank">mail@nicolasgoaziou.fr</a>&gt;</span> wrote=
:<br><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-le=
ft:1px #ccc solid;padding-left:1ex"><span>Hello,<br>
<br>
Jake Romer &lt;<a href=3D"mailto:jkrmr.io@gmail.com" target=3D"_blank">jkrm=
r.io@gmail.com</a>&gt; writes:<br>
<br>
</span><span>&gt; I&#39;m not as familiar with Org&#39;s TOC facilities as =
I should be, so I&#39;ll<br>
&gt; update to handle these cases after some research. I want to avoid lett=
ing<br>
&gt; these patches get too big, too.<br>
<br>
</span>See `org-html-toc&#39; and `org-html--toc-text&#39; for an illustrat=
ion.<br>
<span><br>
&gt; Here&#39;s the patch for generating the footnotes section as Markdown,=
 let me<br>
&gt; know what you think.<br>
<br>
</span>It looks good. However, I&#39;m not able to apply them, they seem to=
 be<br>
created from a subdirectory instead of the root dir.<br>
<br>
&gt; From 63d985425d3995985bd340fe195d8e<wbr>25bd7f2cc6 Mon Sep 17 00:00:00=
 2001<br>
&gt; From: Jake Romer &lt;<a href=3D"mailto:jkrmr@github.com" target=3D"_bl=
ank">jkrmr@github.com</a>&gt;<br>
&gt; Date: Sat, 13 Aug 2016 11:45:34 -0400<br>
&gt; Subject: [PATCH 1/4] Extract org-md-headline-title to generate title<b=
r>
&gt;<br>
&gt; In order to generate a headline title in the preferred Markdown<br>
&gt; style (&#39;atx or &#39;setext), I extracted this bit of logic from<br=
>
&gt; `org-md-headline&#39;.<br>
&gt;<br>
&gt; Since `org-md-headline&#39; doesn&#39;t process the headline for the f=
ootnotes<br>
&gt; section, extracting `org-md-headline-title&#39; will allow us to gener=
ate<br>
&gt; the Footnote section header in the preferred Markdown style without<br=
>
&gt; duplicating the logic for doing so.<br>
&gt;<br>
&gt; As an enhancement, `org-md-headline-title&#39; places the anchor tag a=
bove<br>
&gt; the section header. This makes it so that in a browser, clicking on th=
e<br>
&gt; TOC entry for that section scrolls to the section header without<br>
&gt; obscuring it.<br>
&gt;<br>
&gt; Example generated section title:<br>
&gt;<br>
&gt;=C2=A0 =C2=A0 =C2=A0&lt;a id=3D&quot;orgheadline1&quot;&gt;&lt;/a&gt;<b=
r>
<br>
Great. However, you need to supply modified variables and functions<br>
names in the commit message, e.g.,<br>
<br>
* lisp/ox-md.el (org-md-headline-title): New function.<br>
(org-md-headline): Use new function.<br>
<br>
&gt;=C2=A0 =C2=A0 =C2=A0Summary of Changes<br>
&gt;=C2=A0 =C2=A0 =C2=A0=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D<br>
&gt; ---<br>
&gt;=C2=A0 ox-md.el | 37 +++++++++++++++++++++++-------<wbr>-------<br>
&gt;=C2=A0 1 file changed, 23 insertions(+), 14 deletions(-)<br>
&gt;<br>
&gt; diff --git a/ox-md.el b/ox-md.el<br>
&gt; index 0aaade6..4bd445c 100644<br>
&gt; --- a/ox-md.el<br>
&gt; +++ b/ox-md.el<br>
&gt; @@ -216,20 +216,29 @@ a communication channel.&quot;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0(car (last (org-export-get-headline-numbe<wbr>r<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0headline info=
))))<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 &quot;.&quot;))))<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0(concat bullet (make-string (- 4 (length b=
ullet)) ?\s) heading tags<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;\n\n&quo=
t;<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(and contents<=
br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 (replace-regexp-in-string &quot;^&quot; &quot;=C2=A0 =C2=A0 &quot; content=
s)))))<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Use &quot;Setext&quot; style.<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0((eq style &#39;setext)<br>
&gt; -=C2=A0 =C2=A0 =C2=A0(concat heading tags anchor &quot;\n&quot;<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(make-string (length =
heading) (if (=3D level 1) ?=3D ?-))<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0&quot;\n\n&quot;<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0contents))<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0;; Use &quot;atx&quot; style.<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0(t (concat (make-string level ?#) &quot; &=
quot; heading tags anchor &quot;\n\n&quot;<br>
&gt; -=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0contents))))))=
<br>
&gt; -<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0(concat bullet (make-string (- 4 (length b=
ullet)) ?\s) heading tags &quot;\n\n&quot;<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(and contents =
(replace-regexp-in-string &quot;^&quot; &quot;=C2=A0 =C2=A0 &quot; contents=
)))))<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0(t (concat (org-md-headline-title style le=
vel title anchor tags) contents))))))<br>
&gt; +<br>
&gt; +<br>
&gt; +;; Headline Title<br>
&gt; +<br>
&gt; +(defun org-md-headline-title (style level title &amp;optional anchor =
tags)<br>
<br>
I suggest to name it `org-md--headline-title&#39; to highlight the fact tha=
t<br>
it is an internal function.<br>
<br>
&gt; +=C2=A0 &quot;Generate a headline title in the preferred Markdown head=
line style.<br>
&gt; +STYLE is the preferred style (&#39;atx or &#39;setext)<br>
&gt; +LEVEL is the header level.<br>
&gt; +TITLE is the headline title.<br>
&gt; +ANCHOR is the HTML anchor tag for the section as a string.<br>
&gt; +TAGS are the tags set on the section.&quot;<br>
&gt; +=C2=A0 (let ((anchor-lines (if anchor (concat anchor &quot;\n\n&quot;=
) nil)))<br>
<br>
=C2=A0 (and anchor (concat anchor &quot;\n\n&quot;))<br>
<br>
&gt; Subject: [PATCH 2/4] Add customizable footnotes-related variables<br>
&gt;<br>
&gt; Taking a cue from `ox-html.el&#39;, this patch adds<br>
&gt; `org-md-footnotes-section&#39; and `org-md-footnote-format&#39; to all=
ow user<br>
&gt; customization of the formatting for the footnotes section and individu=
al<br>
&gt; footnotes, respectively.<br>
<br>
Ditto (variable names...)<br>
<br>
&gt; +(defcustom org-md-footnotes-section &quot;%s%s&quot;<br>
&gt; +=C2=A0 &quot;Format for the footnotes section.<br>
<br>
Format string for...<br>
<br>
&gt; +The first %s placeholder will be replaced with the localized Footnote=
s section<br>
&gt; +heading, the second with the contents of the Footnotes section.&quot;=
<br>
<span>&gt; + :group &#39;org-export-md<br>
&gt; +=C2=A0 :type &#39;string)<br>
<br>
</span>You need to provide additional keywords, i.e.,<br>
<br>
=C2=A0 :version &quot;25.1&quot;<br>
=C2=A0 :package-version &#39;(Org . &quot;9.0&quot;)<br>
<span><br>
<br>
&gt; +(defcustom org-md-footnote-format &quot;&lt;sup&gt;%s&lt;/sup&gt;&quo=
t;<br>
&gt; +=C2=A0 &quot;The format for the footnote reference.<br>
</span>&gt; +The %s will be replaced by the footnote reference itself.&quot=
;<br>
<span>&gt; +=C2=A0 :group &#39;org-export-md<br>
&gt; +=C2=A0 :type &#39;string)<br>
<br>
</span>Ditto.<br>
<br>
&gt; Subject: [PATCH 3/4] Add footnote-generating functions<br>
&gt;<br>
&gt; Introduces the following functions:<br>
&gt;<br>
&gt; * `org-md-footnote-formatted&#39;<br>
&gt; * `org-md-footnote-section&#39;<br>
<br>
See above.<br>
<br>
&gt; +;;;; Footnote Section<br>
&gt; +<br>
&gt; +(defun org-md-footnote-formatted (footnote info)<br>
<br>
Suggestion: `org-md--footnote-formatted&#39;<br>
<br>
&gt; +=C2=A0 &quot;Formats a single footnote entry FOOTNOTE.<br>
<br>
You should specify the data type for FOOTNOTE, i.e., a cons cell<br>
<br>
=C2=A0 (number . definition)<br>
<br>
&gt; +INFO is a plist with contextual information.&quot;<br>
&gt; +=C2=A0 (let* ((fn-num (car footnote))<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(fn-text (cdr footnote))<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(fn-format (plist-get info :md-foot=
note-format))<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(fn-anchor (format &quot;fn.%d&quot=
; fn-num))<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(fn-href (format &quot; href=3D\&qu=
ot;#fnr.%d\&quot;&quot; fn-num))<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(fn-link-to-ref (org-html--anchor f=
n-anchor fn-num fn-href info)))<br>
&gt; +=C2=A0 =C2=A0 (concat (format fn-format fn-link-to-ref) &quot; &quot;=
 fn-text &quot;\n&quot;)))<br>
&gt; +<br>
&gt; +(defun org-md-footnote-section (info)<br>
&gt; +=C2=A0 &quot;Format the footnote section.<br>
<span>&gt; +INFO is a plist used as a communication channel.&quot;<br>
&gt; +=C2=A0 (let* ((fn-alist (org-export-collect-footnote-d<wbr>efinitions=
 info))<br>
</span>&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(fn-alist (loop for (n type =
raw) in fn-alist collect<br>
<span>&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =
=C2=A0 =C2=A0 =C2=A0 =C2=A0(cons n (org-trim (org-export-data raw info)))))=
<br>
<br>
</span>`cl-loop&#39;<br>
<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(headline-style (plist-get info :md=
-headline-style))<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0(section-title (org-html--translate=
 &quot;Footnotes&quot; info)))<br>
&gt; +=C2=A0 =C2=A0 (when fn-alist<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 (format (plist-get info :md-footnotes-section)<b=
r>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (org-md-headline-tit=
le headline-style 1 section-title)<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (mapconcat #&#39;(la=
mbda (fn) (org-md-footnote-formatted fn info))<br>
<br>
=C2=A0 (mapconcat (lambda (fn) ...) ...)<br>
<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0fn-alist<br>
&gt; +=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0 =C2=A0&quot;\n&quot;)))))<br>
<span>&gt; +<br>
&gt;=C2=A0 ;;;; Template<br>
&gt;<br>
&gt;=C2=A0 (defun org-md-inner-template (contents info)<br>
</span>&gt; --<br>
&gt; 2.9.2<br>
&gt;<br>
&gt;<br>
&gt; From a2e353da09d0db9bbde14641bd94e1<wbr>2e156a143c Mon Sep 17 00:00:00=
 2001<br>
&gt; From: Jake Romer &lt;<a href=3D"mailto:jkrmr@github.com" target=3D"_bl=
ank">jkrmr@github.com</a>&gt;<br>
&gt; Date: Sat, 13 Aug 2016 13:11:26 -0400<br>
&gt; Subject: [PATCH 4/4] Update org-md-inner-template to Markdown footnote=
s<br>
&gt;<br>
&gt; Updates `org-md-inner-template&#39; to use `org-md-footnotes-section&#=
39; to<br>
&gt; generate a Markdown version of the footnotes section.<br>
&gt;<br>
&gt; Also appends `:md-footnote-format&#39; and `md-footnotes-section&#39; =
to the<br>
&gt; exporter :options-alist.<br>
&gt; ---<br>
&gt;=C2=A0 ox-md.el | 15 +++++++++++++--<br>
&gt;=C2=A0 1 file changed, 13 insertions(+), 2 deletions(-)<br>
&gt;<br>
&gt; diff --git a/ox-md.el b/ox-md.el<br>
&gt; index 19b8912..7d78ff7 100644<br>
&gt; --- a/ox-md.el<br>
&gt; +++ b/ox-md.el<br>
&gt; @@ -105,7 +105,10 @@ The %s will be replaced by the footnote reference=
 itself.&quot;<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (=
src-block . org-md-example-block)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (=
template . org-md-template)<br>
&gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (=
verbatim . org-md-verbatim))<br>
&gt; -=C2=A0 :options-alist &#39;((:md-headline-style nil nil org-md-headli=
ne-style)))<br>
&gt; +=C2=A0 :options-alist<br>
&gt; +=C2=A0 &#39;((:md-headline-style nil nil org-md-headline-style)<br>
&gt; +=C2=A0 =C2=A0 (:md-footnote-format nil nil org-md-footnote-format)<br=
>
&gt; +=C2=A0 =C2=A0 (:md-footnotes-section nil nil org-md-footnotes-section=
)))<br>
<br>
These new parameters need to be documented in the manual: (info &quot;(org)=
<br>
Publishing options&quot;).<br>
<br>
Would you mind providing an entry in ORG-NEWS and send again the patches<br=
>
from root directory so I can apply them?<br>
<br>
Thank you!<br>
<br>
Regards,<br>
<span><font color=3D"#888888"><br>
--<br>
Nicolas Goaziou<br>
</font></span></blockquote></div><br></div></div>

--001a114dfab4bfdaa7053aa25b44--

--001a114dfab4bfdabc053aa25b46
Content-Type: application/octet-stream; name="render-fn-as-md.patch"
Content-Disposition: attachment; filename="render-fn-as-md.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_is5lsf4f0

RnJvbSBjMWQ4NmQ4NzI4MDBkMzVkYzEzZTk1MjMzMzUxNTRhNmNjOWExMWNhIE1vbiBTZXAgMTcg
MDA6MDA6MDAgMjAwMQpGcm9tOiBKYWtlIFJvbWVyIDxqa3JtckBnaXRodWIuY29tPgpEYXRlOiBT
dW4sIDIxIEF1ZyAyMDE2IDE0OjA4OjI5IC0wNzAwClN1YmplY3Q6IFtQQVRDSF0gb3gtbWQuZWw6
IEV4cG9ydCBmb290bm90ZXMgc2VjdGlvbiBhcyBNYXJrZG93bgoKKiBsaXNwL294LW1kLmVsIChv
cmctbWQtLWhlYWRsaW5lLXRpdGxlKTogTmV3IGZ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