Re: [O] [babel] Is there a way to use edebug on emacs-lisp code blocks ?

2012-01-02 Thread Marc-Oliver Ihm

Am 01.01.2012 23:40, schrieb Nicolas Goaziou:

Marc-Oliver Ihm  writes:


So, if I have something like:

#+call: foo(1,2)

I cannot see a way to get a buffer with all the code, that foo might
expand into, INCLUDING the assignments for the arguments 1 and 2.

(If babel would give me such a buffer, than it would be easy to use edebug on 
it, I agree.)

So, to be more precise: Is there any command that would expand a full #+call: 
line like above
with all its arguments into pure elisp ?

AFAIK, there is no such command.


Regards,



Okay, thanx !

Than I will simply define an elisp-function and use edebug in that.

That's definitely fair enough for my case !
(but I will keep explicit edebug-support on my wishlist :-)

with kind regards, Marc-Oliver Ihm




Re: [O] [babel] Is there a way to use edebug on emacs-lisp code blocks ?

2012-01-01 Thread Nicolas Goaziou
Marc-Oliver Ihm  writes:

> So, if I have something like:
>
> #+call: foo(1,2)
>
> I cannot see a way to get a buffer with all the code, that foo might
> expand into, INCLUDING the assignments for the arguments 1 and 2.
>
> (If babel would give me such a buffer, than it would be easy to use edebug on 
> it, I agree.)
>
> So, to be more precise: Is there any command that would expand a full #+call: 
> line like above
> with all its arguments into pure elisp ?

AFAIK, there is no such command.


Regards,

-- 
Nicolas Goaziou



Re: [O] [babel] Is there a way to use edebug on emacs-lisp code blocks ?

2012-01-01 Thread Marc-Oliver Ihm

Am 01.01.2012 21:05, schrieb Nicolas Goaziou:

Hello,

Marc-Oliver Ihm  writes:


Is there a way to use edebug for debugging my emacs-lisp code blocks ?
(Or is there another preferred way to debug emacs-lisp code in
babel ?)


You can open the block in a temporary buffer, with C-c ', and use C-u
C-M-x from there.


Regards,



Hi Nicolas,

Thanx, that is close ! However, I also need to resolve <> references.

Resolving <> references is something, that org-babel-expand-src-block 
does,
which however is still not what I need, because it only works for #+begin_src 
... #+end_src blocks,
but not for #+call: lines and for the arguments, which can be passed.

So, if I have something like:

#+call: foo(1,2)

I cannot see a way to get a buffer with all the code, that foo might expand 
into, INCLUDING the assignments for the
arguments 1 and 2.

(If babel would give me such a buffer, than it would be easy to use edebug on 
it, I agree.)

So, to be more precise: Is there any command that would expand a full #+call: 
line like above
with all its arguments into pure elisp ?

Thanx for your help !





Re: [O] [babel] Is there a way to use edebug on emacs-lisp code blocks ?

2012-01-01 Thread Nicolas Goaziou
Hello,

Marc-Oliver Ihm  writes:

> Is there a way to use edebug for debugging my emacs-lisp code blocks ?
> (Or is there another preferred way to debug emacs-lisp code in
> babel ?)

You can open the block in a temporary buffer, with C-c ', and use C-u
C-M-x from there.


Regards,

-- 
Nicolas Goaziou



[O] [babel] Is there a way to use edebug on emacs-lisp code blocks ?

2012-01-01 Thread Marc-Oliver Ihm

Hi 2012, hi all !

Is there a way to use edebug for debugging my emacs-lisp code blocks ?
(Or is there another preferred way to debug emacs-lisp code in babel ?)

For normal coding I use edebug a lot and it would be great to be able to use it 
in babel too.

The only workaround I can currently imagine would be to define global functions 
to do the work and
only call these functions from the code blocks ...

with kind and curious regards, Marc-Oliver Ihm