From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.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 0PgQCN3oGGMFdAEAbAwnHQ (envelope-from ) for ; Wed, 07 Sep 2022 20:54:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id eM88CN3oGGOo6AAA9RJhRA (envelope-from ) for ; Wed, 07 Sep 2022 20:54:21 +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 B924112E77 for ; Wed, 7 Sep 2022 20:54:20 +0200 (CEST) Received: from localhost ([::1]:35854 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oW0Bn-00089L-Tl for larch@yhetil.org; Wed, 07 Sep 2022 14:54:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41516) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oW0Ah-0007jc-AP for emacs-orgmode@gnu.org; Wed, 07 Sep 2022 14:53:11 -0400 Received: from mail-pl1-x633.google.com ([2607:f8b0:4864:20::633]:36733) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oW0Ab-00007y-UK for emacs-orgmode@gnu.org; Wed, 07 Sep 2022 14:53:10 -0400 Received: by mail-pl1-x633.google.com with SMTP id c2so15505073plo.3 for ; Wed, 07 Sep 2022 11:52:42 -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=or34lE0EDN8boX1bGrLQ2DhfT/Quk2f5VAH6FRLMDS0=; b=XdDbI1t8RvUmtGNQp4PVYES3lNze17DWPWIZkgOn5xoXSwZlKgPQjNRnvGxWxwq3ST hZ3YhSyIkOAoYHMsF1IKbneqYIYKuuQ3ipiyuMtY1kc9OO9gNl0XcX/5OA9qiFwTJJRa cYNa7a3ZaYoMYNQHXml/Xln63EyZS29aXqrQFq0Sj68olF4k51DnBUUPL4wOx+qdj9x7 1yDdXPMhnuGLaA1i2qg3eS0tY+WZ80CzWs6xoMioyGZh1eviEeSe+zkDLDebQVAPiiFU 9bipblRsip6EkBO4T6DW5A4cJVasLpvxX4m8+Lx13iUYOnyBE5EQXf5E3tuQdyyRYYoX etXQ== 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=or34lE0EDN8boX1bGrLQ2DhfT/Quk2f5VAH6FRLMDS0=; b=GWjpok4ygGByFQ6KFJzbiamtoIjOBjq9yG6SKtn4XzMClaCibMg24cmbpL2F2ATX9c n5PPRlJ2sh7kwpqa3r2Nn1/VrB6DX+yaijM2L8tRWPs7LkTRsjJrxOMIWW4LSsABUcah asl12ZL8E65F5QwLbFMHG2XVIJTuc0hYH12kH2Oyn4vc/s4oXE00TZfK2KDWjg+2eFcw fbhRfBM9lvGIiUe2c9hUmHVzJ3rGm0Z+ypHZC8MhhEP8owwjS0XOG7DlTTM+TtvAZEgd IjKCrodCxJoihN0y8J6L4AkXPLV/bIr9nkBYLPUBf0respAvgWGZB5K77tizm1pe2Y0c XNOw== X-Gm-Message-State: ACgBeo12Qs4pfq/ZWAvPT/GUhhBG9JXy3OMbbw1XX9BNwIxmFAVxAZ3j Nv1XrEYl5e9UuSq8eRJQ5koH2xU9GJ0= X-Google-Smtp-Source: AA6agR5MBh+fri9dU3KMvU2edjnmSRCVJAClD602qU8foMM3lLMtSJszd2eERbNt9Q6dU4juw/Piiw== X-Received: by 2002:a17:902:ab98:b0:171:2cbc:3d17 with SMTP id f24-20020a170902ab9800b001712cbc3d17mr5197771plr.143.1662576761404; Wed, 07 Sep 2022 11:52:41 -0700 (PDT) Received: from dingbat (124-169-25-226.dyn.iinet.net.au. [124.169.25.226]) by smtp.gmail.com with ESMTPSA id y15-20020a63de4f000000b00434feb1841dsm1157278pgi.66.2022.09.07.11.52.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 07 Sep 2022 11:52:41 -0700 (PDT) References: <86fsh61a3u.fsf@gmail.com> <877d2ivxpa.fsf@localhost> <86bkru0xim.fsf@gmail.com> <87illzaj8t.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: Thu, 08 Sep 2022 04:38:37 +1000 In-reply-to: <87illzaj8t.fsf@localhost> Message-ID: <8635d3nhjf.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::633; envelope-from=theophilusx@gmail.com; helo=mail-pl1-x633.google.com X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=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=no 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=1662576860; 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=or34lE0EDN8boX1bGrLQ2DhfT/Quk2f5VAH6FRLMDS0=; b=Fpiqv37kS1xd36+04lfkaOurxGcmG+w8+P2brL4Qz4RDSvqGzX7Nuu7LU9wjoEMQ1IXsIq gGh8BhOH2G++J/sDY5tnHyvNPgQUUNQGdmxTMJhQb1rWaPyY8pizop40M2Uv5UsgRjEC9V Anxj4dBj1DFA2EA0Q1J6mX9FcC+9umE5M+DGHMQTLjX9+Y9FKeY4INYk+98G/DUSjOLdhx /qK7WL2ITNdQ715+01DaSRZStRPtXW9Uah4Wp0JPsUMgkRk7A7rz99O0CWr6YM7L8RVpg9 2zoMfh28qKshq7aDp2VLNL+a6CWuVhHpUmp6zRhvhJi0+x7CRHrvQ8KGeT5lbg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1662576860; a=rsa-sha256; cv=none; b=BgbBNN4F5U/7zgCA2sFhB+RfrMrMoXMJ4NEwu9ut0d58BNWYi8xfRtDj95UItbdsLG2XC2 blBeBrUgLMMZzRLSqma8yIbxkH4BMtlMlNvqTUyMyZ0SHnbCGMzFnddxTfzRhjdD2b7B2w 90UBjpW+iSoCQvTg9nSCAg8jdTRLfd0pSI9+uV0lCbH3sytBpKim18HaX/BwjSrRYdUP8A IF19/KmCOqLljfJhtS2SNcf4AgxbaEHtcD0YVfmAe/+0kiWgYoCiQ2DYVcoSKWFE2NxFO3 550Tm4LnCHK+kzvlQjdKGvRk/lLIw4RUZFjCnF7NdJkYIaCnftuadgbGxQVgEQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XdDbI1t8; 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: -3.78 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=XdDbI1t8; 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: B924112E77 X-Spam-Score: -3.78 X-Migadu-Scanner: scn1.migadu.com X-TUID: snfgcvvfXIhc Ihor Radchenko writes: > Tim Cross writes: > >>> 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). > > We have [[info:org#Languages]] linking to > https://orgmode.org/worg/org-contrib/babel/languages/index.html > I guess we can simply add the manual link to the docstring. Would it be > sufficient? > Yes, I think so. That was what I was thinking would be reasonable and would avoid maintenance issues for the doc string when languages are added/removed. >>> 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 am not sure if it is a good idea. > I am now looking at the usage of org-babel-load-languages in the code, > and I am seeing `org-lint-wrong-header-argument', > `org-babel-demarcate-block' ignoring difference between (lang . nil) and > (lang .t). OK, so if I understand you correctly, not all of org code honours the enabled/disabled setting so adding all bundled languages, but setting them to nil, would result in unexpected or additional processing for those languages despite them being disabled? If that is the case, you right and adding them would be problematic. However, I would also argue this is probably a bug. Essentially, it means that the value associated with the language symbol key is sometimes interpreted and sometimes ignored. I think this is an inconsistency which can potentially cause confusion and could contribute to subtle bugs. One thing I do wonder though wrt the two examples you cited. Could this be deliberate/intentional for these functions? I wondering about the scenario where you want to include blocks for a certain language, but you do not need to evaluate them, so no need for babel support. Might this be a case where you would set the language to nil, but be fine with lint and other checks verifying the block structure? Provided this isn't also resulting in loading of language specific babel code, it may not be an issue?