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

2015-06-03 Thread Bjarte Johansen
Sorry for the delay.

Is this better?



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


 On 01 Jun 2015, at 19:18, Nicolas Goaziou m...@nicolasgoaziou.fr wrote:
 
 Hello,
 
 Bjarte Johansen bjarte.johan...@infomedia.uib.no 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 bjarte.johan...@gmail.com
 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_SRCpoint %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



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

2015-06-01 Thread Nicolas Goaziou
Hello,

Bjarte Johansen bjarte.johan...@infomedia.uib.no 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 bjarte.johan...@gmail.com
 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_SRCpoint %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



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

2015-05-27 Thread Bjarte Johansen
Hi,

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. 



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