From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Berry, Charles" Subject: Re: Library of Babel confusion Date: Tue, 3 Apr 2018 21:39:41 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:41874) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f3Teh-0002TL-72 for emacs-orgmode@gnu.org; Tue, 03 Apr 2018 17:39:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f3Tee-0005CD-1s for emacs-orgmode@gnu.org; Tue, 03 Apr 2018 17:39:51 -0400 Received: from iport-bcv2-out.ucsd.edu ([132.239.0.73]:20559) by eggs.gnu.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.71) (envelope-from ) id 1f3Ted-0005BY-Hf for emacs-orgmode@gnu.org; Tue, 03 Apr 2018 17:39:47 -0400 In-Reply-To: Content-Language: en-US Content-ID: <498AE6BD53C6E44587272A765E49B8D1@AD.UCSD.EDU> 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: Lawrence Bottorff Cc: emacs-orgmode Mailinglist > On Apr 3, 2018, at 1:31 PM, Lawrence Bottorff wrote: >=20 > I've been trying to grok LOB again. So I've cloned the worg git and libra= ry-of-babel.el is one of the files. org-babel-lob-injest didn't work, Try=20 M-x org-babel-lob-ingest RET org/worg/library-of-babel.org RET Don't be a jester, be an ingester. ;-) > so I customized org-babel-lob-files and inserted .../worg/library-of-babe= l.el . . . and it did in fact get added to my init.el under the custom-set-= variables: >=20 > '(org-babel-lob-files (quote ("~/org/worg/library-of-babel.org"))) >=20 > I checked org-babel-library-of-babel variable, and the new things seemed = to be there, although it's rather mind-bending to know I will be calling LO= B code that is internally stored inside of an association list. >=20 > Now, in my org file I put this: >=20 > #+lob: write(file=3D"jsontest") See (info"(org) Evaluating code blocks") The proper idiom is #+call: write(file=3D"jsontest") Of course, there needs to be a proper 'write' src block in the file you ing= ested, etc. >=20 > and try C-c C-c on it. Nothing. My minibuffer says "local setup has been = refreshed". How does one use, call a LOB function? Also, while I'm demonstr= ating my rank noobian-ness, I try this: >=20 > #+name: myelsquare > #+header: :var x=3D0 > #+begin_src emacs-lisp > (* x x) > #+end_src >=20 > #+call: myelsquare(x=3D6) >=20 > #+RESULTS: > : 36 >=20 > but this results in >=20 > #+name: myelsquare > #+header: :var x=3D0 > #+begin_src emacs-lisp > (defun myelsquare (x) > (* x x)) > #+end_src >=20 > #+call: myelsquare(x=3D6) >=20 > #+RESULTS: > : myelsquare2 Is this *verbatim* ? Did you cut and paste everything (including the traili= ng `2') all at once? If so, I do not get it. I would have expected #+RESULTS: : myelsquare which is the correct behavior. To see why put point in the myelsquare src block and type C-c C-v v then move point to the end of the 'preview' buffer and type C-x C-e. Look at the value echo-ed in the minibuffer. If it still isn't clear maybe `M-x (symbol-function 'myelsquare)' will help= .=20 HTH, Chuck=