* [BABEL] help adding a language, please?
@ 2010-07-22 20:13 scrawler
2010-07-22 22:30 ` Eric Schulte
2010-07-22 23:20 ` David O'Toole
0 siblings, 2 replies; 5+ messages in thread
From: scrawler @ 2010-07-22 20:13 UTC (permalink / raw)
To: Org Mode
Hi guys,
Org-mode newbie, here. I'd like to add newlisp to the list
of languages that babel supports. I got ob-template.el and
replaced all occurrences of "template" with "newlisp."
When I try to execute a code block, it fails, looking for
"inf-newlisp." That's "inferior-mode," right? Can I work
around that somehow? There is a newlisp mode available
here:
http://github.com/may/newlisp-mode
I'm running Org-mode 7.01.
Org-mode is great! I sure hope you guys are tolerant of
stupid questions, because I've got a bunch of them.
:-)
--
signature riding a horse: "clopclopclopclop"
-tom
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BABEL] help adding a language, please?
2010-07-22 20:13 [BABEL] help adding a language, please? scrawler
@ 2010-07-22 22:30 ` Eric Schulte
2010-07-22 23:20 ` David O'Toole
1 sibling, 0 replies; 5+ messages in thread
From: Eric Schulte @ 2010-07-22 22:30 UTC (permalink / raw)
To: scrawler; +Cc: Org Mode
Hi,
scrawler@gmail.com writes:
> Hi guys,
>
> Org-mode newbie, here. I'd like to add newlisp to the list
> of languages that babel supports.
That's fantastic.
> I got ob-template.el and replaced all occurrences of "template" with
> "newlisp."
>
> When I try to execute a code block, it fails, looking for
> "inf-newlisp." That's "inferior-mode," right? Can I work
> around that somehow? There is a newlisp mode available
> here:
> http://github.com/may/newlisp-mode
> I'm running Org-mode 7.01.
>
This depends if you'd rather execute newlisp code blocks in a "session"
(i.e. in an inferior newlisp buffer, which would require newlisp-mode),
or if you'd rather evaluate newlisp externally. Most languages support
both types of evaluation, but I'd recommend starting with a single
execution mode (whichever will be simpler to implement), and then
incrementally adding functionality.
I just installed newlisp locally, it looks like a nice language, I may
start using this as I've been looking for a light-weight lisp/scheme for
small scripting tasks.
I just put together the following, which works for me as a simple
evaluation function -- note this takes the "external evaluation" path.
--8<---------------cut here---------------start------------->8---
(defun org-babel-execute:newlisp (body params)
(let ((tmp-file (make-temp-file "org-babel-newlisp")))
(with-temp-file tmp-file
(insert
(format "(println (begin\n%s\n))\n(exit)" body)))
(prog1 (org-babel-eval (format "newlisp -f %s" tmp-file) "")
(delete-file tmp-file))))
--8<---------------cut here---------------end--------------->8---
Note, this doesn't make use of *any* of Babels header argument
functionality, but it could serve as a place to start.
>
> Org-mode is great! I sure hope you guys are tolerant of
> stupid questions, because I've got a bunch of them.
> :-)
Please don't be shy about asking questions, we can be a very
understanding bunch.
Happy Hacking -- Eric
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BABEL] help adding a language, please?
2010-07-22 20:13 [BABEL] help adding a language, please? scrawler
2010-07-22 22:30 ` Eric Schulte
@ 2010-07-22 23:20 ` David O'Toole
2010-07-23 16:01 ` Eric Schulte
1 sibling, 1 reply; 5+ messages in thread
From: David O'Toole @ 2010-07-22 23:20 UTC (permalink / raw)
To: scrawler; +Cc: Org Mode
Is there an instruction manual documenting how the new org-babel
language extensions should work? This would really be helpful, because
I had trouble figuring out how to make sessions work in the pre-7.0
api (i'm adding Common Lisp support.) Documenting for how a language
extension is supposed to behave, would be great.
On Thu, Jul 22, 2010 at 4:13 PM, <scrawler@gmail.com> wrote:
> Hi guys,
>
> Org-mode newbie, here. I'd like to add newlisp to the list
> of languages that babel supports. I got ob-template.el and
> replaced all occurrences of "template" with "newlisp."
>
> When I try to execute a code block, it fails, looking for
> "inf-newlisp." That's "inferior-mode," right? Can I work
> around that somehow? There is a newlisp mode available
> here:
> http://github.com/may/newlisp-mode
> I'm running Org-mode 7.01.
>
> Org-mode is great! I sure hope you guys are tolerant of
> stupid questions, because I've got a bunch of them.
> :-)
>
> --
> signature riding a horse: "clopclopclopclop"
> -tom
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BABEL] help adding a language, please?
2010-07-22 23:20 ` David O'Toole
@ 2010-07-23 16:01 ` Eric Schulte
2010-07-23 16:04 ` David O'Toole
0 siblings, 1 reply; 5+ messages in thread
From: Eric Schulte @ 2010-07-23 16:01 UTC (permalink / raw)
To: David O'Toole; +Cc: scrawler, Org Mode
Hi David,
The instructions currently live at
http://orgmode.org/worg/org-contrib/babel/languages.php#develop
The bulk of the information is contained in the documentation strings
and the comments of the ob-template.el file (linked to from the above).
It should be fairly complete, but please let me know if you see any
avenues of improvement.
-- Eric
"David O'Toole" <dto1138@gmail.com> writes:
> Is there an instruction manual documenting how the new org-babel
> language extensions should work? This would really be helpful, because
> I had trouble figuring out how to make sessions work in the pre-7.0
> api (i'm adding Common Lisp support.) Documenting for how a language
> extension is supposed to behave, would be great.
>
> On Thu, Jul 22, 2010 at 4:13 PM, <scrawler@gmail.com> wrote:
>> Hi guys,
>>
>> Org-mode newbie, here. I'd like to add newlisp to the list
>> of languages that babel supports. I got ob-template.el and
>> replaced all occurrences of "template" with "newlisp."
>>
>> When I try to execute a code block, it fails, looking for
>> "inf-newlisp." That's "inferior-mode," right? Can I work
>> around that somehow? There is a newlisp mode available
>> here:
>> http://github.com/may/newlisp-mode
>> I'm running Org-mode 7.01.
>>
>> Org-mode is great! I sure hope you guys are tolerant of
>> stupid questions, because I've got a bunch of them.
>> :-)
>>
>> --
>> signature riding a horse: "clopclopclopclop"
>> -tom
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>
>
> _______________________________________________
> Emacs-orgmode mailing list
> Please use `Reply All' to send replies to the list.
> Emacs-orgmode@gnu.org
> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BABEL] help adding a language, please?
2010-07-23 16:01 ` Eric Schulte
@ 2010-07-23 16:04 ` David O'Toole
0 siblings, 0 replies; 5+ messages in thread
From: David O'Toole @ 2010-07-23 16:04 UTC (permalink / raw)
To: Eric Schulte; +Cc: scrawler, Org Mode
Ah, this is great! Thanks Eric :) and I will keep everyone updated on
my progress with the wacky "hypermedia programming" thing i've been
working on. Really what it boils down to is Common Lisp support for
babel, and an add-on module that brings attachments and other data
into the mix.
It's a combination paper/tutorial/elisp library bundled into one file.
The rough draft in progress is here, if anyone is interested in peeking:
http://github.com/dto/hypo/raw/master/hypo.org
On Fri, Jul 23, 2010 at 12:01 PM, Eric Schulte <schulte.eric@gmail.com> wrote:
> Hi David,
>
> The instructions currently live at
> http://orgmode.org/worg/org-contrib/babel/languages.php#develop
>
> The bulk of the information is contained in the documentation strings
> and the comments of the ob-template.el file (linked to from the above).
>
> It should be fairly complete, but please let me know if you see any
> avenues of improvement.
>
> -- Eric
>
> "David O'Toole" <dto1138@gmail.com> writes:
>
>> Is there an instruction manual documenting how the new org-babel
>> language extensions should work? This would really be helpful, because
>> I had trouble figuring out how to make sessions work in the pre-7.0
>> api (i'm adding Common Lisp support.) Documenting for how a language
>> extension is supposed to behave, would be great.
>>
>> On Thu, Jul 22, 2010 at 4:13 PM, <scrawler@gmail.com> wrote:
>>> Hi guys,
>>>
>>> Org-mode newbie, here. I'd like to add newlisp to the list
>>> of languages that babel supports. I got ob-template.el and
>>> replaced all occurrences of "template" with "newlisp."
>>>
>>> When I try to execute a code block, it fails, looking for
>>> "inf-newlisp." That's "inferior-mode," right? Can I work
>>> around that somehow? There is a newlisp mode available
>>> here:
>>> http://github.com/may/newlisp-mode
>>> I'm running Org-mode 7.01.
>>>
>>> Org-mode is great! I sure hope you guys are tolerant of
>>> stupid questions, because I've got a bunch of them.
>>> :-)
>>>
>>> --
>>> signature riding a horse: "clopclopclopclop"
>>> -tom
>>>
>>> _______________________________________________
>>> Emacs-orgmode mailing list
>>> Please use `Reply All' to send replies to the list.
>>> Emacs-orgmode@gnu.org
>>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>>>
>>
>> _______________________________________________
>> Emacs-orgmode mailing list
>> Please use `Reply All' to send replies to the list.
>> Emacs-orgmode@gnu.org
>> http://lists.gnu.org/mailman/listinfo/emacs-orgmode
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-07-23 16:05 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 20:13 [BABEL] help adding a language, please? scrawler
2010-07-22 22:30 ` Eric Schulte
2010-07-22 23:20 ` David O'Toole
2010-07-23 16:01 ` Eric Schulte
2010-07-23 16:04 ` David O'Toole
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).