From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id 2PgpFAitj2GFBQEAgWs5BA (envelope-from ) for ; Sat, 13 Nov 2021 13:18:16 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 4J3MDwitj2FDNAAAbx9fmQ (envelope-from ) for ; Sat, 13 Nov 2021 12:18:16 +0000 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 5E3A82B188 for ; Sat, 13 Nov 2021 13:18:15 +0100 (CET) Received: from localhost ([::1]:57908 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mlrz1-0001W1-HG for larch@yhetil.org; Sat, 13 Nov 2021 07:18:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49062) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlryY-0001Ve-9u for emacs-orgmode@gnu.org; Sat, 13 Nov 2021 07:17:42 -0500 Received: from ciao.gmane.io ([116.202.254.214]:33580) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mlryW-0002vE-Ol for emacs-orgmode@gnu.org; Sat, 13 Nov 2021 07:17:41 -0500 Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1mlryU-0003lB-Ea for emacs-orgmode@gnu.org; Sat, 13 Nov 2021 13:17:38 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: emacs-orgmode@gnu.org From: Max Nikulin Subject: Re: execute src block during export (Re: Worg HTML export problem?) Date: Sat, 13 Nov 2021 19:17:23 +0700 Message-ID: References: <87r1brk2j2.fsf@tsdye.online> <87mtmbk8kq.fsf@tsdye.online> <87lf1uk3m3.fsf@tsdye.online> <87fss1jott.fsf@tsdye.online> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 In-Reply-To: <87fss1jott.fsf@tsdye.online> Content-Language: en-US Received-SPF: pass client-ip=116.202.254.214; envelope-from=geo-emacs-orgmode@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 10 X-Spam_score: 1.0 X-Spam_bar: + X-Spam_report: (1.0 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, NICE_REPLY_A=-1.852, NML_ADSP_CUSTOM_MED=0.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636805896; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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; bh=Me98d2OGQF3EaCRRwzMPaqX27SNHKiSB7OqLA2kO5bw=; b=GKHB3q9Dw28hCAQMtUYnHAOtK5jtD830bZqr2GnahJPb1UVxJjCFrDAnoZ8d5f2SvDvjfM RLGSdmFlcRA9d/Ob4PAQU8oIkINAYgLzKcJ1yt0dufB1ZtNjPn0lASf/wbQlzEOqrMGAJW iycgWNOUVgoz0D3htkVvwartpqVr6rIh4tI+mAw8WPK9/BEL6pAkXv7OQiDJ9U1aYhQRH2 qW7c17O8OCM7pFGxHgSqhPiVf0nMt3MKQFkBfGW4euYwfw/T8uljF1WvFUEYLcLJQTd6sv Hxk6tJ1OWnrMf+uUP8WIegKA4rQvvIRu2mORU3xGzxhwjD03QVbXlWmW0ipEzA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636805896; a=rsa-sha256; cv=none; b=jn0OhI/enP26DqGAbD4+fO4wMAW+nuxN9igAa1TU0Bf45vTUgAKeHlqHOOJWKq6p+PyeEl wIHVFjwcLak6nHTiCNnxCDWLvCIBUUcHGv7wKnoQ7gf1K8DPPZ5QgV/CQMKN2hwK4/HYC8 DMKbujPjW/2vCsnRC9mDacbv5kBfWiPN8hxh4I3y/nasrQEXpDo+4zzx1LELQ2zWCRK/dl zVqYxl4G1s7ZaVfWiXCm+o/WtFE7ArMF/7V05XS6SGqsgDXPzQVZd2SUPGyEu+Lt+BInFX twcqwDHEN4p0l3sjFD0fR9SJhntSlnzeg2bkg//hwrHJ5k+vxipIw7s7hJn58g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; 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.33 Authentication-Results: aspmx1.migadu.com; dkim=none; 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: 5E3A82B188 X-Spam-Score: -2.33 X-Migadu-Scanner: scn0.migadu.com X-TUID: teaACs5KpHoF On 12/11/2021 23:55, Thomas S. Dye wrote: > Max Nikulin writes: > >> On 12/11/2021 00:24, Thomas S. Dye wrote: >>> The original problem is likely due to the default header arguments in >>> ob-org.el, which are unusual. >> >> It is great that the problem is solved. I do not think however that >> something >> inside ob-org.el may affect processing of a file before this package >> is loaded. >> >>> If I export both, then all is well. >>> #+begin_src emacs-lisp :results value none :exports both >>>   (org-babel-do-load-languages >>>    'org-babel-load-languages >>>    '((org . t))) >>> #+end_src >> >> I feel that I have missed something. I do not see the purpose to >> include this >> source block in user docs. I expect that for accidental usage it is more >> convenient to type (require 'ob-org), while as a permanent settings it is >> possible to do customize-variable org-babel-load-languages or to use >> `add-to-list'. > > The source block is included to show the user how to modify their .emacs. My ~/.emacs.d/init.el has (among other variables) (custom-set-variables '(org-babel-load-languages (quote ((emacs-lisp . t) (C . t) (python . t)))) ;; ... ) I consider it better since it does not force immediate loading of Org if emacs is launched for a file of different type. Before sending the previous message I forgot to check Org manual. It recommends `org-babel-do-load-language' and it looks more prominent than customizing of the variable, however a more concise example is given a bit below (require 'ob-closure) Additional feature of `org-babel-do-load-language' is that the function can "unload" some languages, however it is not the case for initialization. That is why I disputed recommending more complicated example with `org-babel-do-load-language'. It is matter of taste however even if current example has no less obvious advantages. > I was surprised that changing its :results header argument had an effect > on export. > > Do you have an explanation why the header argument makes this difference > on Worg? Worg build procedure is more close to defaults. Earlier I wrote that the issue can be reproduced locally using "emacs -Q". Actually it is reasonable that without explicit request, source blocks are not executed during export. `org-babel-default-header-args' has (:exports . "code"), so it is necessary to override default value to execute the source block loading ob-org. I was confused that build log contains a message related to evaluating of some code ob-doc-sql.org without explicit overriding of :exports. Likely it is caused by noweb option.