From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 kHoVMLu4CmXgWAEAauVa8A:P1 (envelope-from ) for ; Wed, 20 Sep 2023 11:17:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kHoVMLu4CmXgWAEAauVa8A (envelope-from ) for ; Wed, 20 Sep 2023 11:17:47 +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 4531E54400 for ; Wed, 20 Sep 2023 11:17:47 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="gmNhM7n/"; dmarc=pass (policy=none) header.from=posteo.net; 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=1695201467; 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=OJwTv195zBCWFoVK0fxJEeCDXF+O5aIXU8HUO0m305w=; b=hTQVl+NUFz7mmjokMonGZWpSIyFyHcralg8BfCqi5x68UqXV1Fu1EdF1MeUwFF+ax41Rqp d58u9umtvJIdp+4S94OyYJXG2wtgV7cPdmQPxEpk7WhyZrqyIZY2kYFHdSWaBFEEcRSYuH THHIZa+vRzbGCXqPoMHIiN9eaU85yPqxgfdMOl5WwY84mwv551Bh2q43v5MBpoe7kHXCip fi7zbBTGxInEC50WY68aCrrV2vBum4ISd6kVslvssakHLF9HXsZDncii+U8jV0YQ8xWp3n /MY3vxUaf813Ns94OKVQydJwfIq1tQo2Gn6SIzY4YcP7CGfKULlu79jo6d3cCA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695201467; a=rsa-sha256; cv=none; b=aiALqKN1FF4VRkY2dGKg24yawOfQl0UneSsVrllL4OQJfCOWiW8f7hoWsGICdBz2iR1GY6 OvKY0F3G+DDImpffFB5s19/8ZOJdHYYUd8NBJP+XBRLjXXUoXobGtXzJwiBuQrmjHDOpfQ 4SxKuu6sM260mPd+0SZX6bczz5jCkJaECOR/8RBLtncSXsGkFiMs0aYqv78eVXkPKuV74d AtZQRuxvlYlmTCDJVCe81ce94MWkfhrERQSovTAE5PkjGP8swSj3eaIzRjuWtuSvEGgnNu 4X+Qlxyf5Cm8R2twUBxbKjEgbH5Oxvt1QNXM1T67oBsMDyYmrkT5ebKTOC/7zA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="gmNhM7n/"; dmarc=pass (policy=none) header.from=posteo.net; 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 1qitKL-0005It-Cu; Wed, 20 Sep 2023 05:16:57 -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 1qitKH-0005Gu-3o for emacs-orgmode@gnu.org; Wed, 20 Sep 2023 05:16:53 -0400 Received: from mout02.posteo.de ([185.67.36.66]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qitK6-0000Q5-Go for emacs-orgmode@gnu.org; Wed, 20 Sep 2023 05:16:52 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 70E1A240105 for ; Wed, 20 Sep 2023 11:16:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1695201400; bh=fubZ7kgLaEPzBelf8VTDQguvDKDpoI8JXW9QthQnQKs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=gmNhM7n/Eedq6oINI6a2ekSV8eh2ktk8zjwZ1gAC942OxZinRpCkA8PhuQNKbGIdq f/7xMuZfIx6lDkjFP3niy3Jcv+SLGxQWrPSNnHRq/w6L3fCrS962RqmoxPscZojlu2 zRfhrmHHgZLIDaYuDKkewlty2CZ1yf3ztyso9V+eycNUz/iB4gbO7BX3cHnMJ9bDQu P/LV44CJ726ZX8NnPnIFcqZboW2iXlAjnhYvVQXq0UBXpCeC1kebmfVQ1ViS0gVsm/ uiC/Ow62JSFI7FOdaHZW8FyI7O6Sb6HvT4yb8Rtm/cObmUGvwrgiZJzk26P0GifsPG rrrZV8+YsWUlw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4RrCZv2vq9z6tvb; Wed, 20 Sep 2023 11:16:39 +0200 (CEST) From: Ihor Radchenko To: Leo Butler 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) In-Reply-To: <87o7hyx8wq.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> <87ediz4ggm.fsf@t14.reltub.ca> <87ediypjzb.fsf@localhost> <87o7hyx8wq.fsf@t14.reltub.ca> Date: Wed, 20 Sep 2023 09:17:54 +0000 Message-ID: <8734z99pa5.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.66; envelope-from=yantar92@posteo.net; helo=mout02.posteo.de X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 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_MED=-2.3, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, 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-Spam-Score: -9.43 X-Spam-Score: -9.43 X-Migadu-Queue-Id: 4531E54400 X-Migadu-Scanner: mx0.migadu.com X-TUID: 3bUM+gc8mxb1 Leo Butler writes: >>>> May you clarify the purpose of "linenum"? >> Do I understand correctly that the above will simply affect debug output >> when maxima references where a problematic line is located in the source? > > No, it affects how output labels are printed. With this value, the > "first" line in the source block receives the line number 1; without it, > it would get 2. Ok. This should be documented in the commit message and possibly in the code itself. >> >>>>> (unless (or (string-match "batch" line) >>>>> (string-match "^rat: replaced .*$" line) >>>>> (string-match "^;;; Loading #P" line) >>>>> + (string-match "^read and interpret" line) >>>>> + (string-match "^(%\\([io]-?[0-9]+\\))[ ]+$" line) >>>> >>>> May you explain why you added these two conditions? >>> > > > >> >> May empty lines be intentional in some maxima code? > > A blank line is simply skipped by the maxima reader; an empty input line > is a syntax error. > > However, "empty" output may appear, so I have modified that filter. + (string-match "^(%\\([io]-?[0-9]+\\))[ ]+$" line) It would be nice to add a comment line explaining what this regexp matches against. > * (org-babel-maxima--graphic-package-options): an alist of Maxima > graphics packages and the Maxima code to set up that package. This is a bit confusing. I'd say "A new variable storing alist of Maxima ..." > * (org-babel-maxima--default-epilogue): an alist of the clean-up code > that is run at end of a `graphical-output' or `non-graphical-output' > source block. Same here. Basically, it should be clear from the commit message when you add new variables and when you modify existing. > * (org-babel-maxima-expand): prepare the source block for > execution. This is vague. Please explain what is changed in more details. > * (org-babel-execute:maxima): use the :batch header argument and > `org-babel-maxima--command-arguments-default' to execute the source > block. Add a couple extra regexps to filter the output of a batch-ed > source block. This reads better compared to the above. > +(defconst org-babel-header-args:maxima > + '((batch . :any) Why :any? Only two values are allowed here. > + (graphics-pkg . :any)) Same. The value is a closed list. > +(defvar org-babel-maxima--command-arguments-default > + "--very-quiet" > + "Command-line arguments sent to Maxima by default. If the Please keep the first line as a single sentence. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Documentation-Tips.html > +(defvar org-babel-maxima--default-epilogue > + '((graphical-output . "gnuplot_close ()$") > + (non-graphical-output . "")) > + "The final Maxima code executed in a source block. An alist with Same problem with the first line. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at