From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id sIHqC8HV+GReMAEA9RJhRA:P1 (envelope-from ) for ; Wed, 06 Sep 2023 21:40:49 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id sIHqC8HV+GReMAEA9RJhRA (envelope-from ) for ; Wed, 06 Sep 2023 21:40:49 +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 63F4865FE7 for ; Wed, 6 Sep 2023 21:40:48 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=umanitoba.ca header.s=selector2 header.b=HicXCE9G; 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=umanitoba.ca; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1694029249; 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=p/JtjrGHI9BL/byAgUB1lMmeHly11Ml+dKfIf9P4JMc=; b=Nos0P8tpfk+wcJ8213BYVfCy9afUBSH0zL7/K9T6LAa+1w2EUelU+X4lmYcKHJ5TlktgNP oVXzkMucPh4MZ90NvcM+OXW02uo8BAYAwsfalJfFKYmYo3HOwQQ3G2U1gXL7bx85W+YXms GZ6bNoNl4BWJSZBOn1UkrNlC9BAK11bTAMFC6EZNeZvPxR/GA0Xpw0g3Y45w0PUrWC2dMt zwFikhxb77ZnOqoBAD+ZfJudDndItblsE4OtPUukyM6wJZnVYfUUrHk9guhiMnZnwUguRD PBojSMrvD0uZ33G+lgUEYpOfynLcFF8n/C26ItnwKHzD+L+iEBeSAJ7xqGdwjw== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=umanitoba.ca header.s=selector2 header.b=HicXCE9G; 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=umanitoba.ca; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Seal: i=2; s=key1; d=yhetil.org; t=1694029249; a=rsa-sha256; cv=pass; b=ZPPAQ3w4zNVU93hxbFlw6r+grQC6f8c0Z28m6jIIh/AvtFMqs1xNWI+RLFw3rP8Fo4h0pj uwT/Mhai1+xQgDKrqpZf6eNAxOwkGdcyuJs8cda0OsbSE0Wq92YhnQVPFZhy4FV3IEpXe+ fOyvqz0b8psd8g0O8OOkNdKLQgeJ94AEO+Ge4AZAuA04giJF965alr31gorsI9niJO5WAG 6iKaQJe7x+4kyKnDg7wJhiOTuneGUtzjvfWEu/fNjhvzMmZXHBMoGOUr3eTeHhdGriBRs8 KvwTy3L+02yw9M8hg9Nyo1Lgv6Ql/lTqpTsVHeeLu84tWB9Fg8zZPllmJJN2CQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qdyNd-0004Gl-5z; Wed, 06 Sep 2023 15:40:01 -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 1qdyNb-0004GH-9q for emacs-orgmode@gnu.org; Wed, 06 Sep 2023 15:39:59 -0400 Received: from mail-yt3can01on2098.outbound.protection.outlook.com ([40.107.115.98] 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 1qdyNW-0006kk-WF; Wed, 06 Sep 2023 15:39:59 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MCQ6OzwZL2DtRT7NsMqFiQ58jyM7FHfLXwsoFggGGnmvYyhCZ/Uz8OaC0sw84GukEb7laQH5hZyl0V3nERYl1S1Xa1J/jhYizVF8mxYuZm3dcL23N1fGgref8lgeK57IPcSW3VOKbTWT8cx/jdqA+cOKd4wPsMQ130oSNzTy3oppNWddoW6ZT0f64PdpyXhP1solSV/8phc2lY5wuZRzeANiYgZu3b/vgwG0h5U/4sCTASfLzFUUOxwzSW1LXaoiu0iiGFUIdtDjSjzgdDpxzX5XGgguRkEf/FaDFm+z/Hjrd0IrNFj/PLUGrz/co6AbroQJLML6LwPGVbuHvKvsXg== 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=p/JtjrGHI9BL/byAgUB1lMmeHly11Ml+dKfIf9P4JMc=; b=Svnxo4XFCHxTzd0WSE3tfiu+1hcWPcRXtOUN0WhugMTjb2SikLa5b1YtiGj8FPRWHVRmRa3AC0U/iMUKjPihvZ6x4Cko6ScJFgbbjT8D6HbsBaYhFniEUk5s45DUbmwbaYrVY9N1LTaUpHr783q0Ca3XeXfDbfuaAcRRtQBGmwvo5Tsz6TPYtu8j5IBuGR3xCxVgw8ZuA5jRLFBEkfDMCMIj5FjUHUMWgc/+mv6qE40+TQcJn1LxdWS1YT/FgqA15eh8LChRDutEdoc7wUtWtkcOFzFJMU4DIIpgqy331srtCboiBYa/wSHSApI9xJMfZ5iPAGERJg/nn+TUYwnf4Q== 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=p/JtjrGHI9BL/byAgUB1lMmeHly11Ml+dKfIf9P4JMc=; b=HicXCE9GnQNBwSOhx/T9gLhzbSh1g7Fm6516SqzqBaIWveAnK9MLqQBsuNsdimXH5LZ3ilMLzTuGoJGHA6HLRuhFxO0urlqsA3js80+00G0EH7wk1acvGlTUhSivsMtRVFxIAYIxFgLnypcIcNQaDpRwD6EcpCba9+Ksu3FMSADFnxCd7HkiIy8GSoYZIOwZPFqZDcG/c4phQ4FpsOpauJ+2kAUkYfIfDBjyzC9CI0ybcO9RohzqlCvvlKxU4E1s8GtAn/ovUsqUurdINyoWvzHniqAg7wpCZ8b993sK5iR5E71a0v9E49tT0qtKuGnZbvOhh6R4Z5CXT87zdGZidg== Received: from YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:b01:90::5) by YQBPR01MB10567.CANPRD01.PROD.OUTLOOK.COM (2603:10b6:c01:7f::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6745.34; Wed, 6 Sep 2023 19:39:49 +0000 Received: from YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM ([fe80::6b6a:be90:9c28:1cce]) by YT3PR01MB9964.CANPRD01.PROD.OUTLOOK.COM ([fe80::6b6a:be90:9c28:1cce%4]) with mapi id 15.20.6745.035; Wed, 6 Sep 2023 19:39:49 +0000 From: Leo Butler To: Ihor Radchenko CC: Bastien , Lockywolf , "emacs-orgmode@gnu.org" Subject: Re: [MAINTENANCE] On how much we can expose internals into defcustom Thread-Topic: [MAINTENANCE] On how much we can expose internals into defcustom Thread-Index: AQHZ4PnlLIosF2MUWkKCMzR1AmEiYw== Date: Wed, 6 Sep 2023 19:39:49 +0000 Message-ID: <87cyyvdraz.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> In-Reply-To: <87il8ovqeg.fsf@localhost> (Ihor Radchenko's message of "Tue, 05 Sep 2023 10:57:27 +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_|YQBPR01MB10567:EE_ x-ms-office365-filtering-correlation-id: a2fd34b3-3835-49db-46fb-08dbaf110878 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: FqVlNeFwUYnyBooaaLpcrOh1kBmGd7z/Hy2bERQLvz4H5vyWWTsJnwge4lU/oXMAQIm2sro+dqKY0U8tEw7sXWuwdRRwFgAi15hYX4jPE3rzYonGSxnbyDSpr/rqgvKvyLAR1g9zqdvi3JXX5NOP/WOhAVDQoaZph+1KtA5RZRvVtBoud3zk12xiY2DBHZvT3Uc69GVFTEM/Qfc7QZRg4wm0acV9K/aeuNFli+/PkXfRYVsKA+7DdIHaEP+/2t8B2DDolg1EKMYSaDHKaKUxFHC58ipgKptHI+kikEkmEtg4lTCssgQkZYMLID39rMtuCwPYXAwwyt7RinGZy3HU58CEb1k0Csf60POJNG57CprgtY5GxXDz4plejWrby6qOvms45aHSujb7Jg28kv+yXzLi5Tgv3G6biR3sQVC6MVC8UEuIqy7TjrFuIjmjTonU9L/KPhFoj9g6W1kv2XUcyfQmukqDZOyO1nReTBfZpIJxkK/4DLI6SKOOrxzQX5vz53JDEhwLRd0o9XMWT4Nkc6ax2Fo5viUXFqEIfXfZxIuyEQLG/C2WZwyDMlH+RRtNLQHtyk/6Yg8pn5qBaGtn1Nt3lxG7GEFiGqMicOD0JyY= 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)(346002)(376002)(39860400002)(366004)(396003)(136003)(186009)(1800799009)(451199024)(71200400001)(6486002)(6506007)(9686003)(478600001)(83380400001)(2906002)(26005)(6916009)(66556008)(64756008)(54906003)(66446008)(786003)(41300700001)(66476007)(316002)(66946007)(91956017)(4326008)(8676002)(5660300002)(8936002)(76116006)(6512007)(38070700005)(86362001)(38100700002)(122000001); DIR:OUT; SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?Q?vTh+n0WxDgRe8R0H/EkQJLzbb4FkcrxqQIsq8mMY3IpjWBZEeOhYMTMWbi?= =?iso-8859-1?Q?z8SC2fvY8VEEZkmmEfLGWFPDqXwtjF8eXBlxjahYycxQf0Y37HmYDNvBPt?= =?iso-8859-1?Q?t99OGJMoIGDayU35UOwIm6ZhOzRzlrhYsosnju5dWArx5TTwQ4oLwrTZPC?= =?iso-8859-1?Q?tcEPjt94I6wPVNwQitc40FzWmWZ10tvKotRZbjhzT509EWuAwmavdPbbIH?= =?iso-8859-1?Q?Jyiyswhz585NUc3Ohyf+LiKmdXw/5BzDngVfAQPo4WGUKNri1GiHLwWPH7?= =?iso-8859-1?Q?H8PzJf7xiV1mC/jsJ96PhQIB8/MdrF6U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-1?Q?DkgqPOvQ6bkSEhiZjiY/A3QTpbZidF+8epowu2zHmtVYCPloFhmhFb8aps?= =?iso-8859-1?Q?Y8vN/TMMQsc1JXTgdDy1r0sVl1we/krGviHvPmQv8z5amNhqBZJqapna8X?= =?iso-8859-1?Q?YObeIDZcGRUGXYcf/kL7eMlMcnjozzEzmGQlilh9B6i/10QCypKecrQpwf?= =?iso-8859-1?Q?yrrNFT6prjcm9Ujq/jZtTxzDI1z054u7KNdWTdJn+0KjRh8gD9cV0vW4Gl?= =?iso-8859-1?Q?q2g11pWNchrXcsejS7ZZ6Ly7dFPFjndQxPfJs9i01E8h8lhwPwDhbSkUaW?= =?iso-8859-1?Q?hud2K/rUQ2E4OJwoSiV0qMniwEf/JYY0cfOy2SbyjZPnb+I8M9BsT+RRQe?= =?iso-8859-1?Q?8R0vX8WPO+TsEZVylYIzVos/Oeq3q9WR6n+a+//nt3445CTiSvEsWuOWNd?= =?iso-8859-1?Q?NJve+OF4lqSGjQKB4x3m1S3MeMBhZZ45AYCPSWTzq/UNdwj+9TFvYZZw?= =?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: a2fd34b3-3835-49db-46fb-08dbaf110878 X-MS-Exchange-CrossTenant-originalarrivaltime: 06 Sep 2023 19:39:49.4326 (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: h9lOMyE+3RWNjhf8qAH6dKW7HE+/PVx5eUNlLNdtEM86DKUx+jLqCrcThJDuA5JwRmtmQ8d15Sw6rvpgQdMVQA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: YQBPR01MB10567 Received-SPF: pass client-ip=40.107.115.98; 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-Queue-Id: 63F4865FE7 X-Migadu-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -11.83 X-Spam-Score: -11.83 X-TUID: +/pwlOCIyN18 On Tue, Sep 05 2023, Ihor Radchenko wrote: > CCing Bastien, as he might want to intervene. > > Leo Butler writes: > > >> +(defcustom org-babel-maxima-command-arguments > >> + "--very-quiet" > > > >> +(defcustom org-babel-maxima-batch/load > >> + "batchload" > >> + > >> +(defcustom org-babel-maxima-graphic-file-format-string > >> + "(set_plot_option ('[gnuplot_term, png]), set_plot_option ('[gnu= plot_out_file, %S]))$" > >> + > >> +(defcustom org-babel-maxima-default-epilogue > >> + "gnuplot_close ()$" > >>> IMHO, in their current state, if a user mindlessly customizes these >>> options without knowing how ob-maxima internals work, ob-maxima may >>> simply be broken. >> >> I think there is a fine line between being too rigid but working within >> a limited scope (as ob-maxima is now), or providing enough customizable >> options to let users do what they want. I would prefer the latter, >> if the defaults provide a working configuration. >> >> Note that I do attempt to suggest other working options in the defcustom >> definitions. > >>> As a general rule, we do not expose internal details that are _required= _ >>> for things to work to users. >> >> I understand this principle, but, why not provide enough options for >> users to configure a package to do what they want? Yes, that may mean >> they break the package--but only temporarily, because returning to the >> default options will return the package to a working state. > > That's a bit more tricky. > Imagine, for example, that we commit > > +(defcustom org-babel-maxima-command-arguments > + "--very-quiet" > > and some users will later customize the default value to > > "--very-quite --my-personal-switch-I-want" > > Then, in future, due to changes in Org or maxima, we might need to > change "--very-quite" to something else in order to keep ob-maxima in > working condition: "--very-quite=3Dyes --another-useful-flag-we-absolutel= y-need-in-org" > > In order to make such a switch, we will have to force all the users > change their customization - something we do not want to annoy users > with. I understand your general argument, but I doubt it is relevant to this particular case. In this specific case, that command-line option `--very-quiet' was introduced in 17 years ago (https://sourceforge.net/p/maxima/mailman/message/11796355/). The syntax has not changed since it was introduced. > > So, leaving essential settings customizeable is not necessarily a good id= ea. I understand your hesitation about full-blown customization using `defcustom'. However, I would still like to have more dials to turn. Perhaps we could add header arguments to get the desired customization? E.g. - :batch :: Control how the Maxima source is evaluated by Maxima. 1. Default. If nil or no, then use batchload with the --very-quiet command-line flag. 2. If t or yes, then use batch with the --quiet command-line flag; - :plot-engine :: Set the plotting package. 1. Default. If nil or no, the use `plot'; 2. If `draw', then use `draw'. - Similarly, we could do something like ob-R.el does, and construct the graphics instructions using some additional header arguments and grovelling the terminal from the filename (see org-babel-R-construct-graphics-device-call). My sense is that this would be more in keeping with how other ob-*.el packages do things. Best, Leo=