emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] [babel] Collection of code block snippets


From: Martyn Jago
Subject: Re: [O] [babel] Collection of code block snippets
Date: Fri, 09 Sep 2011 12:11:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (darwin)

Hi Eric

Martyn Jago <address@hidden> 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


[...]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]