From mboxrd@z Thu Jan 1 00:00:00 1970 From: Martyn Jago Subject: Re: [babel] Collection of code block snippets Date: Fri, 09 Sep 2011 12:11:16 +0100 Message-ID: References: <878vq48dvt.fsf@gmail.com> <87zkiiq4ko.fsf@gmail.com> <87bouxr3v1.fsf@gmail.com> <87mxef6p4r.fsf@gmail.com> <87bouvdj15.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([140.186.70.92]:50054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1yzf-0008Cy-Ek for emacs-orgmode@gnu.org; Fri, 09 Sep 2011 07:11:36 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1yzd-0003lF-W5 for emacs-orgmode@gnu.org; Fri, 09 Sep 2011 07:11:35 -0400 Received: from lo.gmane.org ([80.91.229.12]:48223) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1yzd-0003kZ-M5 for emacs-orgmode@gnu.org; Fri, 09 Sep 2011 07:11:33 -0400 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R1yzb-0005kJ-Hl for emacs-orgmode@gnu.org; Fri, 09 Sep 2011 13:11:31 +0200 Received: from 88-96-171-142.dsl.zen.co.uk ([88.96.171.142]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Sep 2011 13:11:31 +0200 Received: from martyn.jago by 88-96-171-142.dsl.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 09 Sep 2011 13:11:31 +0200 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: emacs-orgmode@gnu.org Hi Eric Martyn Jago writes: [...] > > One problem on my system is that emacs was using the wrong org mode > since the newer org location wasn't known about. Also, the languages, > emacs-lisp and sh need to be switched on (I thought emacs-lisp was on by > default)? I was quite wrong here, emacs-lisp is available - apologies for the noise. My last stab at this is floating a suggestion for something like the following in org-tests.el... --8<---------------cut here---------------start------------->8--- (let ((org-test-dir (expand-file-name (file-name-directory (or load-file-name buffer-file-name))))) (let ((org-lisp-dir (expand-file-name (concat org-test-dir "../lisp")))) (unless (member 'features "org") (setq load-path (cons org-lisp-dir load-path)) (org-babel-do-load-languages 'org-babel-load-languages '((sh . t))))) (let* ((load-path (cons (expand-file-name "ert" org-test-dir) (cons (expand-file-name "jump" org-test-dir) load-path)))) (require 'ert) (require 'ert-x) (require 'jump) (require 'which-func) (require 'org))) --8<---------------cut here---------------end--------------->8--- In otherwords, if org is not yet a feature, add org mode to the load path _and_ =do-load-babel-languages= adding sh, but keeping evaluation confirmation on the command line. This reduces your script back to... --8<---------------cut here---------------start------------->8--- Emacs -Q -batch -l org-test.el -eval "(setq org-confirm-babel-evaluate nil)" -f org-test-run-batch-tests --8<---------------cut here---------------end--------------->8--- Regards Martyn [...]