From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id sJtbMGrjY2cj1wAA62LTzQ:P1 (envelope-from ) for ; Thu, 19 Dec 2024 09:12:10 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id sJtbMGrjY2cj1wAA62LTzQ (envelope-from ) for ; Thu, 19 Dec 2024 10:12:10 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=bvq8DoPh; 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=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1734599530; 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=hc8vwVeUnqZKbZb3RTri7WalLWuSduRdM2B89FnP6M0=; b=KvToKGxj2ACRp4yygrfy1ZB1r8Ut2/9jOjeFVcY5mDbPwfKoWf8EncERYGwuYAEg4qY1oD /JsYnNHCaCpGXd5UriBMxoSu/7XzbfteidiRSGl7ko3Cd+63S39OiN1Krp8NQmBosDxE7U CKNnl9r77sDUfIma6FM2IqUdoYeKQxLm/haKvo5+L+ExvNIMrJYhZTcJkWSCk7DXaFYxpI rUUumDbxwLJqF7knYTSw7cKoJi0IwnD5lONRWM/LoNs89I+RB7Ua4EbrHT8xtv7hHQq//z RY4xwOU8fgLZjp5a2ilqPgWl0WwN0UcoKmzsFFZtfke/Y9WtJZ1VpESkTdD/rg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=bvq8DoPh; 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=gmail.com ARC-Seal: i=1; s=key1; d=yhetil.org; t=1734599530; a=rsa-sha256; cv=none; b=LBNyW6sbPZGaMd9s6JCM+GetvP1abVclI3QDYIJ64zcoITEgg9ToerqSrNFwLH8hd7bJ1z 9ZU1PSx00YmXZlJ5mc8xUfXgvdsmKPCF49uDmOLXN/C+w85b6P6dZp0oHCdhUD0kcjHig8 yxgR4ZY3OH7j3yPEYKLakN6016N/Rg5dMs/mT6ykTgAUcBqSDP3LH7xsR+9XUNFP/RpwTe sC1nDzxMSCBBILbu2EPKvp7GPNvVFcetnVIeKHiHU4zG2lY5SgLtbM2tAd6ejUEvfDkhWZ p0e5RhKan3RKoa/1h66MWxMU9pXhlJVHzRL+/lRYgGmd19FfWOIlDLRIiv1Lig== 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 26E682500A for ; Thu, 19 Dec 2024 10:12:10 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tOCCT-0007u8-BF; Thu, 19 Dec 2024 03:48:05 -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 1tOCCR-0007tk-7h for emacs-orgmode@gnu.org; Thu, 19 Dec 2024 03:48:03 -0500 Received: from mail-yw1-x112c.google.com ([2607:f8b0:4864:20::112c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tOCCP-0008LC-KB for emacs-orgmode@gnu.org; Thu, 19 Dec 2024 03:48:02 -0500 Received: by mail-yw1-x112c.google.com with SMTP id 00721157ae682-6f145e5cd83so4551847b3.1 for ; Thu, 19 Dec 2024 00:48:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1734598080; x=1735202880; 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=hc8vwVeUnqZKbZb3RTri7WalLWuSduRdM2B89FnP6M0=; b=bvq8DoPhyvADIWKb53SXgB6lsla78b9eCodBMo0Wx4YxZfsMPy66LSL+U4Cnq5Ho2I bdNmH+ml69zZglHpAYlel6n2FiKDtBHNAjWGUnZGwLZSiNFg491t7iMeYfjhPHP1bTrq WP9ryGCtKBljPPV+A+TEiFEWBx23kqsgY2OeZF26rPfjXfsmESb/WH0o9BpA7+Oj1WW3 /U9P2iW7eP5HwxBdxZr60vgAxwbcHUxrPLnkOkpcMF060KjOX/koHVDeEl9hMT+13WlL Y+LgMiHzA7D9WRv+YNNGEW1S4Al5VyLfaaGQTr8v/bSs4cL6J2+ljG1p1QF7+NVJRhvO U7bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1734598080; x=1735202880; 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=hc8vwVeUnqZKbZb3RTri7WalLWuSduRdM2B89FnP6M0=; b=qufUqg/lOoWPp7NGKlCfaoM/x84ux62r4+Saqf3DTw5OePTlmN7aUDmMCHQejRqJK5 JfJ8W71dPeu1S9umkNcHzRE3xlOUuYrha2RRyYCTo1GOgvSGTjsjRkGDtVUNyysl7nl8 dLkYsqiwVeFyEOEr0GPRh07bCnCJ/F1n1LlWH5aeZCFFjgSOnI3nKBC9YrpAf/n0Q0iI KD1MWf+fkgGNqfqhcQwL3NmSwk8YnmhWVxbIzpVgF0NLuUisCGRknmW8Yb+Xls/UwJYJ S4iNXAl1rYJ3CPnNKKf75I3hhGVI6tzrYGbaSvpAqesDq7CIngWm4Iwqg32Zv6OQmJoO z55g== X-Forwarded-Encrypted: i=1; AJvYcCWVI9tWwclBrdTGG0TvEROWrIsjUtC/jsiSfrBh2XVVVvHRxKlCCTkMSUnjL2ZVng427kpX5KoXqSvtMpQc@gnu.org X-Gm-Message-State: AOJu0YwbHJMjl82HqRtiDAye2HOfo3RlcJYPphR4+YMO98OqGipLVf4C iuECsrNFA1Wez96+oYkjk/BlXm6KfFcAHYqsEDRcLa5CZOJJ0R98JdTa/GhynI8umh79MVovo7O oYrAqDp/nwu0xos8EL4EJ0YTJ1nQ= X-Gm-Gg: ASbGncvUDeYjpEWLFG3sL6JUsCpf45icr+FWcsS9+RazUKYw6oWL/wRMCnnCq3XiRXS P95FYcVcSsDzZ5MKt7LaQE42a8y0g+wrYWpqgRh4= X-Google-Smtp-Source: AGHT+IGWzOzAY52TKDJcdE86trE9Wj4ItQb1yXdBcOYYU32wOg0Y/SjvFZPNE/N1EbpUF9MnTHhBS8lQ1l4gtzpUyOs= X-Received: by 2002:a05:690c:4804:b0:6ef:6035:828e with SMTP id 00721157ae682-6f3d26b3f89mr57283147b3.35.1734598079778; Thu, 19 Dec 2024 00:47:59 -0800 (PST) MIME-Version: 1.0 References: <87ldxysqoo.fsf@localhost> <874j4gfocp.fsf@localhost> <87ttccs1vc.fsf@localhost> <878qt9yd69.fsf@localhost> <87plm2e50v.fsf@localhost> <87h67cx569.fsf@t14.reltub.ca> <874j3cvcew.fsf@t14.reltub.ca> <87ttbbpgbo.fsf@t14.reltub.ca> <87seqplv1g.fsf@t14.reltub.ca> <87pllsjo9w.fsf@t14.reltub.ca> <874j33ed5b.fsf@localhost> <87o71bgfws.fsf@t14.reltub.ca> <87cyhq8b4t.fsf@localhost> <87frmmdnp5.fsf@t14.reltub.ca> In-Reply-To: <87frmmdnp5.fsf@t14.reltub.ca> From: Benjamin McMillan Date: Thu, 19 Dec 2024 21:47:33 +1300 Message-ID: Subject: Re: [BUG] ob-maxima outputs linenum:0 in results on MacOS To: Leo Butler Cc: Ihor Radchenko , "emacs-orgmode@gnu.org" Content-Type: multipart/alternative; boundary="0000000000005f9ae706299b9677" Received-SPF: pass client-ip=2607:f8b0:4864:20::112c; envelope-from=mcmillanbb@gmail.com; helo=mail-yw1-x112c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -6.47 X-Spam-Score: -6.47 X-Migadu-Queue-Id: 26E682500A X-TUID: yl/WhJ2eK9IX --0000000000005f9ae706299b9677 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable The modified suggestion: (add-to-list 'org-babel-maxima--output-filter-regexps "(linenum:0,$") also fixes the problem in the cases that I checked. Benjamin On Wed, Dec 18, 2024 at 10:06=E2=80=AFAM Leo Butler wrote: > On Tue, Dec 17 2024, Ihor Radchenko wrote: > > > Leo Butler writes: > > > >> Putting that into the batch file will result in it appearing in the > >> output of the source-code block. We are trying to stop that. > > > > FYI, I have basically no experience with Maxima. So, I was simply > > shooting in the dark. AFAIU, linenum:0 simply sets variable value. If > > setting a value can be done from inside a script... > > To explain, Maxima keeps track of the "line numbers" of each complete > input in the variable linenum. When it executes the batch script that > Org sends it, that command is on line 1, so line numbering in the script > would begin at 2. We set linenum to 0 so that the line numbering in the > script starts at 1. > > > > >> I think, if the above regexp works for Benjamin, then we should use > >> it. The regexp only matches an incomplete (hence mal-formed) line of > >> input, and so it can only match the errant output that Benjamin is > >> seeing. > > > > Unless we find a better solution, I have no problem with it. It is just > > that regexp filtering can cause issues, like what we keep seeing again > > and again with prompt filtering in ob-shell. > > Agreed. One alternative would be to have Maxima add a command-line > option that re-starts line-numbering in a batch file at line 1. That > would not fix Benjamin's problem, in the short term, though. > > Leo --0000000000005f9ae706299b9677 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
The modified suggestion:
=C2=A0(add-to-list= 'org-babel-maxima--output-filter-regexps "(linenum:0,$")
also fixes the problem in the cases that I checked.

Benjamin

On Wed, Dec 18, 2024 at 10= :06=E2=80=AFAM Leo Butler <Le= o.Butler@umanitoba.ca> wrote:
On Tue, Dec 17 2024, Ihor Radchenko <yantar92@posteo.net> wrot= e:

> Leo Butler <Leo.Butler@umanitoba.ca> writes:
>
>> Putting that into the batch file will result in it appearing in th= e
>> output of the source-code block. We are trying to stop that.
>
> FYI, I have basically no experience with Maxima. So, I was simply
> shooting in the dark. AFAIU, linenum:0 simply sets variable value. If<= br> > setting a value can be done from inside a script...

To explain, Maxima keeps track of the "line numbers" of each comp= lete
input in the variable linenum. When it executes the batch script that
Org sends it, that command is on line 1, so line numbering in the script would begin at 2. We set linenum to 0 so that the line numbering in the
script starts at 1.

>
>> I think, if the above regexp works for Benjamin, then we should us= e
>> it. The regexp only matches an incomplete (hence mal-formed) line = of
>> input, and so it can only match the errant output that Benjamin is=
>> seeing.
>
> Unless we find a better solution, I have no problem with it. It is jus= t
> that regexp filtering can cause issues, like what we keep seeing again=
> and again with prompt filtering in ob-shell.

Agreed. One alternative would be to have Maxima add a command-line
option that re-starts line-numbering in a batch file at line 1. That
would not fix Benjamin's problem, in the short term, though.

Leo
--0000000000005f9ae706299b9677--