From mboxrd@z Thu Jan 1 00:00:00 1970 From: Achim Gratz Subject: Re: babel perl issue Date: Sun, 09 Dec 2012 21:34:49 +0100 Message-ID: <87wqwrrml2.fsf@Rainer.invalid> References: <87a9tntr29.fsf@Rainer.invalid> <87sj7fp7om.fsf@gmail.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:59100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Thnac-0006hJ-Ng for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 15:35:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Thnab-0007pl-0t for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 15:35:06 -0500 Received: from plane.gmane.org ([80.91.229.3]:47785) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Thnaa-0007lY-Nc for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 15:35:04 -0500 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1Thnal-0001mR-8v for emacs-orgmode@gnu.org; Sun, 09 Dec 2012 21:35:15 +0100 Received: from pd9eb3545.dip.t-dialin.net ([217.235.53.69]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Dec 2012 21:35:15 +0100 Received: from Stromeko by pd9eb3545.dip.t-dialin.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 09 Dec 2012 21:35:15 +0100 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 --=-=-= Content-Type: text/plain Eric Schulte writes: > See http://orgmode.org/manual/Languages.html for the documentation on > how to activate and disable org-babel languages. That actually produces the error: File mode specification error: (void-variable org-babel-tangle-lang-exts) as the OP has found out (and I can reproduce it). The reason is that none of the ob-.el files do a (require ob-tangle), but try to change a defcustom in ob.tangle.el that is only declared, but not yet available at the time. I've quickfixed it by moving the require for ob-tangle in org.el to the beginning of the file, but this is now relying on the fact that org is implicitly loaded for getting the major mode set up, so all the babel language files still need to be cleaned up. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Keep-requires-at-the-beginning-of-the-file.patch >From 12d87c5d944b75f8acbd6cacb3351cede1d44525 Mon Sep 17 00:00:00 2001 From: Achim Gratz Date: Sun, 9 Dec 2012 21:26:16 +0100 Subject: [PATCH] Keep requires at the beginning of the file * lisp/org.el: Keep require forms at the beginning of the file. Thanks to "flav" for providing an example that showed ob-tangle was required too late. Also, all ob- files should IMHO require ob-tangle instead of declaring dynamic variables and relying on org.el to do the require. --- lisp/org.el | 62 ++++++++++++++++++++++++++++++------------------------------- 1 file changed, 31 insertions(+), 31 deletions(-) diff --git a/lisp/org.el b/lisp/org.el index c5be3c5..42d4c0d 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -78,6 +78,37 @@ (defvar org-table-formula-constants-local nil (require 'find-func) (require 'format-spec) +(require 'outline) +(if (and (not (keymapp outline-mode-map)) (featurep 'allout)) + (error "Conflict with outdated version of allout.el. Load org.el before allout.el, or upgrade to newer allout, for example by switching to Emacs 22")) +(require 'noutline "noutline" 'noerror) ;; stock XEmacs does not have it + +;; Other stuff we need. +(require 'time-date) +(unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time)) +(require 'easymenu) +(require 'overlay) + +(require 'org-macs) +(require 'org-entities) +;; (require 'org-compat) moved higher up in the file before it is first used +(require 'org-faces) +(require 'org-list) +(require 'org-pcomplete) +(require 'org-src) +(require 'org-footnote) + +;; babel +(require 'ob) +(require 'ob-table) +(require 'ob-lob) +(require 'ob-ref) +(require 'ob-tangle) +(require 'ob-comint) +(require 'ob-keys) + +(require 'font-lock) + (let ((load-suffixes (list ".el"))) (load "org-loaddefs" 'noerror nil nil 'mustsuffix)) @@ -4939,35 +4970,6 @@ (defvar org-table-buffer-is-an nil) (defvar bidi-paragraph-direction) (defvar buffer-face-mode-face) -(require 'outline) -(if (and (not (keymapp outline-mode-map)) (featurep 'allout)) - (error "Conflict with outdated version of allout.el. Load org.el before allout.el, or upgrade to newer allout, for example by switching to Emacs 22")) -(require 'noutline "noutline" 'noerror) ;; stock XEmacs does not have it - -;; Other stuff we need. -(require 'time-date) -(unless (fboundp 'time-subtract) (defalias 'time-subtract 'subtract-time)) -(require 'easymenu) -(require 'overlay) - -(require 'org-macs) -(require 'org-entities) -;; (require 'org-compat) moved higher up in the file before it is first used -(require 'org-faces) -(require 'org-list) -(require 'org-pcomplete) -(require 'org-src) -(require 'org-footnote) - -;; babel -(require 'ob) -(require 'ob-table) -(require 'ob-lob) -(require 'ob-ref) -(require 'ob-tangle) -(require 'ob-comint) -(require 'ob-keys) - ;;;###autoload (define-derived-mode org-mode outline-mode "Org" "Outline-based notes management and organizer, alias @@ -5174,8 +5176,6 @@ (defvar org-mouse-map (make-sparse-keymap)) (org-defkey org-mouse-map [(tab)] 'org-open-at-point) (org-defkey org-mouse-map "\C-i" 'org-open-at-point)) -(require 'font-lock) - (defconst org-non-link-chars "]\t\n\r<>") (defvar org-link-types '("http" "https" "ftp" "mailto" "file" "news" "shell" "elisp" "doi" "message")) -- 1.8.0.1 --=-=-= Content-Type: text/plain Regards, Achim. -- +<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+ DIY Stuff: http://Synth.Stromeko.net/DIY.html --=-=-=--