From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id 2IVvDygsL2flVgEAe85BDQ:P1 (envelope-from ) for ; Sat, 09 Nov 2024 09:32:24 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id 2IVvDygsL2flVgEAe85BDQ (envelope-from ) for ; Sat, 09 Nov 2024 10:32:24 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pxnrUUvT; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731144744; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=4vpjRZVjo8C9JV5dJPgXGN4VO5HF2Xmddcjp9eBH5ek=; b=b4wf4eh+PthM3roMlp+KWUydLrOS3qf/iuqMGo3K0vOl0pEVD2T7E3KHEpUok21I+kEJRT G33raR+bJG5NnJkAKyAKWGSD+iJqQoYKPgpV5ep7fCB60jPJkQIrzZ9cIGpb1wmexFzmZ2 vmdaUVUMnNpf94aNUJJEa46fCFCc2z6ME2mpWeTuvM13oSS4nTvT5nWNNQB8NU19i319Pd IpM4OvUXxmDwK/kh1JzvXz5+JDFTv85xoGRY89JZUh6uKqay8tQfYk6WVsfC9Bz3B4mQwQ ckfMyYQgPUMl79roc1bKhIXCA4o9HNjEV/Vamv0IHSVtxFWLGvxZUpsM2Mr+tw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731144744; a=rsa-sha256; cv=none; b=Wg7iHD+iYC+f3xG2SEUVnOlaXvkbk2SrpQUtq/5xYJYr8Fcpj7NxAZMF3t/IOzKaS5IYjI v61GS+OZglvqUsWNLK+XRU4CyFHGC0bWm08wahpUS99UmjxiyAjtu/87CO4FNjE2OrWixG UD3BEPQF3SXhyLkCkHZwhhaCWszLLp+2K/5cvruahzsNaJ3sqeepfAz9FUBARXsAHbGamB hfZdnlrmEZ2VGzeg8Vno7gXeNeqnOa4ELJDOCvkG0MmoNzMqDJTPf5XtCNCCHOWpUpcL3K pDqOkJBlvqc9eL5tFlIES42BCSLktql2dbvdDe5GqMoQUoRYtKuSQ2cWyNoYeQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=pxnrUUvT; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=posteo.net Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 4F4C387CC7 for ; Sat, 09 Nov 2024 10:32:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t9hoY-0005xN-Q6; Sat, 09 Nov 2024 04:31:31 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9hoL-0005t2-Ir for emacs-orgmode@gnu.org; Sat, 09 Nov 2024 04:31:26 -0500 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t9hoI-0003Kl-NX for emacs-orgmode@gnu.org; Sat, 09 Nov 2024 04:31:17 -0500 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id 2A136240027 for ; Sat, 9 Nov 2024 10:31:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1731144672; bh=/NLfPlzSxL7lSMUSR8I76R4T8ghM5zsyhqm58XKV8Zs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=pxnrUUvT+uSeLBrh0fP+iQ2a5J5WoKdGV3CoqPLZpgyUJHnUC7enTi7vj8+C6yItd DraeJb8CDiZnl1JSZVXEz83VcNZHZI1sAQbll/AD2QL/QnOU9lXKSEP4MxcVJRer2u PTuvIa3hO+SHrqvHT6mgA/Oud8lvfbYl+D5yYJUkIZEbP6F+i359svijQ5MOqXN2Dz lw+qoaF3yKbvEuI7w+8LeaPjUDXE/DokgLjgB54zh2QUsfAbW5fz39T9hWsw3EQRbA ie31RRNsWPt8zHiqXYJFO/4cWdPk6dRKVLUbbbbx56wVuur50WE0e+TZWi9PAyvOlN /Pd46Ain3KEYg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4XlrCf2WN8z9rxB; Sat, 9 Nov 2024 10:31:10 +0100 (CET) From: Ihor Radchenko To: John C Cc: emacs-orgmode@gnu.org Subject: Re: ob-octave: improve MATLAB support In-Reply-To: References: Date: Sat, 09 Nov 2024 09:32:49 +0000 Message-ID: <87pln4g3b2.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: emacs-orgmode-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -4.13 X-Spam-Score: -4.13 X-Migadu-Queue-Id: 4F4C387CC7 X-Migadu-Scanner: mx13.migadu.com X-TUID: xJvIKiNfw7Ua John C writes: > Please see the attached patch which makes MATLAB work with org babel > eval. Here's the commit message: Thanks a lot for the patch! The patch introduces major changes. Would it be possible to add some tests as well? > Note, I have sent in the paper work for the FSF copyright assignment. Let us know when it is done. Also, if there are any problems or delays in the process, we can try helping. My initial comments on the patch are below. > +*** ob-octave: improved MATLAB support "fixed" maybe :) > +Improved ob-octave MATLAB (https://www.mathworks.com) code blocks processing. > +The prior version of ob-octave didn't correctly support MATLAB. To use MATLAB > +with org, you need https://github.com/MathWorks/Emacs-MATLAB-Mode. > + > +Example ~verbatim~ code block: > + > +#+begin_src org > +,#+begin_src matlab :results verbatim I am not sure if examples are necessary in the NEWS. Maybe we can simply mention that :results verbatim, output, and latex are supported now. As for examples, please put them into https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-octave-matlab.html The source code for that page is at https://git.sr.ht/~bzg/worg > -;; Matlab > - > -;; matlab.el required for interactive emacs sessions and matlab-mode > -;; major mode for source code editing buffer > -;; https://matlab-emacs.sourceforge.net/ > +;; 1) MATLAB from https://www.mathworks.com Please remove all the links to mathworks.com - it is FSF policy to not link to proprietary software pages. We cannot have these links in Org code. > +;; 2) https://github.com/mathworks/Emacs-MATLAB-Mode This one is GPL-licensed and hence fine. > -(defvar org-babel-default-header-args:matlab '()) > +;; Use the session "*MATLAB*" buffer created by `matlab-shell` for code evaluation. > +(defvar org-babel-default-header-args:matlab '((:session . "*MATLAB*"))) The new default implies that sessions will be enabled by default. I am not sure if it is what you intended to do. > -(defvar org-babel-matlab-with-emacs-link nil > - "If non-nil use matlab-shell-run-region for session evaluation. > -This will use EmacsLink if (matlab-with-emacs-link) evaluates > -to a non-nil value.") > - > -(defvar org-babel-matlab-emacs-link-wrapper-method > - "%s > -if ischar(ans), fid = fopen('%s', 'w'); fprintf(fid, '%%s\\n', ans); fclose(fid); > -else, save -ascii %s ans > -end > -delete('%s') I understand that these variable no longer make sense after we remove support of MATLAB Emacs Link. However, I'd prefer to not remove variables without warning. Instead, please deprecate them. > + (when matlabp > + ;; When we send multi-line input to `matlab-shell', we'll see the "body" > + ;; code lines echoed in the output which is not what one would expect. To Maybe you can somehow make use of REMOVE-ECHO in `org-babel-comint-with-output'? -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at