emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: "Sébastien Vauban" <wxhgmqzgwmuf-geNee64TY+gS+FvcfC7Uqw@public.gmane.org>
To: emacs-orgmode-mXXj517/zsQ@public.gmane.org
Subject: [babel] Execute checks before trying to load Babel languages
Date: Wed, 09 Feb 2011 14:03:50 +0100	[thread overview]
Message-ID: <80oc6l9x6x.fsf@missioncriticalit.com> (raw)

Hi,

I am sharing my .emacs file, and this is beginning to cause problems with
people who don't have the same environment as I do. In particular with the
following:

#+begin_src emacs-lisp
          (org-babel-do-load-languages
           'org-babel-load-languages
           '(
             (C . t)
             (R . t)
             (calc . t)
             (ditaa . t)
             (dot . t)
             (emacs-lisp . t)
             (gnuplot . t)
             (haskell . nil)
             (latex . t)
             (ledger . t)
             (ocaml . nil)
             (octave . nil)
             (org . t)
             (perl . t)
             (python . t)
             (ruby . t)
             (screen . t)
             (sh . t)
             (sql . t)
             (sqlite . t)))
#+end_src

Someone got:

--8<---------------cut here---------------start------------->8---
    Debugger entered--Lisp error: (file-error "Cannot open load file" "ob-calc")
--8<---------------cut here---------------end--------------->8---

In fact, this is much more general than checking the Org-version: it addresses
as well installed packages such as

- Rterm (R and ess-mode)
- ditaa (requires =sudo aptitude install openjdk-6-jre=)
- gnuplot (requires gnuplot-mode)
- ledger (requires that =ob-ledger= is found...)
- org (requires that =ob-org= is found...)
- ruby

Do I have to check myself for such executables in a way similar to:

#+begin_src emacs-lisp
(when (find-exec "Rterm")
  ... add R language ...
  )

(when (file-exists-p "ob-ledger")
  ... add ledger language ...
  )
#+end_src

or could we come up with some more generic and compact solution that would
easily be usable by all of us?

Maybe such a check should be made, by default, in every language file?

Best regards,
  Seb

-- 
Sébastien Vauban


_______________________________________________
Emacs-orgmode mailing list
Please use `Reply All' to send replies to the list.
Emacs-orgmode-mXXj517/zsQ@public.gmane.org
http://lists.gnu.org/mailman/listinfo/emacs-orgmode

             reply	other threads:[~2011-02-09 13:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09 13:03 Sébastien Vauban [this message]
2011-02-09 15:29 ` [babel] Execute checks before trying to load Babel languages Dan Davison

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=80oc6l9x6x.fsf@missioncriticalit.com \
    --to=wxhgmqzgwmuf-genee64ty+gs+fvcfc7uqw@public.gmane.org \
    --cc=emacs-orgmode-mXXj517/zsQ@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).