From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id +BrpJlHWQ2SPTgAASxT56A (envelope-from ) for ; Sat, 22 Apr 2023 14:42:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 0BvpJVHWQ2QJbAAAG6o9tA (envelope-from ) for ; Sat, 22 Apr 2023 14:42:57 +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 53092A50B for ; Sat, 22 Apr 2023 14:42:57 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pqCZd-0003WV-JR; Sat, 22 Apr 2023 08:42:41 -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 1pqCZY-0003Ug-US for emacs-orgmode@gnu.org; Sat, 22 Apr 2023 08:42:39 -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 1pqCZW-0008Gk-T8 for emacs-orgmode@gnu.org; Sat, 22 Apr 2023 08:42:36 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id C9A1A240229 for ; Sat, 22 Apr 2023 14:42:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1682167352; bh=i5Jq1YVh4YRF+TFh4FXyBroy3Kb/5F8gwG4V8d7r0d4=; h=From:To:Cc:Subject:Date:From; b=YpczrRCaUi/RC1Ivrjta2RWTT6vUvmnUzTCM5PNVWUho3lJO8yum/zr5R6xGH3wl/ 787tQ7A4z6k6xWC4BVmxc925zoqrKaTgXvXhzdicq55ofa8FhB21jEXH6M4Jw77pBu 6thEWaDWmaVLG5BLmomZuklYpN2NC7np0HXWvJFn4XIZQRK6kms+ClExebWdR+822J ZC1NLnBHtAn8ZgNHv7+h/mr3ZRw9y4km1pm9r3/Wc1dCGiMwygpLJTi6gCjHnlCIV9 /CBP68KodwxB0MfPrnN9iw+UHXjote7tdJeuW0s4lKjtVIliDcyspaa4QIRW0PAOi/ e5rABYpDN46YA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4Q3WJ828WLz6txK; Sat, 22 Apr 2023 14:42:32 +0200 (CEST) From: Ihor Radchenko To: lin Sun Cc: "emacs-orgmode@gnu.org" , Timothy , Bastien Guerry Subject: Re: [PATCH] before emit an error message, try to load the babel language In-Reply-To: References: <388850760.3644614.1634354740816.ref@mail.yahoo.com> <388850760.3644614.1634354740816@mail.yahoo.com> <87k0h5gbad.fsf@gmail.com> <1410400175.3014347.1637221629433@mail.yahoo.com> <147485378.6546620.1638236479358@mail.yahoo.com> <87czmiqnmh.fsf@gmail.com> <115088871.6596146.1638252307206@mail.yahoo.com> <877d5sszc2.fsf@localhost> Date: Sat, 22 Apr 2023 12:45:13 +0000 Message-ID: <87354suluu.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_H2=-0.001, 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682167377; a=rsa-sha256; cv=none; b=PuihStYB8eXapYIF8ZFmcqEAo67Mo2w80zwfIx/DPun/suG06F/B5v10xUZ+6nYNGblbiv eZTQkzzp89wVUScLOEpkgQCTArhu5Qn1Yidv3ddTbKACQOYgxur4zPgj1IgHqDcnyYz3OX jvlZYds2xvaWIRwZQpN0UNmydzFKJDTlPM4fTIGhU3gnILYtR/wpx1DFWZoXq8NHZexOfm ct+P18Wv5bOzWnFd3WqhNYVkO4kYaRV7yIWi5OPplF0yKHTBM1LPVKXFlZD6oXoJQ1K0Cz sp/A71kixJiI7C1f/rQqCaIjidBeQKD4L44NQaexq0vh59RioroNMsAQh/S1iw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=YpczrRCa; 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=1682167377; 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=TDyVBnwdkGoJ/2oOx8LNw475rpXxmukpVGVzLiopw8w=; b=tGJ627TtgF3/fD0qKiBTYCR+JPGmrPp9T+wCHl6FrvYrbQX5ObVvcSqe2KGvq/9SUgH3fw /ypxMgeYBksk80XCmdKwN1mep+GW655zEVgrcsOyzq/AP1Dbf0DiGi/I3QrFA4mej2inKJ M9MemdduxISuiVnx8SwGGCjvU3FIgswnjz4bkgSTGVQ0KSnviK9GBsIygIMnHXAWwxtktY C4z4RRSpQhkUceTYV39vOJpztxMCnWzi5I728CHPNkBS/gd3dfoxLKWHUtHtELE19Euofg l/myj88PSbTaSfSLAcR5PxQPyB3uhf7kMBjqVcpFMoeDoEiacpwQcGOAnGiRjg== X-Migadu-Spam-Score: -5.90 X-Spam-Score: -5.90 X-Migadu-Queue-Id: 53092A50B X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=YpczrRCa; 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" X-TUID: 5DunB5GIRqDy lin Sun writes: > Before the error message, the patch will give a try to load the > associated babel language. > > Why does the language exist in the `lang org-babel-load-languages' but > not be loaded? > Because the `org-babel-load-languages' are defined as a customer > variable with :set 'org-babel-do-load-languages, the ":set" function > can only be triggered with function `custom-set-variables`. > While setq/cl-pushnew `org-babel-load-languages' won't trigger the > `:set' function, then the error message will be displayed if I run the > code in the org file. If we want to solve the problem of setting `org-babel-load-languages' outside `defcustom', we should also consider unloading and other places that use `fboundp' to check if babel backend is loaded. IMHO, the cleanest way will be using `add-variable-watcher'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at