From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nicolas Goaziou Subject: Re: Error when =(stata . t)= added to =org-babel-do-load-languages= in an attempt to evaluate Stata code in org-mode Date: Sun, 15 Jan 2017 09:41:07 +0100 Message-ID: <87vatgu34s.fsf@nicolasgoaziou.fr> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:38503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cSgNH-0003d3-4Q for emacs-orgmode@gnu.org; Sun, 15 Jan 2017 03:41:16 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cSgNE-0004uZ-3h for emacs-orgmode@gnu.org; Sun, 15 Jan 2017 03:41:15 -0500 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:40486) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cSgND-0004uG-TR for emacs-orgmode@gnu.org; Sun, 15 Jan 2017 03:41:12 -0500 In-Reply-To: (Daniel Guinea's message of "Sun, 8 Jan 2017 18:00:01 +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" To: Daniel Guinea Cc: emacs-orgmode@gnu.org Hello, Daniel Guinea writes: > However, I also want to evaluate Stata code in org-mode documents. For that > I have > downloaded the script =ob-stata.el= by Ista Zahn and I have saved it > together with the other =ob-sth.el= files in > =~/.emacs.d/elpa/org-20161224=. Moreover, I have edited the entry: > > (defcustom org-babel-stata-command inferior-STA-program-name > "Name of command to use for executing stata code." > :group 'org-babel > :version "24.1" > :package-version '(Org . "8.3") > :type 'string) > > to reflect my current version of Org, so this piece of code currently > stands as follows in my version of =ob-stata.el=: > > (defcustom org-babel-stata-command inferior-STA-program-name > "Name of command to use for executing stata code." > :group 'org-babel > :version "24.1" > :package-version '(Org . "9.0.3") > :type 'string) This part is not needed. :package-version is used to specify when a defcustom was introduced or when its default value last changed. > However, if I add =(stata . t)= to =org-babel-do-load-languages= as follows: > > (org-babel-do-load-languages > 'org-babel-load-languages > '((emacs-lisp . t) > (sh . t) > (R . t) > (perl . t) > (ruby . t) > (python . t) > (js . t) > (haskell . t) > (stata . t) > (shell . t))) > > I get the following message when I restart emacs: > > ################# Beginning of debugger message ################### > > Debugger entered--Lisp error: (void-variable inferior-STA-program-name) inferior-STAT-program-name is a variable defined in "ess-custom.el". The error probably comes from the fact "ob-stata.el" is loaded before "ess-custom.el" is. You may want to tell the author of "ob-stata.el" about it. It is missing a (require 'ess) somewhere in the library. Regards, -- Nicolas Goaziou