From: Lars Tveito <larstvei@student.matnat.uio.no>
To: Charles Berry <ccberry@ucsd.edu>
Cc: emacs-orgmode@gnu.org
Subject: Re: Add-on: Github Flavored Markdown exporter
Date: Wed, 09 Apr 2014 10:32:14 +0200 [thread overview]
Message-ID: <m2fvlm299t.fsf@1x-193-157-254-237.uio.no> (raw)
In-Reply-To: <loom.20140409T053918-272@post.gmane.org>
Charles Berry writes:
> Lars Tveito <larstvei <at> student.matnat.uio.no> writes:
>
>>
>> Hi, thanks for checking it out!
>>
>> Thorsten Jolitz writes:
>>
>> > Thorsten Jolitz <tjolitz <at> gmail.com> writes:
>> >
>> >> Lars Tveito <larstvei <at> student.matnat.uio.no> writes:
>> >>
>> >>> Hi!
>> >>>
>> >>> I have written an exporter for Github Flavored Markdown, which is a
>> >>> derived back-end from the Markdown (vanilla) exporter. It adds
>> >>> Github-style src-blocks, strike-through and table of contents.
> [snip]
>
> Nice!
>
>>
>> Getting it to work with source-blocks was the feature I missed the most
>> from the vanilla markdown exporter. If you specify a language in the
>> source-block it will be added to the exported version as well; a problem
>> occurs if you specify a language not supported by Github. Emacs lisp is
>> an example of this, so there is a alist `org-gfm-lang' which by default
>> has the value:
>>
>> (("emacs-lisp" . "lisp") ("elisp" . "lisp"))
>>
>> So a source block like this:
>>
>> #+begin_src emacs-lisp
>> (defun foo ()
>> 'foo)
>> #+end_src
>>
>> exports to this:
>>
>> ```lisp
>> (defun foo ()
>> 'foo)
>> ```
>
> In
>
> https://github.com/github/linguist/blob/master/lib/linguist/languages.yml
>
> I see this:
>
> ,----
> | Emacs Lisp:
> | type: programming
> | lexer: Scheme
> | color: "#c065db"
> | aliases:
> | - elisp
> | - emacs
> | primary_extension: .el
> | filenames:
> | - .emacs
> | extensions:
> | - .emacs
> `----
>
>
> so doesn't '#+BEGIN_SRC elisp' just work?
>
> And shouldn't '(("emacs-lisp" . "elisp")) be the value of `org-gfm-lang'?
>
> HTH,
>
> Chuck
I have visited that file, and found this as well, but it does not seem
to work. I double checked this now with these tests:
https://gist.github.com/larstvei/8e06967dd099e0bd2c4c
If elisp was a language recognized in Markdown (github flavored), then
you'd be right about the value of `org-gfm-lang'.
Now it serves as a workaround to be able to work with languages that Org
deals with just fine, but does not export nice. If there is a language
with similar syntax, one can tell the gfm-exporter to use that language
instead.
I am not very fond of this workaround, but I haven't found a better
solution yet. Suggestions are very welcome!
- Lars
next prev parent reply other threads:[~2014-04-09 8:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-06 21:33 Add-on: Github Flavored Markdown exporter Lars Tveito
2014-04-07 22:18 ` Thorsten Jolitz
2014-04-08 11:31 ` Thorsten Jolitz
2014-04-08 21:39 ` Lars Tveito
2014-04-09 2:06 ` Grant Rettke
2014-04-09 4:38 ` Nick Dokos
2014-04-09 4:07 ` Charles Berry
2014-04-09 8:32 ` Lars Tveito [this message]
2014-04-09 7:03 ` Thorsten Jolitz
2014-04-11 10:29 ` Bastien
2014-04-11 15:57 ` Lars Tveito
2014-06-09 15:50 ` Nicolas Girard
2014-06-09 16:45 ` Bastien
2014-06-09 19:07 ` Nicolas Girard
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=m2fvlm299t.fsf@1x-193-157-254-237.uio.no \
--to=larstvei@student.matnat.uio.no \
--cc=ccberry@ucsd.edu \
--cc=emacs-orgmode@gnu.org \
/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).