From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KA2iMvkb9GSUNAEAauVa8A:P1 (envelope-from ) for ; Sun, 03 Sep 2023 07:39:05 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id KA2iMvkb9GSUNAEAauVa8A (envelope-from ) for ; Sun, 03 Sep 2023 07:39:05 +0200 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 4ED114032B for ; Sun, 3 Sep 2023 07:39:05 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=nS5XhkyT; 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=1693719545; 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=sALf8H3SoZ+Is0csNsfWYuErjaHFlykPkSvCASJvY6c=; b=dW/Q6l6rK05ZmSoXPyviP4wMOSdmZsFzq4SKJFuKO45IOIYWnlrF18FmrGM91oOKVf2Z1y KhK82tpA2KAUskyeLnt13g8A/r/Nw5uWJDCI/2W6E5WJBiZdVxrfda8MYbG4wFQakAnPUg xsk8Lz1gL9925/FnufDswXs785QO2roq2oGUWievOBjcsjUhE8TJtOWv3O5hci5bh/eI3K FW5xnnPGqi2iI08c84ljGe6gX4rP4qcjQnQuYNJlFF141IPluQ7WRcwIVW2/1+GRMp9+V2 O3zg8NMJIPTDj6zoBYNeudrb4oXAY2nkLE5Qmc1dKHl7N5UmEBT7Icng1fF6vw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1693719545; a=rsa-sha256; cv=none; b=Jma7nxn467DZdkSq1KJ/xwTtprHKkd6bjrsu033JY/GE7zEFfe41bUGovKZ1JDykeV9US0 0Tn2fe7KIdvAw0it8oX4doqWr6Ho6v8XXA7J89N9Q00LGJfhQKxQTAgbBQ5GrdSZW3QfZ5 VcXe2xHE9dg2IIvnfu7STa6gCi2yiM0KkTN4rSC0uIcvb3jcyDc73Z9HMGgibLqUQRbWVi 6ldiGiHjJWfseTcMbMXDdU9KyfXbbRyLFVI6hW8+o35hizgY4DqnKC7j1Zyf74uo3GRZ9o /PyyXuUVFCCZE5eXArvERRu4GBSsP+iTrEaieT1+vKiFa7IU0I3nGVuRNP+ljA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20221208 header.b=nS5XhkyT; 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 Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qcfoO-0005qG-53; Sun, 03 Sep 2023 01:38:17 -0400 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 1qcfoK-0005q8-Lf for emacs-orgmode@gnu.org; Sun, 03 Sep 2023 01:38:12 -0400 Received: from mail-ed1-x52a.google.com ([2a00:1450:4864:20::52a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qcfoI-0003eP-B0 for emacs-orgmode@gnu.org; Sun, 03 Sep 2023 01:38:12 -0400 Received: by mail-ed1-x52a.google.com with SMTP id 4fb4d7f45d1cf-52a49a42353so540088a12.2 for ; Sat, 02 Sep 2023 22:38:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1693719486; x=1694324286; darn=gnu.org; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=sALf8H3SoZ+Is0csNsfWYuErjaHFlykPkSvCASJvY6c=; b=nS5XhkyTsaHbqa71CYwohwcdJKkW35F8UBYQclWlssz2NC1EEVL5x3JyZxChqCVECP 8jTIEBGyBJA7W2tt+kgI/TbAJj9FfHtqrqY4X6W8uZNC0kH4JWfBVB0NTZ0zwEC4pN/2 oowdfBfmQTTLGnPbIU5gfRTNZHrmUe2pgL2AB8rXDucOrNo67qsTwp2UjEZo1gfIVo2/ WmxzeglVmWfNd9sieKrzYLpHeJzitcpc78srB6Fh2eHjwdB0XEmX/U8h6JdU2YiO0zJ0 f6P3OPYrmAadPCKFcHdc4Mx3Ojg29mu/xxxPh9RiWkNw9Q7tcDqpKzMkeyBVqjXyOXJp hQuw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1693719486; x=1694324286; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=sALf8H3SoZ+Is0csNsfWYuErjaHFlykPkSvCASJvY6c=; b=GdzJWsOQVrLLVO/T9SpbhwY5XTYMTD1AZCTU/qUR/9Wdv4OTEOJnFLw18RlMHKOevV RW/zxtwBpByXpFIxOyGy8rzgETbKRp9VuuPMdgQBgmNQJou5BBBizs2PJNNhsorpAcSk 6UUHAyUENuEHixTdeM1BP/rPyhO2jLNLRoi75tLETnIuOUBd23XLCTesBTvTaph82Rp9 M+BagdelFRfyM7fh4pTVtlHHPgtyGqvRm40yBdxYadsN2wgkaiLmEaOyEEB4WCRMFjY/ sJ8g7pbcgiYNpUxu6lc1fqZ6m8PO9n2x7I4feCud6GXUuSs+vaT9xtvOm2nGbbTvFBLu bsxg== X-Gm-Message-State: AOJu0Yx9QSnSkmzlVZ5PGanWHjHkZhJ0w2Hnh+3kXEyTacc33C9YVBs8 wVsG2MZoUxyzk8Tb6F8kseMNBz46Y2w2+Q== X-Google-Smtp-Source: AGHT+IHJASKIm/cRfe4ABIeaZFgnvGDzRNoFQd90KNMSw8qkeFY8Lgwe4w5vgaWYeqNDeK9SAKptsQ== X-Received: by 2002:a05:6402:70a:b0:524:24dc:c455 with SMTP id w10-20020a056402070a00b0052424dcc455mr4560087edx.42.1693719485944; Sat, 02 Sep 2023 22:38:05 -0700 (PDT) Received: from laptop.lockywolf.net ([2001:470:24:315::102]) by smtp.gmail.com with ESMTPSA id o21-20020aa7c515000000b0052576969ef8sm4136010edq.14.2023.09.02.22.38.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 02 Sep 2023 22:38:05 -0700 (PDT) References: <874jkemrk2.fsf@laptop.lockywolf.net> <87edjhhx4s.fsf@localhost> <87o7ikh1xy.fsf@t14.reltub.ca> User-agent: mu4e 1.8.13; emacs 30.0.50 From: Vladimir Nikishkin To: Leo Butler Cc: Ihor Radchenko , "emacs-orgmode@gnu.org" Subject: Re: [BUG] Consider replacing bachload with batch in ob-maxima. [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)] Date: Sun, 03 Sep 2023 13:25:31 +0800 In-reply-to: <87o7ikh1xy.fsf@t14.reltub.ca> Message-ID: <87fs3vkea5.fsf@laptop.lockywolf.net> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2a00:1450:4864:20::52a; envelope-from=lockywolf@gmail.com; helo=mail-ed1-x52a.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, 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-Scanner: mx2.migadu.com X-Spam-Score: -8.03 X-Migadu-Queue-Id: 4ED114032B X-Migadu-Spam-Score: -8.03 X-TUID: HMmMfo2iKvkJ Leo Butler writes: > On Sat, Sep 02 2023, Ihor Radchenko wrote: > >> Lockywolf writes: >> >>> At the moment, ob-maxima has a straightforward way of evaluating >>> babel blocks, >>> >>> #+begin_src shell >>> maxima --very-quiet -r batchload\(\"/tmp/ob-maximaFOOBAR.mac\"\)\$ >>> #+end_src >>> (line 87 of ob-maxima.el), >>> >>> I suggest replacing batchload with batch(), and changing line 73 from >>> "gnuplot_close ()$" to "gnuplot_close ()$ \nquit();" >>> >>> The difference between "batch" and "batchload" is that "batch" can >>> process :lisp expressions in addition to maxima's own, and it prints >>> input/output labels. However, it is possible to customise label printing >>> from maxima's own code, and being able to evaluate :lisp just seems >>> uncontrovercially good. >>> >>> It might be that I am missing something, but batch seems a better fit >>> for Org-Babel. >> >> May you please explain more about :lisp expressions? > > This special syntax is not necessary. A recent change introduced the > function `eval_string_lisp' that removes the need for it. I.e. one can > batchload a file and execute lisp code inside a call to eval_string_lisp. > Well, necessary or not, but it existed for many years, and continues to be a valid part of maxima so far. It is surprising for new users to not see it working when quite a lot of howtos use it. (Especially the famous pattern-matching howto from Michael Talon.) Also, I would be hesitant to say that it "removes the need for it", because a "valid expression" is not the same thing as a "string". In particular, error processing should be different. >> >> Also, what is the benefit/downside of printing input/output labels? Is >> there any chance they will be caught into the source block output? If >> so, it would be a breaking change. > > Yes, his requests are breaking changes. That is why I suggested opening > up the internals a bit so that one can alter the behavior while > maintaining the same default. > > Leo Well, this change is "breaking", in the sense that it would make the output of ob-maxima be more consistent with what, say, imaxima is doing. However, I thing that there is a way to make it non-breaking, by prepending some maxima code which would make adjust maxima using "batch" to have the same output as "batchload". Something like src_maxima{programmode: true; nolabels: true;} should turn off labels if that is desired. But I would agree with Leo Butler that customisation is the best solution here. Both "full batch", and "pseudo-interactive" modes are useful. -- Your sincerely, Vladimir Nikishkin (MiEr, lockywolf) (Laptop)