emacs-orgmode
[Top][All Lists]
Advanced

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

Re: [PATCH] remove unused code in ob-octave.el


From: Leo Butler
Subject: Re: [PATCH] remove unused code in ob-octave.el
Date: Tue, 14 Feb 2023 17:50:24 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)

On Fri, Feb 10 2023, Max Nikulin <manikulin@gmail.com> wrote:

> On 10/02/2023 04:21, Leo Butler wrote:
>> In lisp/ob-octave.el:
>> What is the point of ob-octave-prep-session:octave or its brother,
>> ob-octave-prep-session:matlab?
>> These two functions are unused in the existing code.
>
> Have you checked the following? I am not familiar with org-babel code.
>
> grep -nH org-babel-prep-session lisp/ob-core.el
> lisp/ob-core.el:1041:  (prep-cmd (intern (concat
> "org-babel-prep-session:" lang))))
> lisp/ob-core.el:1050: (error "No org-babel-prep-session function for
> %s!" lang))
>
> Do test passes when you patch is applied? It might mean that test
> coverage is not perfect.

Yes, the tests pass after removing the code.

I can see from your and Ihor's response that my suggestion is
wrongheaded. 

After looking more carefully at ob-core, I am not sure how I could write
a test for the prep-session code, though. The comment and docstring in
ob-template.el does not help me, I am afraid. And the existing
session-related tests do not touch the prep-session code.

I'll poke around in other ob-*.el code and see if I can figure it out.

Leo


reply via email to

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