From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sJOIBvxMN2ffTwAAe85BDQ:P1 (envelope-from ) for ; Fri, 15 Nov 2024 13:30:36 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id sJOIBvxMN2ffTwAAe85BDQ (envelope-from ) for ; Fri, 15 Nov 2024 14:30:36 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=DOnNj0Zl; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1731677436; a=rsa-sha256; cv=none; b=WBDIkhOK8qJdUhjqfM6RFnDILCCdL1oMvag7f/xisHiyuFNDaRUgxcVB8yTS0sBkfiejvZ uAGl/4wQbKTYGH/kFQ7BLQ6Zv0a3OuidBVVBulhzQ5q6xBWAibWYiwEH5KB9JCGrDbQW9z kqXH+B6KqwzxyOxFEoZ4HSXeaIxZL7vUHyZesWPQKWsyI76oSL+l50MbWZp0REaoY7i3KU j6DUs5pC+3yhZs39GEd2d9jRhy4FJyWOX2Puh8+rHw60MoJeSbAftXoX15psa5z+nFz1Xy BVLpD/naT0ZZLXKsc9nF7r1YREBiH/mBtvGwpSkUqhUIebT6GbOQ3xpabedSew== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=DOnNj0Zl; dmarc=pass (policy=none) header.from=gmail.com; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1731677436; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=kHwrFUsNgBseTu8baDIo22koIpLa7hNrCQL6qphiHHo=; b=sgM+pxVtCx6zwv6p3hZxnZVP0FGx+3Fi31H5jmiRblI0/MF8z79pc7XUhlQCr+LBDhCIda uhb+bD7fjOKxE4MdFyPvYBu8hf99+oREWqbDPaDtj0n75BZ5oo46bSMANIC1H0crwcXhfw RRaaeG4SXrgTwES1xwxz+lZU/SbBCmo/PmLcgp45AIaI6LG0ZpAQ+JNQNQsWytID/9Dv44 3vvZOWxjP+mHruI+rVB88Gx+SAETtioDRRHT7rZnk7QfIBHUkjPCrbcFcdi3WaffeYwKYz UnKZagGUaHOSL9f9mcvdtN9v2D3rZUOac2r5qKbQoziVa80XicgkP5zZA8xU9w== 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 793408C236 for ; Fri, 15 Nov 2024 14:30:35 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tBwOJ-0006Dg-Hb; Fri, 15 Nov 2024 08:29:39 -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 1tBwOD-0006DK-Fr for emacs-orgmode@gnu.org; Fri, 15 Nov 2024 08:29:33 -0500 Received: from mail-ej1-x633.google.com ([2a00:1450:4864:20::633]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tBwOA-0008Nz-Gz for emacs-orgmode@gnu.org; Fri, 15 Nov 2024 08:29:33 -0500 Received: by mail-ej1-x633.google.com with SMTP id a640c23a62f3a-a9e71401844so89790366b.3 for ; Fri, 15 Nov 2024 05:29:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731677365; x=1732282165; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=kHwrFUsNgBseTu8baDIo22koIpLa7hNrCQL6qphiHHo=; b=DOnNj0ZlAv3rwC7j6lVTjOO3t0m/CfcDWf3jeYmtzQGwQ0i1VaHYnvoOEqVVjs/VrS M5oBHTaDRFF6fmnGSSfGl1caMEt/o2FIcd4ZZaNPJZkVxiqF1fbm3acNZWistZcjs8Iz L1ABBSb5FU88osPIAZ/EgAxZXI8W021QXsEqpgoJexNinZfnl6bDRuD61dlWikW+YLFL qlKTCbJ/OqciOtLMms39/sc2mJl304TflaFCpPS7nF30IojvxeknSvkNVCefnsrUHMnk W5lFOQbFYB0R4MCe+pGh2W/6IfEbDFu3Ytq1jMy/yRlgU9YPK/4I1QOXRCrTeszoDbJt 7SDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731677365; x=1732282165; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kHwrFUsNgBseTu8baDIo22koIpLa7hNrCQL6qphiHHo=; b=fSe6wK1/DhOquwVWI52t90UiTdjIli4GfOTZJX4UKzh3Xh4MJWAjzRl0iMlDLf50uy 8FeRG3X8cpPQHlW/OY0RcV3vH5YqB0wKn+LsR+DMEaro/QAWdWKMquLMKNzlPXtCUPHt 2/3IyrZ6WzwYK57Pgyzv87U86v5SJsU1c34eMRIb6BXIP4whq8hgYPSPX7Maa0FB9eu1 TtT6jBvZs+G0HaZtWhc02bmyPaB99qEYOtcvELl007bMmgwd6djSqtXtoGndqnsn/OAZ AJgZ8XHMfXl1NU097r2yJqP01PNor6gowpPTTj8kGnZAszRxvaUqwK71Ffy3qsGgYOxS x4vw== X-Gm-Message-State: AOJu0YyTo+23BhTV11kuxyD0X4uX0/sKyKzQ+8BjbWSoYMA8JasDe1Y+ ZXlqysFrNQ5S8WRQfS/f39sRvJ+I8TerYuq5v8R754FVBt2AFCbUiR5B0B+AVmMFxD0C9Xc5t7p wIbTu66VLosco8pZPE0AgeDiKg1g= X-Google-Smtp-Source: AGHT+IFbeilE0yPQBKL0ZZii0cEBFlU/5c1jo+3ZWwSbUNiLa3HYZ1PmLSa+SAvlueDNxLqa7bSFPv2pVHBQdZGvk8Q= X-Received: by 2002:a17:907:9309:b0:a9e:51b6:2bab with SMTP id a640c23a62f3a-aa48324411dmr232076566b.0.1731677365127; Fri, 15 Nov 2024 05:29:25 -0800 (PST) MIME-Version: 1.0 References: <87pln4g3b2.fsf@localhost> In-Reply-To: From: John C Date: Fri, 15 Nov 2024 08:29:14 -0500 Message-ID: Subject: Re: ob-octave: improve MATLAB support To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::633; envelope-from=john.ciolfi.32@gmail.com; helo=mail-ej1-x633.google.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -5.34 X-Spam-Score: -5.34 X-Migadu-Queue-Id: 793408C236 X-Migadu-Scanner: mx10.migadu.com X-TUID: 4pALydxwlfW4 I received the FSF form to assign and will be sending that in soon. On Wed, Nov 13, 2024 at 2:10=E2=80=AFPM John C w= rote: > > Hi > > Thanks for the feedback. I incorporated some of your suggestions for > org-mode. I'll add the examples to https://git.sr.ht/~bzg/worg once > the changes become part of org-mode. > > Regarding (defvar org-babel-default-header-args:matlab '((:session . > "*MATLAB*")), this was done on purpose. We've been using this setting > for a while. Without it, org matlab evaluation is not good. I added a > comment as to why it's there. > > I looked into the use of REMOVE-ECHO which ob-octave.el already sets > to t and don't believe this will help us. I think low-level comit > requires the input which is captured by org. > > Any guidance on adding a test? To test properly we'll need MATLAB and > https://github.com/mathworks/Emacs-MATLAB-Mode. Note, in > https://github.com/mathworks/Emacs-MATLAB-Mode, I have a test for all > this. Currently Emacs-MATLAB-Mode is advising org to get things > working. When org is updated, Emacs-MATLAB-Mode will automatically not > advise org. > > See updated attach patch. > > I have yet to hear back from FSF on the copyright assignment. I'm > happy to sign this, so if you can help, that would be good. > > Thanks > John > > On Sat, Nov 9, 2024 at 4:31=E2=80=AFAM Ihor Radchenko wrote: > > > > 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 pr= ocessing. > > > +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 simpl= y > > 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-matl= ab.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 c= ode 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 =3D 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 th= e "body" > > > + ;; code lines echoed in the output which is not what one would e= xpect. 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