emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Achim Gratz <Stromeko@nexgo.de>
To: emacs-orgmode@gnu.org
Subject: Re: babel perl issue
Date: Sun, 09 Dec 2012 21:34:49 +0100	[thread overview]
Message-ID: <87wqwrrml2.fsf@Rainer.invalid> (raw)
In-Reply-To: 87sj7fp7om.fsf@gmail.com

[-- Attachment #1: Type: text/plain, Size: 745 bytes --]

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-<lang>.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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Keep-requires-at-the-beginning-of-the-file.patch --]
[-- Type: text/x-patch, Size: 3336 bytes --]

From 12d87c5d944b75f8acbd6cacb3351cede1d44525 Mon Sep 17 00:00:00 2001
From: Achim Gratz <Stromeko@Stromeko.DE>
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-<lang> 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


[-- Attachment #3: Type: text/plain, Size: 139 bytes --]




Regards,
Achim.
-- 
+<[Q+ Matrix-12 WAVE#46+305 Neuron microQkb Andromeda XTk Blofeld]>+

DIY Stuff:
http://Synth.Stromeko.net/DIY.html

  reply	other threads:[~2012-12-09 20:35 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-09 10:54 babel perl issue flav
2012-12-09 11:15 ` Achim Gratz
2012-12-09 15:22   ` Eric Schulte
2012-12-09 20:34     ` Achim Gratz [this message]
2012-12-10 15:11       ` Eric Schulte
2012-12-10 15:22         ` flav
2012-12-10 15:32           ` Eric Schulte
2012-12-10 15:43             ` flav
2012-12-10 17:24               ` Eric Schulte
2012-12-11  9:05                 ` flav
2012-12-11 13:45                   ` Eric Schulte
2012-12-11 15:50                     ` flav
2012-12-11 18:04                     ` Achim Gratz
2012-12-12  6:15                     ` flav
2012-12-10 17:51               ` Achim Gratz
2012-12-10 17:44         ` Achim Gratz
2012-12-10 18:13           ` Eric Schulte
2012-12-10 18:36             ` Achim Gratz
2012-12-11 14:33               ` Eric Schulte
2012-12-11 18:31                 ` Achim Gratz
2012-12-12  0:22                   ` Eric Schulte
2012-12-12 13:34                     ` Achim Gratz
2012-12-11 18:39                 ` Bastien
2012-12-12  0:25                   ` Eric Schulte
2012-12-12 15:57                     ` Bastien
2012-12-12 16:11                       ` Eric Schulte
2012-12-12 16:23                         ` Bastien
2012-12-12 16:33                           ` Eric Schulte
2012-12-12 16:59                             ` Bastien
2012-12-12 17:09                               ` Eric Schulte
2012-12-12 17:13                               ` Achim Gratz
2012-12-12 17:24                                 ` Bastien
2012-12-12 17:47                                   ` Eric Schulte
2012-12-12 18:07                                     ` Bastien
2012-12-12 18:28                                       ` Eric Schulte
2012-12-13 23:27                                         ` Bastien
2012-12-13 23:37                                           ` Bastien
2012-12-14  0:37                                           ` Eric Schulte
2012-12-14  9:55                                             ` Bastien
2012-12-14 15:57                                               ` Eric Schulte
2012-12-14 17:44                                                 ` Bastien
2012-12-14 18:13                                                   ` Eric Schulte
2012-12-14 19:11                                                     ` Bastien
2012-12-12 18:00                                   ` Achim Gratz
2012-12-12 15:59       ` Bastien
2012-12-12 16:54         ` Achim Gratz
     [not found]   ` <CAOnk0vRL8PWS3JfuCAqcRcNa3FkM7tG3eH5w8cBdwtNrx757Xw@mail.gmail.com>
     [not found]     ` <1497100.pF6dAE0Itl@rainer>
2012-12-10  5:32       ` flav
2012-12-10 10:33         ` flav
2012-12-10 15:13           ` Eric Schulte

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=87wqwrrml2.fsf@Rainer.invalid \
    --to=stromeko@nexgo.de \
    --cc=emacs-orgmode@gnu.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).