From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id ABf4GHn5FWPABQAAbAwnHQ (envelope-from ) for ; Mon, 05 Sep 2022 15:28:25 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mFf3GHn5FWNVEAAAauVa8A (envelope-from ) for ; Mon, 05 Sep 2022 15:28:25 +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 E415F29EEA for ; Mon, 5 Sep 2022 15:28:24 +0200 (CEST) Received: from localhost ([::1]:55224 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oVC9H-0002IN-Nw for larch@yhetil.org; Mon, 05 Sep 2022 09:28:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46280) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oVC0d-0001eM-4C for emacs-orgmode@gnu.org; Mon, 05 Sep 2022 09:19:28 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:40818) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oVC0W-0005gD-3g for emacs-orgmode@gnu.org; Mon, 05 Sep 2022 09:19:26 -0400 Received: by mail-pl1-x62c.google.com with SMTP id x23so8515050pll.7 for ; Mon, 05 Sep 2022 06:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date; bh=00FyAQZHvGJAGBTdwP7eJZyEWyxF58U8/dk124R3ORI=; b=py+XGlJt+cPNhJ8CV8ToKVSPM3FMZXVDbfS5ZPl0U2iK+XwfhcC0G5BiaRhUPp3lL0 tkdbKtdbuNtje0xZVbMXG43qVZfw9kqo9rZ80vv4kB85Ya3zlvTCJKy1d7ZAhVGv/VvW 9G+TP6nC1xgl+KkEwINuKUlIpQwQQAHBRnw0R98Z9/KG35595h2OdKuOaoteIpEf6e6g WlG5PuCelzL1059s1mOGvyRbNKWqqnCdXCG0JWr6gwxJa2ABxwnNx5R/ux3jnfJi9tK+ 1g/0JgZJ5iZV2QkbdmlfWo57qHGzXO/b/fnHL+0+Y2wt6toA1HJGBgEHkjG5kOuwSfmG RFjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=00FyAQZHvGJAGBTdwP7eJZyEWyxF58U8/dk124R3ORI=; b=XcWWVcQAdi1IrZCMYBUekH0rLYoA/yWY9NTdZNSCEW8FLVSxtlQZGr/e++KFnWPx5b 5HxhBbnO+8YKvVKX55WbLSHeRtlRQ0gr8f/cZk/5GEmxjQsiEIZ58+1Y1MTD52ozjfYT c1OA8EgLHs2zuVlWEUqIjLFehQQbXy8X3vmTdxiwlGcaN8v1xcX39+7/Vru+gRuQRxTv wrGP3E4Uy9cvFOdgSg3K8dLCSktqTBvOs6Em0SLxzUwOgNhVhKJJmeNg4RUPvbBDRVJq 7Amee7XGwnUkuNIye7iK83kTCwzDKZeqk51vZb0o3wWvJqHbO137wGhme887OCWJsn6B 8GZQ== X-Gm-Message-State: ACgBeo1P4DsGEzY29ccCL9mr41nTrye6awUk8KjmK2DF6yB26MTzxlCr 7kf5ps23QfbIc6yGtyQR7KK6KXYAitY= X-Google-Smtp-Source: AA6agR7/orFkBRReEAtdE+5i9A5qFP8ctP+rScwVToeQNNiUmSR+aIz773oHntF0cHWs6+3wQxnuJA== X-Received: by 2002:a17:902:d481:b0:175:168a:79bf with SMTP id c1-20020a170902d48100b00175168a79bfmr30588954plg.33.1662383957395; Mon, 05 Sep 2022 06:19:17 -0700 (PDT) Received: from dingbat (2001-44b8-31f2-bb00-842a-7361-87c7-2662.static.ipv6.internode.on.net. [2001:44b8:31f2:bb00:842a:7361:87c7:2662]) by smtp.gmail.com with ESMTPSA id a9-20020a62d409000000b005387bf85ea0sm7688587pfh.128.2022.09.05.06.19.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 06:19:16 -0700 (PDT) References: <86fsh61a3u.fsf@gmail.com> <877d2ivxpa.fsf@localhost> User-agent: mu4e 1.9.0; emacs 29.0.50 From: Tim Cross To: Ihor Radchenko Cc: Org-mode Subject: Re: org-babel-load-languages usability issue Date: Mon, 05 Sep 2022 23:11:28 +1000 In-reply-to: <877d2ivxpa.fsf@localhost> Message-ID: <86bkru0xim.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=theophilusx@gmail.com; helo=mail-pl1-x62c.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, T_SCC_BODY_TEXT_LINE=-0.01 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1662384505; 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=00FyAQZHvGJAGBTdwP7eJZyEWyxF58U8/dk124R3ORI=; b=uuuLwBFRpOn53uP2YX4zroPSpu+sXAOT9QtA6W0pJ4a/2sxMLHVs0ncvMrL57K4cxJIdj3 Qd+IWN1UoK5tnVKrbv9n9c0vdyRMZWz+lUL7vRp6pbAXCwZiweQBgd2hdZBUwsur0sPm45 S6qJNJDcuxEOR78MHm1pxJYtdY11ODoaDwXS6AZeDjXvLRKxV6n0OWau50OAkTcFA/IwAq RDKDySZK+RCxjPmgLEpnT0EmW6sllb/CYDlkJKDtJV38UYAAbYltovpJFhs+o0vO7nAyWz YNGK/W+c7tbM8rIYLpMP6On8uVw+rEkdcfoOSGM6V7z/UYDvsdvaF6i13oNxkw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662384505; a=rsa-sha256; cv=none; b=uaTkDnklCp4AUSPA/fDuLz8taGvzvU7Cc7ag5HYB5iAdBeO54apufUr809oPQSQFFaNqAu vUcGHfVrIVw2V+9GtuB72/llNZT5u7YvZYOFkro+5Zl4QHWbmRsJPD3AC3obYta4QSbVJU YrHYYsPiZrsonJyPEtzouht70qRSKhk9gwG4OG/UUQvvB3fWVPsrTWHDklo/GtUo7KSs0c BUD09hyr7GgReCI2fbLHNa05xrsbnhkBFU97MyezSKmJuAtgE9sRtxDRn06Dbmsxpx3d37 2/EKJeTGfKKUXZYOhvodYj/ldofqMwYk4fUGfudjcgcfF5KmJZTlFheFaldS7w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=py+XGlJt; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Spam-Score: -2.27 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=py+XGlJt; dmarc=pass (policy=none) header.from=gmail.com; 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" X-Migadu-Queue-Id: E415F29EEA X-Spam-Score: -2.27 X-Migadu-Scanner: scn1.migadu.com X-TUID: pIOK3TWsJkSk Ihor Radchenko writes: > Tim Cross writes: > >> I'm not sure when the definition of the variable >> org-babel-load-languages changed, but I think we may need to consider >> either reverting it or making some other adjustment. >> >> Originally, this variable was an alist of languages and a boolean >> indicating whether the language should be loaded e.g. >> >> '((emacs-lisp . t) >> (clojure . t) >> (sql . nil)) >> >> which would load emacs-lisp and clojure, but not sql. However, the >> default value for the variable now appears to just be >> >> '((emacs-lisp . t)) > > Are you sure? '((emacs-lisp . t)) is the default value in the commit > that introduced this variable 12 years ago: > No, not sure at all. It was a long time ago that I last needed to look at it (I only noticed this now as I'm re-doing my org config as a lot has changed since much of it was first coded/configured. > 6e469f4afba4bf7d6e8983d1e4f3e981252f8f60 > Author: Eric Schulte > AuthorDate: Fri Jul 2 11:32:38 2010 -0700 > babel: `org-babel-load-languages' activates code blocks by language > >> This has two consequences. The first is that the doc string for the >> variable is now incorrect. It states in part >> >> "This list can be used to load support for any of the languages >> below. " > > Well. There are actually languages below if you look into the source > code. Indeed, it is confusing in the help/customize buffer. We can fix > this, say, by adding the language list into the docstring itself. Though > it will not cover third-party ob-*.el modules. Maybe only add/list those languages 'bundled' with Emacs or perhaps just add a link to the worg page listing all the supported languages. I'm reluctant to add the list to the doc string as it will make it even longer and there will always be the issue of it not being current as languages are added/removed (I find doc string drift out more than code, where people tend to update/fix code more readily). > >> There are no languages listed below. This also leads to the >> next issue. How does a user know what languages are supported and can be >> enabled? Previously, you had a list of all the supported built-in languages - >> most of which would be disabled (nil) by default. However, this did make >> it easy to know what languages are supported - you could use customize >> to change the flag from nil to t (or copy the default into your init >> file and modify appropriately. Now it doesn't seem to be as clear. > > The (incomplete) list is actually available in cutomize interface. Of > course, we can still improve the docstring. > >> Note also that the doc string refers to the variable as a list, when it >> is actually an alist (association list). This could be confusing, >> especially for new users. The doc string probably should describe the >> format more precisely i.e the CAR of each con cell making up the >> alist is a language syumbol e.g. emacs-lisp and the CDR is a boolean >> that will be 't if the language is to be loaded or nil otherwise. . > > Agreed. > >> Should the default value for this variable be a list of all the >> supported babel languages which are bundled with emacs, all of which set to 'nil' to disable them >> except emacs-lisp (to maintain existing semantics, though I do wonder if >> we should also enable eshell given we enable emacs-lisp by default >> because all necessary dependencies are provided by emacs, as is the case >> with eshell)? > > The primary goal of this variable is reducing startup time. Loading all > the 44 built-in babel backends would be slow. Would it load them if the default values for all the languages which have bundleed modes in Emacs were set to nil rather than t? I guess the issue isn't as bad if you do get the list of available languages when you use the customize interface (I should have checked that). I never use customise and I know lots of other Emacs users don't either. Maybe just fixing up the doc string would be sufficient?