Subject: Re: bug#69865: 29.2; Can't instrument `org-babel-exp-results' with edebug

From: Eli Zaretskii <[email-masked]>
Date: Mon, 18 Mar 2024 15:22:59 +0200

> Cc: [email-masked]
> Date: Mon, 18 Mar 2024 08:09:17 +0100
> From:  Michael Heerdegen via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> Damien Cassou <[email-masked]> writes:
> 
> > $ emacs --batch -Q --eval "(require 'ob-exp)" --eval "(require 'edebug)" --eval "(edebug-instrument-function #'org-babel-exp-results)"
> >
> > Error: void-function (body)
> >   mapbacktrace(#f(compiled-function (evald func args flags) #<bytecode 0xf735a912daef0d4>))
> >   debug-early-backtrace()
> >   debug-early(error (void-function body))
> >   body((((org-babel-process-params (org-babel-merge-params (nth 2 info) `((:results \, (if silent "silent" "replace")))))) (18084 (18085 . 18109) (18115 (18116 . 18138) (18145 (18146 . 18149) (18150 . 18151) (18152 . 18156) . 18157) (18164 (18164 . 18165) (18165 (18166 (18167 . 18175) (18178 . 18179) (18179 (18180 . 18182) (18183 . 18189) (18190 . 18198) (18199 . 18208) . 18209) . 18210) . 18211) . 18211) . 18212) . 18213) . 18214))
> > …
> >   edebug-read-and-maybe-wrap-form1()
> >   edebug-read-and-maybe-wrap-form()
> >   edebug-read-top-level-form()
> >   edebug-eval-top-level-form()
> >   edebug-instrument-function(org-babel-exp-results)
> >   command-line-1(("--eval" "(require 'ob-exp)" "--eval" "(require 'edebug)" "--eval" "(edebug-instrument-function #'org-babel-exp-results)"))
> >   command-line()
> >   normal-top-level()
> > Symbol’s function definition is void: body
> >
> > In GNU Emacs 29.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.41,
> > cairo version 1.18.0)
> 
> I can also reproduce this in 29.1, but not in master.  Maybe this has
> been fixed with one of Stefan's latest changes of Edebug.

I don't think this has been fixed, because I can reproduce this
variant of the bug with the current master branch:

  emacs -Q
  M-x load-file RET lisp/org/ob-exp.el RET
  C-x C-f lisp/org/ob-exp.el RET
  C-u 430 M-g g
  M-x edebug-defun RET
  => Symbol’s function definition is void: body

(I also can reproduce the original recipe with the current master.)