emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] Make ob-shell conform to the org-babel interface


From: Bjarte Johansen
Subject: Re: [O] Make ob-shell conform to the org-babel interface
Date: Wed, 3 Jun 2015 12:58:55 +0200

Sorry for the delay.

Is this better?

Attachment: 0001-ob-shell-Conform-to-variable-assignment-interface.patch
Description: Binary data


> On 01 Jun 2015, at 19:18, Nicolas Goaziou <address@hidden> wrote:
> 
> Hello,
> 
> Bjarte Johansen <address@hidden> writes:
> 
>> I found that ob-shell’s org-babel-variable-assignments:bash function
>> does not respect the interface for org-babel. It takes multiple
>> arguments when it should only take 1. This is a problem when f.ex.
>> org-babel-sha1-hash tries to expand the body of a bash source block
>> and tries to call that function with only 1 argument.
>> 
>> I am not sure if the following patch follows best practices in the
>> project, but it solves the problem for me.
> 
> Thank you for the patch. Some comments follow.
> 
>> From 04f00e4f69c5352d51b7de1ba8783ddd96124c1f Mon Sep 17 00:00:00 2001
>> From: Bjarte Johansen <address@hidden>
>> Date: Wed, 27 May 2015 17:20:41 +0200
>> Subject: [PATCH] ob-shell: Conform to variable assignment interface
> 
> You need to list modified functions in commit message.
> 
> 
>> Change org-babel-variable-assignments functions in ob-shell to use the
>> same function so conform to the interface used for variable assignment
>> in org-babel.
> 
> "Org Babel"
> 
>> +(ert-deftest test-ob-shell/should-respect-ob-interface-naming-convention ()
>> +  "Functions used to interface with the different org-babel
>> +  should have the correct signature."
> 
> "Org Babel".
> 
> Also, do not indent second line, and please make first sentence fit on
> a single line.
> 
>> +  (dolist (shell org-babel-shell-names)
>> +    (org-test-with-temp-text
>> +    (format "#+BEGIN_SRC<point> %s :cache yes
>> +  echo test
>> +#+END_SRC" shell)
>> +      (let ((info (org-babel-get-src-block-info)))
>> +    (org-babel-sha1-hash info)))))
> 
> You need to wrap this within a `should' in order to define a proper
> test.
> 
> 
> Regards,
> 
> -- 
> Nicolas Goaziou


reply via email to

[Prev in Thread] Current Thread [Next in Thread]