From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.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 GJrlDavFcGf42QAAqHPOHw:P1 (envelope-from ) for ; Sun, 29 Dec 2024 03:44:43 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id GJrlDavFcGf42QAAqHPOHw (envelope-from ) for ; Sun, 29 Dec 2024 04:44:43 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=SpUtuapg; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1735443883; 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=nHymgdDknXheThm4cKiqG/vZ96JghW7vLn4w3Gd4u7o=; b=n/dJcsg/gwsQPLd23JhAejdhEchMzVgdmBGdy4vlWhoUDZzRkUf98DRKR7aL6VdFyHhKt5 sJQR9XsMiN5gDgVm+syJ0J2XhKLEnG9mXxSNrIHwkNyeFedluMxSnEa/ehhRXD8lcVzm6l OIlzIBTDsUL9R3RXY9Hqi5rt+K/wjNWYs1F+qwh8txC3HtmhmIV31RaasSMhQl/qXDZqOC Yuvwyc/TVlgvFpvOeUGmb1mMlzr5lzkR9Orf0PLG1P5fF5JBbbxoj0csM5jJvdv63wavbS Hveacp56KrxJf5EahvSwY9v9hLjMXH9zq56b1g47drgim6iwplbgFzUjSu0bwA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("body hash did not verify") header.d=gmail.com header.s=20230601 header.b=SpUtuapg; 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=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1735443883; a=rsa-sha256; cv=none; b=H7DrdoznpPtnNePpnQYRzrJr7CKRoTkc0GDaofo6Tz9lI9c8458HWjMivzjwb0L3xlzKN7 Qk4LHhAWJKVFvRkO4Cv5ipq2uAB1OxtgztbB8ROEy5OqC+9Dh+30a15hNyzsT4Z0N5qbrW +hkYK/WHzDoEAIXGSR4ZkfzPoaLnNXnMYnXVTT/Yis+Q8n4AfSo2gylnM8nT4CuBfmt+KD GVICDi28EHyFtVc1asPyvJNSBdT0FynpCno8r9HoYCWp9vPHEdxOWbaVIDzy9XzuehBNAN Mg6vJ+fHrNwkumejzvn9CYT4Uj4TarzsYwn7m/SV+6jfn5rWflpUtHkqSdCbqg== 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 9705797C31 for ; Sun, 29 Dec 2024 04:44:42 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tRjbU-0004qX-Dz; Sat, 28 Dec 2024 22:04:32 -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 1tRjbS-0004q7-3v for emacs-orgmode@gnu.org; Sat, 28 Dec 2024 22:04:30 -0500 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tRjbO-0004jn-2c for emacs-orgmode@gnu.org; Sat, 28 Dec 2024 22:04:29 -0500 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-5d437235769so8103366a12.2 for ; Sat, 28 Dec 2024 19:04:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1735441464; x=1736046264; darn=gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=PgaK5QXl08uJ0G36hS4fJdPR371UwCAS7uXXSkNO4Gc=; b=SpUtuapg37XiJqNgxVJIeirWpXnIlO9SjGFKWLLSe6gWzZfdzw5801lx79bXBHMJKf xqxne0axmzjqvIlnd7SUNdOKqyleoQqDcTFjf1h//xO+L7Xlt9iLcr6tErAuITeBcvf3 oIB5lEVguVUQmaWdB4rf2RleO3cLpHZFmkbkZ1gEwx0Nf/6u5yBB3fUW+FtaOFldBcXX qnwir1wT3bK/hlOAdqpJXAGyIy9cS/PxT0WgthlmzsPrpysFjBGo0Ng358PoxUTmhm/W /NfLCQ30yI/ERo1Lv6FMmeKke6HlaWhg6JlrE8VRzSTuUzVCZ2sC1pHpgciLnntmnWEe h4Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1735441464; x=1736046264; h=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=PgaK5QXl08uJ0G36hS4fJdPR371UwCAS7uXXSkNO4Gc=; b=viBUAK0H8ePb/lPOoC4hESEpmU1Ajw+hhaf5pfUAmsMWcAEwkmvaiQx3GX8GaDYExX D2ZHl84xI9gCbzMx8uJaOgpgVh9gxmkHXgRhtzPhgVbUPnd2BwMBsYjP/rdEruF66FXd o8d0bsVYQvz1QZ9UJLv6UA3LTvyXrhDLhro9TKpDR6pd9ToXDw3y2jtfvau0hbiUSVDW yFS/45nLIMAFWZCGC9UCH2g6aixLvTV+eroewcRwvJ0Fmtkmtx8tAN6dSxmP4bnKOp1C qkd6cmG3xNY+bzxmnnss3/7livwJs6uEAKm+4ebZdTqV92X4ghFo3jMAL+dmA1O4Lj/p K+gg== X-Gm-Message-State: AOJu0YzbRkW6aj1saXfapNE6jjoJyke0bjwkJy2jHok2d2mWKMmp2iDM GRyg2+63M0I1sK6ha4L3rFGu/mCpKHgx1OHVNyFwF52FxDgoiKERB4tg5aD0YXXA3TbPSsIR0x7 cp5ZnMnscTuBK9GWK1n5qg66X+AOrFH+H X-Gm-Gg: ASbGncsECaeGxjI8p1h40DIkd9GV3ZjY8RApO3KfvqAeStembop+kRyl0/OJtDlyfMl efxXwOG1DfeST1IQ/f5wHJN7xx0we/ABdvqhYSw== X-Google-Smtp-Source: AGHT+IG/rsa3JMa+YrndzTXJ2vJaYTyCSxnEyjQzYgwQhwbLOBNpe5GJ1xh7k4l85hKhEP0wyErj18oF0+IzlWqe63A= X-Received: by 2002:a05:6402:348e:b0:5d3:d9f5:bf08 with SMTP id 4fb4d7f45d1cf-5d81dd5438cmr29980560a12.7.1735441463237; Sat, 28 Dec 2024 19:04:23 -0800 (PST) MIME-Version: 1.0 References: <87pln4g3b2.fsf@localhost> <87cyim9c4t.fsf@localhost> <87o712lv3t.fsf@localhost> In-Reply-To: <87o712lv3t.fsf@localhost> From: John C Date: Sat, 28 Dec 2024 22:04:11 -0500 Message-ID: Subject: Re: ob-octave: improve MATLAB support To: Ihor Radchenko Cc: emacs-orgmode@gnu.org Content-Type: multipart/mixed; boundary="000000000000f214e7062a5ff353" Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=john.ciolfi.32@gmail.com; helo=mail-ed1-x52b.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, HTML_MESSAGE=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: 4.20 X-Spam-Score: 4.20 X-Migadu-Queue-Id: 9705797C31 X-Migadu-Scanner: mx10.migadu.com X-TUID: YjKmgRWYVzei --000000000000f214e7062a5ff353 Content-Type: multipart/alternative; boundary="000000000000f214e7062a5ff351" --000000000000f214e7062a5ff351 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I accidentally did "reply" instead of "reply all". Re-adding the e-mail between Ihor and I. Regarding the suggestion to filter line-by-line. I think I understand that, but it will require that we match input lines to echo'd input. However, it's possible that output lines match input and are not from echo'd input. In addition, there's other stripping (filtering) that is needed. For example, removal of the error indicators (). I like the idea of enhancing org-babel-comint-with-output to strip content based on regular expressions and have implemented that. See attached org-matlab.patch which addresses all feedback. Here's the commit info. ob-matlab.el: improve MATLAB support * lisp/ob-matlab.el (header): Update URL for MATLAB * lisp/ob-octave.el (org-babel-octave-evaluate): Fixed MATLAB support - Deprecate variables related to MATLAB Emacs Link and removed the code. Emacs Link capability was removed from MATLAB release R2009a, 15 years ago. - Fixed the following type of org block evaluation: 1) #+begin_src matlab :results verbatim 2) #+begin_src matlab :results output 3) #+begin_src matlab :results output latex 4) #+begin_src matlab :results file graphics which aid in writing scientific papers. - Minor point, the correct spelling of MATLAB when referencing the product is all upper case. * ob-comint.el: enhanced org-babel-comint-with-output - The META argument of org-babel-comint-with-output now supports an optional STRIP-REGEXPS which can be used to remove content from the returned output. * etc/ORG-NEWS (New functions and changes in function arguments): Added entry "ob-octave: improved MATLAB support" Thanks John ----- *Ihor Radchenko * Sun, Dec 22, 2024 at 11:24 PM To: John C Cc: emacs-orgmode@gnu.org Hi John, It has been a month since the last message in this thread. Do you need any help working on the patch? -- Ihor Radchenko // yantar92, Org mode maintainer, [Quoted text hidden] ------------------------------ *John C * Wed, Dec 25, 2024 at 8:26 AM To: Ihor Radchenko My apologies - I=E2=80=99ve been too busy. I'll update the NEWS entry per y= our suggestion once we resolve the "%-" comment issue you flagged. Consider this MATLAB code block and expected results. #+begin_src matlab :exports both :results output latex m =3D [4*pi, 3*pi; 2*pi, pi]; result =3D latex(sym(m)); disp(result) #+end_src #+RESULTS: #+begin_export latex \left(\begin{array}{cc} 4\,\pi & 3\,\pi \\ 2\,\pi & \pi \end{array}\right) #+end_export If we remove the proposed "%-" handling from ob-octave.el, we get the incorrect result: #+RESULTS: #+begin_export latex m =3D [4*pi, 3*pi; 2*pi, pi]; result =3D latex(sym(m)); disp(result) \left(\begin{array}{cc} 4\,\pi & 3\,\pi \\ 2\,\pi & \pi \end{array}\right) #+end_export In this case, the *MATLAB* buffer contains: >> m =3D [4*pi, 3*pi; 2*pi, pi]; result =3D latex(sym(m)); disp(result) 'org_babel_eoe' m =3D [4*pi, 3*pi; 2*pi, pi]; >> result =3D latex(sym(m)); >> disp(result) \left(\begin{array}{cc} 4\,\pi & 3\,\pi \\ 2\,\pi & \pi \end{array}\right) >> 'org_babel_eoe' ans =3D 'org_babel_eoe' >> I suspect that the issue is that the MATLAB echo's all commands and that there's noting wrong with comint. For example, matlab-shell buffer, *MATLAB*, the current buffer and at the MATLAB promot, ">>", M-: RET (comint-send-string (get-buffer-process (current-buffer)) "pwd\n") RET Results in: #+begin_example >> pwd ans =3D '/home/ciolfi/tmp' #+end_example Therefore, the adding "%-" MATLAB comments to the code being evaluated, then stripping the echo'd lines containing the "%-" is probably the best option. Thanks John [Quoted text hidden] ------------------------------ *Ihor Radchenko * Thu, Dec 26, 2024 at 1:02 AM To: John C John C writes: > My apologies - I=E2=80=99ve been too busy. I'll update the NEWS entry per= your > suggestion once we resolve the "%-" comment issue you flagged. > > Consider this MATLAB code block and expected results. > > #+begin_src matlab :exports both :results output latex > m =3D [4*pi, 3*pi; 2*pi, pi]; > result =3D latex(sym(m)); > disp(result) > #+end_src > ... > In this case, the *MATLAB* buffer contains: > > >> m =3D [4*pi, 3*pi; 2*pi, pi]; > result =3D latex(sym(m)); > disp(result) > 'org_babel_eoe' > m =3D [4*pi, 3*pi; 2*pi, pi]; > >> result =3D latex(sym(m)); > >> disp(result) > \left(\begin{array}{cc} 4\,\pi & 3\,\pi \\ 2\,\pi & \pi > \end{array}\right) > >> 'org_babel_eoe' > > ans =3D > > 'org_babel_eoe' > > >> So, MATLAB does not echo the full code, but rather does it line-by-line. This is not what `org-babel-comint--echo-filter' and `org-babel-comint-with-output' expect - the usual behavior with REPLs echoing the input is displaying the whole (multiline) input together. > ... > Therefore, the adding "%-" MATLAB comments to the code being > evaluated, then stripping the echo'd lines containing the "%-" is > probably the best option. What I am thinking as an alternative is modifying `org-babel-comint-with-output' to filter FULL-BODY line by line. For example, when REMOVE-ECHO is set to 'line. `org-babel-comint--echo-filter' can then be passed an extra argument that will make it filter body lines rather than the whole body only. WDYT? [Quoted text hidden] ------------------------------ *John C * Fri, Dec 27, 2024 at 8:24 AM To: Ihor Radchenko I'm not clear on how I'd update org-babel-comint-with-output to filter line-by-line. Could you give me a start at it? Also, I'm not sure if line-by-line filtering would work. I suspect MATLAB echos when it sees a new line and a full statement. For example, m1 =3D [4*pi, 3*pi; ... 2*pi, pi]; is a multi-line single statement. The "..." are MATLAB's line continuation syntax. Another thought is we could update org-babel-comint-with-output to have an option like: (BUFFER EOE-INDICATOR REMOVE-ECHO FULL-BODY EOL-FILTER-INDICATOR) where optional EOL-FILTER-INDICATOR is text, typically a comment, that is appended to each line in FULL-BODY before it is evaluated. After evaluation, each line in the result containing EOL-FILTER-INDICATOR is removed from the result. This way, if another language encounters this issue, they can leverage this service. Thanks John [Quoted text hidden] ------------------------------ *Ihor Radchenko * Fri, Dec 27, 2024 at 10:26 AM To: John C John C writes: > I'm not clear on how I'd update org-babel-comint-with-output to filter > line-by-line. Could you give me a start at it? For example, you can add an optional argument to `org-babel-comint--echo-filter'. When it is passed, BODY argument is split via `split-string' and then individual lines are removed in order from STRING. `org-babel-comint-with-output' is the caller of `org-babel-comint--echo-filter'. > ... Also, I'm not sure if > line-by-line filtering would work. I suspect MATLAB echos when it sees a > new line and a full statement. For example, > > m1 =3D [4*pi, 3*pi; ... > 2*pi, pi]; > > is a multi-line single statement. The "..." are MATLAB's line continuatio= n > syntax. AFAIU, removing line-by-line should still work in such case. > Another thought is we could update org-babel-comint-with-output to have a= n > option like: > > (BUFFER EOE-INDICATOR REMOVE-ECHO FULL-BODY EOL-FILTER-INDICATOR) > > where optional EOL-FILTER-INDICATOR is text, typically a comment, that is > appended to each line in FULL-BODY before it is evaluated. After > evaluation, each line in the result containing EOL-FILTER-INDICATOR is > removed from the result. It may also work. Maybe even better. Rather than just EOL-FILTER-INDICATOR, we may allow a regular expression to be provided. Then, everything matching that regular expression will be removed. P.S. Is there any reason you are writing off-list? We generally try to keep the discussion public to keep record of the decision-making. On Mon, Dec 23, 2024 at 2:23=E2=80=AFAM Ihor Radchenko wrote: > Hi John, > > It has been a month since the last message in this thread. > Do you need any help working on the patch? > > -- > Ihor Radchenko // yantar92, > Org mode maintainer, > Learn more about Org mode at . > Support Org development at , > or support my work at > --000000000000f214e7062a5ff351 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I accidentally=C2=A0did "reply" instead of = "reply all". Re-adding the e-mail=C2=A0between=C2=A0Ihor and I.

Regarding the suggestion to filter line-by-line. I = think I understand that, but it will require that we match input lines to e= cho'd=C2=A0input. However, it's possible that output lines match in= put and are not from echo'd=C2=A0input. In addition, there's other = stripping (filtering) that is needed. For example, removal of the error ind= icators (<ERRORTXT>). I like the idea of enhancing org-babel-comint-w= ith-output to strip content based on regular expressions and have implement= ed that.

See attached org-matlab.patch which addre= sses all feedback. Here's the commit info.

ob-matlab.el: improve MATLAB support

* lisp/ob= -matlab.el (header): Update URL for MATLAB

* lisp/ob-octave.el (org-= babel-octave-evaluate): Fixed MATLAB support
=C2=A0 - Deprecate variable= s related to MATLAB Emacs Link and removed the code.
=C2=A0 =C2=A0 Emacs= Link capability was removed from MATLAB release R2009a, 15 years ago.
= =C2=A0 - Fixed the following type of org block evaluation:
=C2=A0 =C2=A0= 1) #+begin_src matlab :results verbatim
=C2=A0 =C2=A0 2) #+begin_src ma= tlab :results output
=C2=A0 =C2=A0 3) #+begin_src matlab :results output= latex
=C2=A0 =C2=A0 4) #+begin_src matlab :results file graphics
=C2= =A0 =C2=A0 which aid in writing scientific papers.
=C2=A0 - Minor point,= the correct spelling of MATLAB when referencing the product is
=C2=A0 = =C2=A0 all upper case.

* ob-comint.el: enhanced org-babel-comint-wit= h-output
=C2=A0 - The META argument of org-babel-comint-with-output now = supports an optional
=C2=A0 =C2=A0 STRIP-REGEXPS which can be used to re= move content from the returned output.

* etc/ORG-NEWS (New functions= and changes in function arguments):
=C2=A0 Added entry "ob-octave:= improved MATLAB support"

Thanks
John

-----
Ihor Radchenko=C2=A0<yantar92@posteo.net>Sun, Dec 22, 2024 at 11:24 PM
= Hi John,

It has been a month since the last message in this thread.<= br>Do you need any help working on the patch?
--
Ihor Radchenko // yantar92,
Org mode maintainer,
= [Quoted text hidden]
=

<= tbody>
John C=C2=A0<john.ciolfi.32@gmail.com>Wed, Dec 25, 2024 at 8:26 AM
To: Ihor Radchenko <yantar92@posteo.net>
My apologies - I=E2=80=99ve been too busy. I= 'll update the NEWS entry per your suggestion once we resolve the "= ;%-<org-eval>" comment issue you flagged.

Consider this MATLAB code block and expected r= esults.

=C2=A0 =C2=A0 #+begin_src matlab :e= xports both :results output latex
=C2=A0 =C2=A0 =C2=A0 m =3D [4*pi, 3*pi= ; 2*pi, pi];
=C2=A0 =C2=A0 =C2=A0 result =3D latex(sym(m));
=C2=A0 = =C2=A0 =C2=A0 disp(result)
=C2=A0 =C2=A0 #+end_src
=C2=A0 =C2=A0
= =C2=A0 =C2=A0 #+RESULTS:
=C2=A0 =C2=A0 #+begin_export latex
=C2=A0 = =C2=A0 \left(\begin{array}{cc} 4\,\pi =C2=A0& 3\,\pi \\ 2\,\pi =C2=A0&a= mp; \pi =C2=A0\end{array}\right)
=C2=A0 =C2=A0 #+end_export
If we remove the proposed "%-<org-eval>" handling from ob= -octave.el, we get the incorrect result:

= =C2=A0 =C2=A0 #+RESULTS:
=C2=A0 =C2=A0 #+begin_export latex
=C2=A0 = =C2=A0 m =3D [4*pi, 3*pi; 2*pi, pi];
=C2=A0 =C2=A0 result =3D latex(sym(= m));
=C2=A0 =C2=A0 disp(result)
=C2=A0 =C2=A0 \left(\begin{array}{cc}= 4\,\pi =C2=A0& 3\,\pi \\ 2\,\pi =C2=A0& \pi =C2=A0\end{array}\righ= t)
=C2=A0 =C2=A0 #+end_export

In this case, the *MATLAB* b= uffer contains:

=C2=A0 =C2=A0 >> m = =3D [4*pi, 3*pi; 2*pi, pi];
=C2=A0 =C2=A0 result =3D latex(sym(m));
= =C2=A0 =C2=A0 disp(result)
=C2=A0 =C2=A0 'org_babel_eoe'
=C2= =A0 =C2=A0 m =3D [4*pi, 3*pi; 2*pi, pi];
=C2=A0 =C2=A0 >> result = =3D latex(sym(m));
=C2=A0 =C2=A0 >> disp(result)
=C2=A0 =C2=A0 = \left(\begin{array}{cc} 4\,\pi =C2=A0& 3\,\pi \\ 2\,\pi =C2=A0& \pi= =C2=A0\end{array}\right)
=C2=A0 =C2=A0 >> 'org_babel_eoe'=
=C2=A0 =C2=A0
=C2=A0 =C2=A0 ans =3D
=C2=A0 =C2=A0
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 'org_babel_eoe'
=C2=A0 =C2=A0
=C2=A0 =C2=A0= >>


I suspect that the issue is that the MATLAB echo= 9;s all commands and that there's noting wrong with comint. For example= , matlab-shell buffer, *MATLAB*, the current buffer and at the MATLAB promo= t, ">>",

=C2=A0 =C2=A0 M-: = RET (comint-send-string (get-buffer-process (current-buffer)) "pwd\n&q= uot;) RET

Results in:

=C2=A0 = =C2=A0 #+begin_example
=C2=A0 =C2=A0 >> pwd
=C2=A0 =C2=A0
= =C2=A0 =C2=A0 ans =3D
=C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 '= /home/ciolfi/tmp'
=C2=A0 =C2=A0 #+end_example

Therefor= e, the adding "%-<org-eval>" MATLAB comments to the code be= ing evaluated, then stripping the echo'd lines containing the "%-&= lt;org-eval>" is probably the best option.

Thanks
John
[Quoted text hidden]<= /div>

Ihor Radchenko=C2=A0<= yantar92@posteo.net>Thu, Dec 26, 2024 at 1:02 AM=
John C <john.ciolfi.32@gmail.com> writes:

> My apologies - I=E2=80=99ve been too busy. I'= ;ll update the NEWS entry per your
> suggestion once we resolve the &= quot;%-<org-eval>" comment issue you flagged.
>
> Co= nsider this MATLAB code block and expected results.
>
>=C2=A0 = =C2=A0 =C2=A0#+begin_src matlab :exports both :results output latex
>= =C2=A0 =C2=A0 =C2=A0 =C2=A0m =3D [4*pi, 3*pi; 2*pi, pi];
>=C2=A0 =C2= =A0 =C2=A0 =C2=A0result =3D latex(sym(m));
>=C2=A0 =C2=A0 =C2=A0 =C2= =A0disp(result)
>=C2=A0 =C2=A0 =C2=A0#+end_src
> ...
= > In this case, the *MATLAB* buffer contains:>
>=C2=A0 =C2=A0 =C2=A0>> m =3D [4*pi, 3*pi; 2*pi, pi];
= >=C2=A0 =C2=A0 =C2=A0result =3D latex(sym(m));
>=C2=A0 =C2=A0 =C2= =A0disp(result)
>=C2=A0 =C2=A0 =C2=A0'org_babel_eoe'
>= =C2=A0 =C2=A0 =C2=A0m =3D [4*pi, 3*pi; 2*pi, pi];
>=C2=A0 =C2=A0 =C2= =A0>> result =3D latex(sym(m));
>=C2=A0 =C2=A0 =C2=A0>> d= isp(result)
>=C2=A0 =C2=A0 =C2=A0\left(\begin{array}{cc} 4\,\pi=C2=A0= & 3\,\pi \\ 2\,\pi=C2=A0 & \pi
>=C2=A0 \end{array}\right)>=C2=A0 =C2=A0 =C2=A0>> 'org_babel_eoe'
>
>= =C2=A0 =C2=A0 =C2=A0ans =3D
>
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0'org_babel_eoe'
>
>=C2=A0 =C2=A0 =C2=A0>>
<= br>
So, MATLAB does not echo the full code, but rather does it line-b= y-line.
This is not what `org-babel-comint--echo-filter' and
`org= -babel-comint-with-output' expect - the usual behavior with REPLs
ec= hoing the input is displaying the whole (multiline) input together.

= > ...
> Therefore, the adding "%-<= org-eval>" MATLAB comments to the code being
> evaluated, the= n stripping the echo'd lines containing the "%-<org-eval>&qu= ot; is
> probably the best option.

What I am thinking a= s an alternative is modifying
`org-babel-comint-with-output' to filt= er FULL-BODY line by line.
For example, when REMOVE-ECHO is set to '= line.

`org-babel-comint--echo-filter' can then be passed an extr= a argument
that will make it filter body lines rather than the whole bod= y only.

WDYT?
[Quoted tex= t hidden]

John C=C2= =A0<john.ciolfi.32@gmail= .com>Fri, Dec 27, = 2024 at 8:24 AM
To: Ihor Radchenko= <yantar92@posteo.net>
I'm not clear on how I'= ;d update org-babel-comint-with-output to filter line-by-line. Could you gi= ve me a start at it? Also, I'm not sure if line-by-line filtering would= work. I suspect MATLAB echos when it sees a new line and a full statement.= For example,

=C2=A0 =C2=A0 m1 =3D [4*pi, 3= *pi; ...
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 2*pi, pi];
=C2=A0 = =C2=A0
is a multi-line single statement. The "..." are MATLAB&= #39;s line continuation syntax.=C2=A0

Another thought is= we could update org-babel-comint-with-output to have an option like:
=

=C2=A0 =C2=A0 =C2=A0(BUFFER EO= E-INDICATOR REMOVE-ECHO FULL-BODY EOL-FILTER-INDICATOR)

where= optional EOL-FILTER-INDICATOR is text, typically a comment, that is append= ed to each line in FULL-BODY before it is evaluated. After evaluation, each= line in the result containing EOL-FILTER-INDICATOR is removed from the res= ult.

This way, if another language encounters= =C2=A0this issue, they can leverage this service.

<= /div>
Thanks
John
[Quoted text hidden]
<= hr style=3D"color:rgb(0,0,0);font-family:arial,sans-serif;font-size:13px"><= table width=3D"100%" cellpadding=3D"0" cellspacing=3D"0" border=3D"0" class= =3D"gmail-message" style=3D"color:rgb(0,0,0);font-family:arial,sans-serif;f= ont-size:13px">Ihor Radchenko=C2=A0= <yantar92@posteo.net>Fri, Dec 27, 2024 at 10:26 AM<= /font>=
John C <john.ciolfi.32@gmail.c= om> writes:

> I'm not clear on how I'd update org-= babel-comint-with-output to filter
> line-by-line. Could you give me = a start at it?

For example, you can add an optional argument = to
`org-babel-comint--echo-filter'. When it is passed, BODY argument= is
split via `split-string' and then individual lines are removed i= n order
from STRING.

`org-babel-comint-with-output' is the ca= ller of
`org-babel-comint--echo-filter'.

> ... Also, I'= ;m not sure if
> line-by-line filtering would= work. I suspect MATLAB echos when it sees a
> new line and a full st= atement. For example,
>
>=C2=A0 =C2=A0 =C2=A0m1 =3D [4*pi, 3*pi= ; ...
>=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02*pi, pi];
>> is a multi-line single statement. The "..." are MATLAB'= s line continuation
> syntax.

AFAIU, removing line-by-l= ine should still work in such case.

> Ano= ther thought is we could update org-babel-comint-with-output to have an
= > option like:
>
>=C2=A0 =C2=A0 =C2=A0 (BUFFER EOE-INDICATOR= REMOVE-ECHO FULL-BODY EOL-FILTER-INDICATOR)
>
> where optional= EOL-FILTER-INDICATOR is text, typically a comment, that is
> appende= d to each line in FULL-BODY before it is evaluated. After
> evaluatio= n, each line in the result containing EOL-FILTER-INDICATOR is
> remov= ed from the result.

It may also work. Maybe even better.
R= ather than just EOL-FILTER-INDICATOR, we may allow a regular expression
= to be provided. Then, everything matching that regular expression will
b= e removed.

P.S. Is there any reason you are writing off-list? We gen= erally try to
keep the discussion public to keep record of the decision-= making.



On= Mon, Dec 23, 2024 at 2:23=E2=80=AFAM Ihor Radchenko <yantar92@posteo.net> wrote:
Hi John,

It has been a month since the last message in this thread.
Do you need any help working on the patch?

--
Ihor Radchenko // yantar92,
Org mode maintainer,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,=
or support my work at <https://liberapay.com/yantar92>
--000000000000f214e7062a5ff351-- --000000000000f214e7062a5ff353 Content-Type: text/x-patch; charset="US-ASCII"; name="org-matlab.patch" Content-Disposition: attachment; filename="org-matlab.patch" Content-Transfer-Encoding: base64 Content-ID: X-Attachment-Id: f_m590zxi50 ZGlmZiAtLWdpdCBhL2V0Yy9PUkctTkVXUyBiL2V0Yy9PUkctTkVXUwppbmRleCA1ZDQyMTE3MmYu LjRlZWRiYTBhZSAxMDA2NDQKLS0tIGEvZXRjL09SRy1ORVdTCisrKyBiL2V0Yy9PUkctTkVXUwpA QCAtMTYyLDYgKzE2MiwyMyBAQCBiaWJsaW9ncmFwaHkgZm9ybWF0IHJlcXVpcmVzIHRoZW0gdG8g YmUgd3JpdHRlbiBpbiB0aXRsZS1jYXNlLgogCiAjIFRoaXMgYWxzbyBpbmNsdWRlcyBjaGFuZ2Vz IGluIGZ1bmN0aW9uIGJlaGF2aW9yIGZyb20gRWxpc3AgcGVyc3BlY3RpdmUuCiAKKyoqKiBvYi1t YXRsYWI6IGZpeGVkIE1BVExBQiBzdXBwb3J0CisKK0ZpeGVkIE1BVExBQiBiYWJlbCBjb2RlIGJs b2NrcyBwcm9jZXNzaW5nLiBNQVRMQUIgY29kZSBibG9ja3Ms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V2ZXJhZ2UgdGhlICIlLTxv cmctZXZhbD4iIHRvIHJlbW92ZSB0aGUgdW53YW50ZWQgbGluZXMuCisgICAgOzsgRXhhbXBsZSBv ZiBkZXNpcmVkIGJlaGF2aW9yOgorICAgIDs7ICAgICAjK2JlZ2luX3NyYyBtYXRsYWIgOnJlc3Vs dHMgb3V0cHV0CisgICAgOzsgICAgICAgZGlzcCgnVGhlIHJlc3VsdHMgYXJlOicpCisgICAgOzsg ICAgICAgYSA9IFsxLCAyOyAzLCA0XQorICAgIDs7ICAgICAgIGIgPSBhICogMgorICAgIDs7ICAg ICAjK2VuZF9zcmMKKyAgICA7OworICAgIDs7ICAgICAjK1JFU1VMVFM6CisgICAgOzsgICAgICMr YmVnaW5fZXhhbXBsZQorICAgIDs7ICAgICBUaGUgcmVzdWx0cyBhcmU6CisgICAgOzsKKyAgICA7 OyAgICAgYSA9CisgICAgOzsKKyAgICA7OyAgICAgICAgICAxICAgICAyCisgICAgOzsgICAgICAg ICAgMyAgICAgNAorICAgIDs7CisgICAgOzsgICAgIGIgPQorICAgIDs7CisgICAgOzsgICAgICAg ICAgMiAgICAgNAorICAgIDs7ICAgICAgICAgIDYgICAgIDgKKyAgICA7OyAgICAgIytlbmRfZXhh bXBsZQorICAgIChzZXRxIGJvZHkgKHJlcGxhY2UtcmVnZXhwLWluLXN0cmluZyAiXG4iICIgJS08 b3JnLWV2YWw+LVxuIiBib2R5KSkKKyAgICAod2hlbiAobm90IChzdHJpbmctbWF0Y2ggIlxuXFwn IiBib2R5KSkKKyAgICAgIChzZXRxIGJvZHkgKGNvbmNhdCBib2R5ICIgJS08b3JnLWV2YWw+LSIp KSkpCisgIGJvZHkpCisKIChkZWZ1biBvcmctYmFiZWwtb2N0YXZlLWV2YWx1YXRlLXNlc3Npb24K ICAgICAoc2Vzc2lvbiBib2R5IHJlc3VsdC10eXBlICZvcHRpb25hbCBtYXRsYWJwKQogICAiRXZh bHVhdGUgQk9EWSBpbiBTRVNTSU9OLiIKLS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