From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Patch for org-md, with optional GFM source code output Date: Sun, 05 May 2013 19:49:14 +0200 Message-ID: <87mws9fhb9.fsf@gmail.com> References: <51869062.7010701@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:60694) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ33j-0005EH-28 for emacs-orgmode@gnu.org; Sun, 05 May 2013 13:49:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UZ33h-0006Kj-Pd for emacs-orgmode@gnu.org; Sun, 05 May 2013 13:49:14 -0400 Received: from mail-wg0-x235.google.com ([2a00:1450:400c:c00::235]:46982) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UZ33h-0006KT-K8 for emacs-orgmode@gnu.org; Sun, 05 May 2013 13:49:13 -0400 Received: by mail-wg0-f53.google.com with SMTP id y10so3008615wgg.32 for ; Sun, 05 May 2013 10:49:12 -0700 (PDT) In-Reply-To: <51869062.7010701@gmail.com> (=?utf-8?B?Iua1heS6lSDmlL/lpKo=?= =?utf-8?B?6YOOIidz?= message of "Mon, 06 May 2013 02:01:22 +0900") 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: =?utf-8?B?5rWF5LqVIOaUv+WkqumDjg==?= Cc: emacs-orgmode@gnu.org Hello, =E6=B5=85=E4=BA=95 =E6=94=BF=E5=A4=AA=E9=83=8E wr= ites: > Not sure this will be accepted, > but personally it is very useful when I > output org to md and publish it with octopress. Thanks for your patch. Though, the very point of ox-md.el is to produce vanilla flavour, not Octopress' or Github's. You could create a derived back-end from it instead, e.g. ox-md-octopress.el and request to put it in contrib directory. See `org-export-define-derived-backend' for details. > +(defun %string-prop (prop block) > + (let ((prop (org-element-property prop block))) > + (if prop prop ""))) This is not needed (and the namespace used is wrong: it should be prefixed with `org-md-....' since there's no module in elisp). I suggest to use `org-string-nw-p' instead. > +(defun org-md-src-block (src-block contents info) > + "Transcode SRC-BLOCK element into Markdown format. > +CONTENTS is nil. INFO is a plist used as a communication > +channel." > + (case org-md-src-style > + (indent (org-md-example-block src-block contents info)) > + (github-flavored > + (concatenate `concat' is sufficient here. Regards, --=20 Nicolas Goaziou