From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lars Tveito Subject: Re: Add-on: Github Flavored Markdown exporter Date: Wed, 09 Apr 2014 10:32:14 +0200 Message-ID: References: <87a9bwbx6t.fsf@gmail.com> <878urg12im.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52091) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXnvv-0005xw-2q for emacs-orgmode@gnu.org; Wed, 09 Apr 2014 04:32:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WXnvp-0007ha-6e for emacs-orgmode@gnu.org; Wed, 09 Apr 2014 04:32:35 -0400 Received: from mail-out4.uio.no ([129.240.10.15]:37154) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WXnvo-0007hT-SL for emacs-orgmode@gnu.org; Wed, 09 Apr 2014 04:32:29 -0400 In-reply-to: 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: Charles Berry Cc: emacs-orgmode@gnu.org Charles Berry writes: > Lars Tveito student.matnat.uio.no> writes: > >> >> Hi, thanks for checking it out! >> >> Thorsten Jolitz writes: >> >> > Thorsten Jolitz gmail.com> writes: >> > >> >> Lars Tveito 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