emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Ihor Radchenko <yantar92@posteo.net>
To: Leo Butler <Leo.Butler@umanitoba.ca>, Bastien <bzg@gnu.org>
Cc: Lockywolf <for_org-bugs_2023-09-01@lockywolf.net>,
	"emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: [MAINTENANCE] On how much we can expose internals into defcustom (was: [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: Tue, 05 Sep 2023 10:57:27 +0000	[thread overview]
Message-ID: <87il8ovqeg.fsf@localhost> (raw)
In-Reply-To: <87wmx8h2b0.fsf@t14.reltub.ca>

CCing Bastien, as he might want to intervene.

Leo Butler <Leo.Butler@umanitoba.ca> 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 ('[gnuplot_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=yes --another-useful-flag-we-absolutely-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.

So, leaving essential settings customizeable is not necessarily a good idea.

This is not necessarily a rigid rule though - we do leave, for example,
`org-latex-engraved-preamble' exposed to the users in ways that can
break LaTeX src block export. The basic condition is that changing
something should be practically useful for users, which is why I asked
you to elaborate on why each of the new customizations need to be
introduced.

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>


  reply	other threads:[~2023-09-05 10:57 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01  4:35 [BUG] Consider replacing bachload with batch in ob-maxima. [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)] Lockywolf
2023-09-01 18:33 ` Leo Butler
2023-09-02  7:19   ` Ihor Radchenko
2023-09-02 18:12     ` Leo Butler
2023-09-05 10:57       ` Ihor Radchenko [this message]
2023-09-06 19:39         ` [MAINTENANCE] On how much we can expose internals into defcustom Leo Butler
2023-09-07 11:35           ` Ihor Radchenko
2023-09-12 21:09             ` [PATCH] ob-maxima.el, etc. (was Re: [MAINTENANCE] On how much we can expose internals into defcustom) Leo Butler
2023-09-15  9:41               ` Ihor Radchenko
2023-09-15 15:13                 ` Leo Butler
2023-09-16  9:04                   ` Ihor Radchenko
2023-09-19 19:25                     ` Leo Butler
2023-09-20  9:17                       ` Ihor Radchenko
2023-09-20 15:02                         ` Leo Butler
2023-09-21  9:18                           ` Ihor Radchenko
2023-09-21 14:03                             ` Leo Butler
2023-09-22  9:43                               ` Ihor Radchenko
2023-10-02 16:01                                 ` Leo Butler
2023-10-04  8:38                                   ` Ihor Radchenko
2023-10-04 13:07                                     ` Leo Butler
2023-09-02  7:06 ` [BUG] Consider replacing bachload with batch in ob-maxima. [9.6.6 (release_9.6.6 @ /usr/share/emacs/30.0.50/lisp/org/)] Ihor Radchenko
2023-09-02 18:20   ` Leo Butler
2023-09-03  5:25     ` Vladimir Nikishkin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87il8ovqeg.fsf@localhost \
    --to=yantar92@posteo.net \
    --cc=Leo.Butler@umanitoba.ca \
    --cc=bzg@gnu.org \
    --cc=emacs-orgmode@gnu.org \
    --cc=for_org-bugs_2023-09-01@lockywolf.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).