From mboxrd@z Thu Jan 1 00:00:00 1970 From: dpom Subject: ob-xml Date: Thu, 10 Mar 2011 12:01:49 +0200 Message-ID: <87fwqvfg4y.fsf@bob.home.net> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from [140.186.70.92] (port=37898 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Pxch5-0008RE-Kh for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 05:02:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Pxch4-0006h6-HJ for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 05:02:07 -0500 Received: from lo.gmane.org ([80.91.229.12]:46496) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Pxch3-0006gc-RR for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 05:02:06 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Pxch2-0004Gf-6y for emacs-orgmode@gnu.org; Thu, 10 Mar 2011 11:02:04 +0100 Received: from 86.34.14.194 ([86.34.14.194]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Mar 2011 11:02:04 +0100 Received: from dan.pomohaci by 86.34.14.194 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 10 Mar 2011 11:02:04 +0100 List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --=-=-= Hello, Using ob-template I created a minimal ob-xml (attached to this mail). In my emacs config I added xml to org-babel-load-languages and nxml in org-src-lang-modes. Everything works ok except a small glitch. The tangled file always start with an empty line (not present in the babel bloc). How could I remove it? I use org-mode 7.5 Thank you, dpom --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=ob-xml.el Content-Transfer-Encoding: quoted-printable ;;; ob-xml.el --- org-babel functions for xml evaluation ;; Copyright (C) Dan Pomohaci ;; Author: Dan Pomohaci ;; Keywords: literate programming, reproducible research ;; Homepage: http://orgmode.org ;; Version: 0.01 ;;; License: ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation; either version 3, or (at your option) ;; any later version. ;; ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs; see the file COPYING. If not, write to the ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, ;; Boston, MA 02110-1301, USA. ;;; Commentary: ;;; Requirements: ;;; Code: (require 'ob) (require 'ob-ref) (require 'ob-comint) (require 'ob-eval) (require 'nxml-mode) ;; define a file extension for this language (add-to-list 'org-babel-tangle-lang-exts '("xml" . "xml")) ;; declare default header arguments for this language (defvar org-babel-default-header-args:xml '()) (defun org-babel-execute:xml (body params) "Execute a block of XML code. This function is called by `org-babel-execute-src-block'." body) (defun org-babel-prep-session:xml (session params) "Return an error if the :session header argument is set." (error "XML sessions are nonsensical")) (provide 'ob-xml) ;;; ob-xml.el ends here --=-=-=--