From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id eCPQAu10BGXL9AAAG6o9tA:P1 (envelope-from ) for ; Fri, 15 Sep 2023 17:14:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eCPQAu10BGXL9AAAG6o9tA (envelope-from ) for ; Fri, 15 Sep 2023 17:14:53 +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 46BB437622 for ; Fri, 15 Sep 2023 17:14:52 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=umanitoba.ca header.s=selector2 header.b=DdVWat+2; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=umanitoba.ca; 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=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694790893; 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=fB2ujtKGj6KGCjjvvSNR0VYsNaNkNDoJPd9iNyVfhPo=; b=OxKIOQIA9XzZSPe+ekHxiVaU+bSoXfi0dgjghyF3r45MbKdb08zMOZzZZitgak01Eg8h7t 0JfuUoj/lKKQEnkd9nyO8ynuSohPGkLq+ecnZIKNzo2JO2gN0t9OQkAAz3I8atU/Zls9fe BzcpfQuS0Ad8rroXq9ubUKJRS6Pm91FAGUOILLi9mfCFtqGuuTaWAe3vOd6UnYYGjYVE++ y7D3ukh/5+PZZ5THCksEZpxxodUSxIu1CJfby8gJLIiEPh0vBeb9fbwANpkMOOmFOuXnno JYuW4aS+sIAZw/w2Hj+pRo0eEs++QC9YCypDdoAKaR0YmLwnb/SPBg2oEyl/ag== ARC-Seal: i=2; s=key1; d=yhetil.org; t=1694790893; a=rsa-sha256; cv=pass; b=O4pQbh71SO7PGPRwiepfGx3blysl76diNZuRfconCXm2X+hbl0aMeB6ziyg/pOhEP+XBXG 1DzHivSMOomQvAlfn0NIH0iHIFyl5CfieUyIx3wT7Z4mp8EQ61yjbjI3FKThs3bBXpPApm nU7XmIdjSnPJwG1xyL5xyMyA9HcA3vrbY11k2LBSh+tg6lrbVLtCVVIJtWl4+lrcl9p7e1 2uV2aapocJ5K9FqsT4tRLxpJD/NvX75j68WiKTUoU1TfPpSDK26C678MdGf5vNoyuFwVLP EM6lTq6zc362kAQpnv4wFDgNOmwhDYTsHl+nndyjw25S0/5v88JZ4dsnEgv+Fg== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=umanitoba.ca header.s=selector2 header.b=DdVWat+2; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=umanitoba.ca; 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" Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qhAWG-00055K-UX; Fri, 15 Sep 2023 11:14:08 -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 1qhAWD-0004yu-RE for emacs-orgmode@gnu.org; Fri, 15 Sep 2023 11:14:06 -0400 Received: from mail-yt3can01on2130.outbound.protection.outlook.com ([40.107.115.130] helo=CAN01-YT3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qhAW9-00039e-59; Fri, 15 Sep 2023 11:14:05 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ECcIsNCBy537UQpMMWyOIhC72AUZveNdhbPrp4E7qGH29Bovo5pvGLGE0YQJs0FZIhUGYh6bn7M3ATXOXfOJUhzTpsCms6suzDsdVmL0UQkH/PNG8JrUjISEBGq5QpuX9/7N1/vtyZlUNXgodzSlX8SWpA1FFwNDC63D6zQlprayQo4fbo/8b5UvMThfY+yuDIGS+7iggy6oZqqbMNp+ML1rV4BMogB6D/jussK8MVbpqrGL9fWIEMR/a4ZUOvwXFp/EtsSjsB4owXi7HEggYpry3YbMQN/NpA/boest0XvqgV/YyvXHjVyqTQfVCF0WpgGeCXRB0kuWhRlkb3sK5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=fB2ujtKGj6KGCjjvvSNR0VYsNaNkNDoJPd9iNyVfhPo=; b=PMqlCjKLdJkM+Mm2Myyoj+EbCxNem0jt9/P6D+5KxIOtV+BxX3I5nTN98vkERwBz4uAgxHTuDfNF/GgraJOGB+me+yrfdqOnpNWR6mWcpnkF573vTreRBSPD8AOCiWzWoHCVWde2QTdAiLNbLIqC8Fqlt2cpzeFvaA8FGpoFkwnmawT8fz/M6jfG3pjETexH0QFBslQAUtOEUqNov9a93lEBvw650chhfEHMjKQcbVSPIqKf6eqo4loi3fMiAp+Ky/PQqg0zdzFEUwRIPghsgpN+l0E3VyZYTRNtIPnDSCMLLDwPX7w9IchVBcul/VY7zZZe6cpMdrFZLKjOoZs6cg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=umanitoba.ca; dmarc=pass action=none header.from=umanitoba.ca; dkim=pass header.d=umanitoba.ca; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=umanitoba.ca; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=fB2ujtKGj6KGCjjvvSNR0VYsNaNkNDoJPd9iNyVfhPo=; b=DdVWat+29eaqFH1C40KT47lR29MkRZMlCjOfihBfUg35OpF9U2lsF9pxWpfEJIQYYX5a7hdrki7w1nJLWR3oUIvO1CIj6jnclyS83MhVOpGwU3dhaZaaddtNJILOZ50Pl+q5AA6AyxLwriuxlldn3Pc4t0jxK1oSdP5YCzlWNVPxdWDK/XsO8r7TCYC6qg9yZtgl0W8+4/8POhWl7fxl4C6Qrybu99fk5xcM+m5j+HMeOKY8TTdkNr+iCfmIZqwOUvH76d8/2e6JPnjQdFrOpEct4cEfBwkAYNa3H3Hre5WjcgH6JHZ0hOlMkAB0S4acvJdapje+kZXOPT5ARih0Vg== Received: from YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:90::5) by YT2PR01MB8534.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:b5::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.21; Fri, 15 Sep 2023 15:13:47 +0000 Received: from YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM ([fe80::a217:d45d:2e78:e72a]) by YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM ([fe80::a217:d45d:2e78:e72a%4]) with mapi id 15.20.6792.021; Fri, 15 Sep 2023 15:13:47 +0000 From: Leo Butler To: Ihor Radchenko CC: Bastien , Lockywolf , "emacs-orgmode@gnu.org" Subject: Re: [PATCH] ob-maxima.el, etc. (was Re: [MAINTENANCE] On how much we can expose internals into defcustom) Thread-Topic: [PATCH] ob-maxima.el, etc. (was Re: [MAINTENANCE] On how much we can expose internals into defcustom) Thread-Index: AQHZ5b1cnmdwU+/6BkaHyzVCQiB7wg== Date: Fri, 15 Sep 2023 15:13:47 +0000 Message-ID: <87ediz4ggm.fsf@t14.reltub.ca> References: <874jkemrk2.fsf@laptop.lockywolf.net> <87cyz1ivzw.fsf@t14.reltub.ca> <874jkdhwix.fsf@localhost> <87wmx8h2b0.fsf@t14.reltub.ca> <87il8ovqeg.fsf@localhost> <87cyyvdraz.fsf@t14.reltub.ca> <87ledinrl5.fsf@localhost> <87y1hb5cb4.fsf_-_@t14.reltub.ca> <87jzsrai3x.fsf@localhost> In-Reply-To: <87jzsrai3x.fsf@localhost> (Ihor Radchenko's message of "Fri, 15 Sep 2023 09:41:38 +0000") Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) x-ms-publictraffictype: Email x-ms-traffictypediagnostic: YT3PR01MB9964:EE_|YT2PR01MB8534:EE_ x-ms-office365-filtering-correlation-id: 264fd4a9-84b7-4dc5-e5a1-08dbb5fe5c1b x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: aT2D/ET+a9P2LzL+Zq9yih7xYY9ITgovLtmVcGCdmr8Mwwwe8iJsJ1N3N3J5r1Za+7nkmovLLKS7MUpOqDS8Bx+AOH6PDAjQKsLm/IX9SUNnhK5JGU5WLgNNqlwO9iCdrERQ+/YBHIDEE07VrtUWn8pMD76XmPx/MzzByYxTu9icYeDt55ssISLqUigVaKrOxtfDNQQ4piQvRGOPAjKolhbV90vE8q6fIZcNW10n1W4cUPXrPhBbZXJj5jXMj3og7LMP/lh7Ve5+urPPLH4odVxzLghAthmSV8SfsVx8EzZN0pGDprMHcvBpLOWSOKBH4VF0TYLgh+OJejhgdpoj7tARBJClPRD492T3nZVUS39GV1EOhawKP2MNQauM0KMDrDfW0UYoCQsA7h0H+bHztws3/2nnhFkpdVLBVI3W5b4RkqUELqM+wxNjgBrh8D3Cjkg3cXxlqK/TIaAOE590KB5NsGodPGiIe6g9JB/B2LiV3dIeWUC5jAFgGtro2VDLNBqI9ToN07B5doXtQfrRHSPd7MMooHFcs2KguLIgQ1je2/MMsU/FhgfGfRVmYgMDyOjLeK3270WaeD2cRxhOJzvIUTqjSllA4BX/QjL1gQs= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM; PTR:; CAT:NONE; SFS:(13230031)(376002)(366004)(346002)(396003)(39860400002)(136003)(186009)(1800799009)(451199024)(91956017)(64756008)(54906003)(76116006)(71200400001)(66556008)(66476007)(66946007)(6506007)(6486002)(66446008)(9686003)(6512007)(6916009)(786003)(316002)(966005)(478600001)(41300700001)(4326008)(8676002)(5660300002)(26005)(8936002)(38100700002)(38070700005)(122000001)(2906002)(86362001)(83380400001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?pu4CCoFkDF6ZX5HSCmew0vh7i3bq2NcHYa2Edt9/DDTzMpa6tCa1GJYU6M?= =?iso-8859-1?Q?+J7NfaoGHSxyAB58aoPmbvSRh8cS9h622xFW6clNoO8I9gZoh5k3p6BrwO?= =?iso-8859-1?Q?cpvgtQUe65qKE0pQyTw3oBWirwNmJ0pcGFl/GYAo6Rue4KOqE4FcElYIOl?= =?iso-8859-1?Q?QM548PLLI37F9PT0f8PywWPEBJFze/uA9xyKPBynCg7r9HEtTOdy6XEGCb?= =?iso-8859-1?Q?CQ0YlcHoZ8J2vCgC4UnsYOUtPr9bBpn5+ilWTiJk06H6R8amEakiE5HMHu?= =?iso-8859-1?Q?9Sd9bS+se2e3DmZZ4BBjh/cU6BFSgAqSNfki8+9mD4K7nj4zy00yiI9awB?= =?iso-8859-1?Q?LoWoJwI2WIqmVQDpMrJtMa44Fh4KSl2fDTZbbguInZ/NWFnr3exu7rhZGc?= =?iso-8859-1?Q?wPOVl0HVxZVPFkXyMV9FGccSHM9b4kgG+60CLNozxJTGimb8HS/3mdQ88P?= =?iso-8859-1?Q?hGqDgRp9gphlNSfVUZOWCOUKj/9uhxFI9gg7i4WQFmJUpD15I1FMe5oOA+?= =?iso-8859-1?Q?dGQPRFM6pg5JmwRuZUwMMXMvnc3iuq4qzuJfguLrMoVTL0cJ28jGkyF+qF?= =?iso-8859-1?Q?9OPhv00KM8Ox1dZZRSuye44mB86t2UU9idSWckSFjuBb75S/MPk25vuQtn?= =?iso-8859-1?Q?Qqnjk8T4OMskN2fmCK6AXvYuiWogT1Wr1OlNNfROn1sNsOGdm93lP29Vsn?= =?iso-8859-1?Q?BPmx7GCPsvRwCEpXjQGVzVUTONjFOmJgpFLcpGQM4oahemu1vHW5fR8A/p?= =?iso-8859-1?Q?DWoDzCluVViUf0FX0WDxCfO9kFyiohCd+RzyBQmoxTd44oEAfNnc9L4Fm5?= =?iso-8859-1?Q?4tWAeALgewQe7uMRGcK4zvPUJ4O33RTMGTK2EQi2u+gbSJmFsgiYkCJuZS?= =?iso-8859-1?Q?emS9qAFQxUW6dGU6F3kccIP1a59Nd4M6b/+vFgYPVTXoiKSk2POHwEmyxd?= =?iso-8859-1?Q?6HYzU5KnIP1Wlx/DoBKpAchPxm79kSXNpPh1266Hw+C7yzpez2Tf/3ROGN?= =?iso-8859-1?Q?WsQiTn3IofF20j8LlwGmhwpYd8Bm5UBtoz69tG/oJG1CB0CcEiodOlRLl7?= =?iso-8859-1?Q?sZBqUHNsniqYoanQAxxTKODiRAqldzhqKHknORVxp5XqZXyB0y4dLEndFt?= =?iso-8859-1?Q?TQLh8iPtWfYHhtj8p58jakZVOhh4oR8aBHLxcsoDpyg6ouu8kCnmx8U3TU?= =?iso-8859-1?Q?AqvPEgIHwBqpxA0sne5f+6r80evkRYs3v0omDTzMtYMvoSrYVQt7ZQdBi0?= =?iso-8859-1?Q?rBHl2AMo9or6zwR61sPBkeyJfG1hGwIoKcuW1DdYYLq5XQLwkgiqykMA6L?= =?iso-8859-1?Q?IvDL+Z5fITkOB6RKvoXnE+LrKqlaufS+UgL1ZlXIACl31An8noZL/mlhwT?= =?iso-8859-1?Q?Y30TCflqSHDOqGIPNDjjm/AgDGAxnNiN1HYyXAWKhqcGewrGWxkoZKkyNT?= =?iso-8859-1?Q?3IpBLYbA1TCrBuj8yqZLuaz0cwEGFTw+SP5H+3pcsjWIXYopbcLZgt5w+X?= =?iso-8859-1?Q?f5f2/O39yEW52aXYtpNB3ZUyUZlSP8WysPMSnh2AgFebLmJuOZfkLn8XCX?= =?iso-8859-1?Q?PC9apIKHpQrf2iHuDyOVO2ezAqMI7PpiSZl5hxuiUMgWPYLtiB/gME5Yyh?= =?iso-8859-1?Q?MDYOxep0xNEu/ji0WCu8kFizB5fMlv3+pCXmzDZvR9N7L2q39r64h/oA?= =?iso-8859-1?Q?=3D=3D?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: umanitoba.ca X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-Network-Message-Id: 264fd4a9-84b7-4dc5-e5a1-08dbb5fe5c1b X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Sep 2023 15:13:47.4374 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4f80dd0b-338c-4e4c-8a14-90446962f7b8 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 5e/Ce/KOHH6XkTDzu+RrdSykwfVW25fxII+cKj/0pMSjsaRIjXOeGEHZQk/OVJMft8EKKuX9g3ypLT07evYpXA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YT2PR01MB8534 Received-SPF: pass client-ip=40.107.115.130; envelope-from=Leo.Butler@umanitoba.ca; helo=CAN01-YT3-obe.outbound.protection.outlook.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, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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: -8.88 X-Spam-Score: -8.88 X-Migadu-Queue-Id: 46BB437622 X-Migadu-Scanner: mx0.migadu.com X-TUID: ygTdJ4NaMFTe On Fri, Sep 15 2023, Ihor Radchenko wrote: > Leo Butler writes: > >> Attached is a patch that tries to address some of Ihor's concerns. I >> have added two header arguments for maxima src blocks: > > Thanks! > >> - :graphics-pkg lets the user choose the graphics package to use; >> >> - :batch lets the user choose which source-code loader Maxima will use. > > We need to document the new header arguments in ORG-NEWS and in > https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-maxima.html Thanks for your feedback. Yes, I will do the documentation once the patch has attained a nearer-to-finished state. > > Also, non-standard arguments should be defined in `org-babel-header-args:= maxima'. > Ok. I see that some packages (e.g. ob-gnuplot.el) use a `defvar' form, while others (e.g. ob-R.el) use a `defconst' form. Is there a preference? >> I have also moved two defaults, that were embedded in the code, to >> `defvar' forms. > > This is fine, although I would prefer to keep these variables private for > now. My understanding is that a special variable defined via `defvar' is one that is intended to be "private", i.e. users should not change it unless they really know what they are doing. Is that accurate? Do you mean the names should be something like org-babel-maxima--command-arguments ? > >> +(defvar org-babel-maxima-command-arguments >> + "--very-quiet" >> + "A string containing the command-line arguments used when calling >> the Maxima executable. See `org-babel-maxima-command', >> `org-babel-maxima-batch/load' and `org-babel-execute:maxima'.") > > Here and in the other docstrings, please use a single short sentence in > the first line. Also, please use double space between sentences and fill > the docstring text to standard fill-column. See > https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-T= ips.html Yes. > >> +(defvar org-babel-maxima-graphic-package-options >> + '((plot . "(set_plot_option ('[gnuplot_term, %s]), set_plot_option ('= [gnuplot_out_file, %S]))$") >> + (draw . "(load(draw), set_draw_defaults(terminal=3D'%s,file_name=3D= %S))$")) >> + "An alist, each element of the form (PACKAGE-NAME >> . FORMAT-STRING). The format string contains the Maxima code to set >> the graphic file terminal and name. It must contain `%s' to set the >> terminal and `%S' to set the filename. The default package is >> `plot'. See `org-babel-maxima-expand'.") > > According to the docstring, it appears that the order of %s and %S do > not matter, which is probably not the case. Correct. > >> + ;; graphic output >> + (if graphic-file >> + (let ((graphics-pkg (intern (or (cdr (assq :g= raphics-pkg params)) "plot"))) >> + (graphic-format-string (cdr (assq graph= ics-pkg org-babel-maxima-graphic-package-options))) >> + (graphic-terminal (file-name-extension = graphic-file)) >> + (graphic-file (if (eq graphics-pkg 'plo= t) graphic-file (file-name-sans-extension graphic-file)))) >> + (format graphic-format-string graphic-termi= nal graphic-file))) > > What will happen if :graphics-pkg value is not expected? What about > unsupported graphics file extensions?=20 I need to add a fail-safe when setting `graphic-format-string' > And is it always the that terminal name is the same as file extension > (I am thinking about Gnuplot's pngcairo terminal)? I see your point. At the moment, the code works for the following terminals: png, jpg, gif, eps, svg, pdf To support a range of terminal options including, I would need to add a :terminal header argument and an alist of graphics packages and their supported terminals. > >> - (format "batchload(%S)$" in-file)) >> + (format "(linenum:0, %s(%S))$" batch/load= in-file)) > > May you clarify the purpose of "linenum"? Maxima keeps track of input/output line numbers via the variable `linenum'. I set the linenum to 0 so that the line numbering of the input in `in-file' starts at 1 not 2. This idiom has been used in other Maxima front-ends, such as `imaxima.el', too (although imaxima now uses the lisp reader, instead). See https://sourceforge.net/p/maxima/code/ci/76105d9ee231679eccac888a04c98e= 6ef66df087/ > >> (unless (or (string-match "batch" line) >> (string-match "^rat: replaced= .*$" line) >> (string-match "^;;; Loading #= P" line) >> + (string-match "^read and inte= rpret" line) >> + (string-match "^(%\\([io]-?[0= -9]+\\))[ ]+$" line) > > May you explain why you added these two conditions? When `batch' starts, it emits the line starting with 'read and interpret' and including the name of the file being read. This is extraneous output, and should be filtered out. The second addition filters out empty input/output lines. Without that filter, the block #+name: ob-maxima/batch+verbatim+quiet #+begin_src maxima :exports both :results verbatim :batch batch :cmdline --= quiet (assume(z>0), integrate(exp(-t)*t^z, t, 0, inf)); #+end_src produces an output with a pair of empty lines: #+RESULTS: ob-maxima/batch+verbatim+quiet : (%i1) (assume(z > 0),integrate(exp(-t)*t^z,t,0,inf)) : (%o1) gamma(z + 1) : (%i2)=20 : (%i4)=20 I don't understand why those extra lines appear. It looks to me like a bug in Maxima, but, because of that, they need to be filtered out. ---- If you recall, this thread started with the OP's request to replace `batchload' with `batch' to support Maxima's :lisp reader. This patch provides that support: #+name: ob-maxima/batch+verbatim+:lisp #+begin_src maxima :exports both :results verbatim :batch batch :cmdline --= quiet :lisp #$(assume(z>0),integrate(exp(-t)*t^z, t, 0, inf));#$ #+end_src #+RESULTS: ob-maxima/batch+verbatim+:lisp : ((%GAMMA SIMP) ((MPLUS SIMP) 1 $Z)) (The code may look like line noise, but what it does is it switches the reader to read lisp code via :lisp, then it uses the lisp reader macro #$ $# to read and evaluate Maxima code within the lisp reader. That returns the lisp form of the result. These tricks are not possible using `batchload'.) I will prepare a revised patch based on your comments and answers to my questions in this email. TIA, Leo=