From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Schulte Subject: Re: [babel] Collection of code block snippets Date: Fri, 09 Sep 2011 14:39:36 -0600 Message-ID: <87pqj9fo0x.fsf@gmail.com> 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]:39397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R27rv-0001CY-H8 for emacs-orgmode@gnu.org; Fri, 09 Sep 2011 16:40:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R27ru-0004o8-51 for emacs-orgmode@gnu.org; Fri, 09 Sep 2011 16:40:11 -0400 Received: from mail-pz0-f44.google.com ([209.85.210.44]:48691) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R27rt-0004iD-TW for emacs-orgmode@gnu.org; Fri, 09 Sep 2011 16:40:10 -0400 Received: by mail-pz0-f44.google.com with SMTP id 36so3877348pzk.17 for ; Fri, 09 Sep 2011 13:40:09 -0700 (PDT) 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: Martyn Jago Cc: emacs-orgmode@gnu.org Martyn Jago writes: > 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... > > (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))) > Looks perfect, I'm adding this to the definition of `org-test-run-batch-tests'. I still get one failing test when running this in batch mode. ,---- | 1 unexpected results: | FAILED test-org-babel/inline-src-blocks `---- and 6 failures when run interactively, but these may be local issues so I'll check them out. ,---- | Selector: "\\(org\\|ob\\)" | Passed: 103 | Failed: 6 (6 unexpected) | Total: 109/109 | | Started at: 2011-09-09 14:38:49-0600 | Finished. | Finished at: 2011-09-09 14:38:54-0600 | | ..........................................................................F..FFFFF........................... | | F test-org-babel/inline-src_blk-default-results-replace-line-1 | (error "C-c C-c can do nothing useful at this location") | | F test-org-babel/inline-src_blk-results-file | (error "C-c C-c can do nothing useful at this location") | | F test-org-babel/inline-src_blk-results-raw | (error "C-c C-c can do nothing useful at this location") | | F test-org-babel/inline-src_blk-results-scalar | (error "C-c C-c can do nothing useful at this location") | | F test-org-babel/inline-src_blk-results-silent | (error "C-c C-c can do nothing useful at this location") | | F test-org-babel/inline-src_blk-results-verbatim | (error "C-c C-c can do nothing useful at this location") `---- Thanks -- Eric > > 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... > > Emacs -Q -batch -l org-test.el -eval "(setq org-confirm-babel-evaluate nil)" -f org-test-run-batch-tests > > Regards > > Martyn > > > [...] > > > -- Eric Schulte http://cs.unm.edu/~eschulte/