emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* [PATCH] remove unused code in ob-octave.el
@ 2023-02-09 21:21 Leo Butler
  2023-02-10  2:32 ` Max Nikulin
  2023-02-10 12:02 ` Ihor Radchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Leo Butler @ 2023-02-09 21:21 UTC (permalink / raw)
  To: Org Mode Mailing List

[-- Attachment #1: Type: text/plain, Size: 190 bytes --]

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.

Leo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: remove unused code.patch --]
[-- Type: text/x-diff; name="0001-lisp-ob-octave.el-remove-org-babel-prep-session-octa.patch", Size: 1848 bytes --]

From f91562d9ea36d7f76f222e457c8fd1b0570e7e3d Mon Sep 17 00:00:00 2001
From: Leo Butler <leo.butler@umanitoba.ca>
Date: Thu, 9 Feb 2023 11:02:04 -0600
Subject: [PATCH] lisp/ob-octave.el: remove
 org-babel-prep-session:{octave,matlab}

* lisp/ob-octave.el (org-babel-prep-session:matlab,
org-babel-prep-session:octave):  Remove unused functions.
---
 lisp/ob-octave.el | 15 ---------------
 1 file changed, 15 deletions(-)

diff --git a/lisp/ob-octave.el b/lisp/ob-octave.el
index 9bf16b984..24537ad57 100644
--- a/lisp/ob-octave.el
+++ b/lisp/ob-octave.el
@@ -104,10 +104,6 @@ end")
        (org-babel-pick-name
 	(cdr (assq :rowname-names params)) (cdr (assq :rownames params)))))))
 
-(defun org-babel-prep-session:matlab (session params)
-  "Prepare SESSION according to PARAMS."
-  (org-babel-prep-session:octave session params 'matlab))
-
 (defun org-babel-variable-assignments:octave (params)
   "Return list of octave statements assigning the block's variables."
   (mapcar
@@ -133,17 +129,6 @@ specifying a variable of the same value."
      (t
       (format "%s" var)))))
 
-(defun org-babel-prep-session:octave (session params &optional matlabp)
-  "Prepare SESSION according to the header arguments specified in PARAMS."
-  (let* ((session (org-babel-octave-initiate-session session params matlabp))
-	 (var-lines (org-babel-variable-assignments:octave params)))
-    (org-babel-comint-in-buffer session
-      (mapc (lambda (var)
-              (end-of-line 1) (insert var) (comint-send-input nil t)
-              (org-babel-comint-wait-for-output session))
-	    var-lines))
-    session))
-
 (defun org-babel-matlab-initiate-session (&optional session params)
   "Create a matlab inferior process buffer.
 If there is not a current inferior-process-buffer in SESSION then
-- 
2.39.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-02-14 17:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-09 21:21 [PATCH] remove unused code in ob-octave.el Leo Butler
2023-02-10  2:32 ` Max Nikulin
2023-02-14 17:50   ` Leo Butler
2023-02-10 12:02 ` Ihor Radchenko

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).