Ihor Radchenko <yanta...@posteo.net> writes: > +(defun org-babel-session-buffer (&optional info) > + "Return buffer name for session associated with current code block. > +Return nil when no such live buffer with process exists. > +When INFO is non-nil, it should be a list returned by > +`org-babel-get-src-block-info'. > +This function uses org-babel-session-buffer:<lang> function to > +retrieve backend-specific session buffer name." > + (when-let* ((info (or info (org-babel-get-src-block-info 'no-eval))) > + (lang (nth 0 info)) > + (session (cdr (assq :session (nth 2 info)))) > + (cmd (intern (concat "org-babel-session-buffer:" lang))) > + buffer-name)
On executing any python session block I am getting the following error which I think is caused by the above: Debugger entered--Lisp error: (void-variable buffer-name) Also, make shows a byte-compiler warning about this: Compiling /home/jack/src/org-mode/2024-01-async-file-results-dir/lisp/ob-core.el... In org-babel-session-buffer: ob-core.el:785:15: Warning: reference to free variable ‘buffer-name’