From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0A3aGqXuJ2XkqQAA9RJhRA:P1 (envelope-from ) for ; Thu, 12 Oct 2023 15:03:33 +0200 Received: from aspmx1.migadu.com ([2001:41d0:306:2d92::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 0A3aGqXuJ2XkqQAA9RJhRA (envelope-from ) for ; Thu, 12 Oct 2023 15:03:33 +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 2DF68416AE for ; Thu, 12 Oct 2023 15:03:33 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gmyK55ec; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697115813; 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=Aicmr79h5i1OdnkUl45yanHnjNAD8KqztzNFKffh5f8=; b=otQEqrE/VMrMylKkGcQU5efn6udx/R3z6uWqOk1xOJ+vXSr9QGvM4WBti7oOg4A8yQTF6J rV2H3HioHINlfottknMQfWuobKF/NiIZinlJBrHax2e5MZKSHXbdFKCzlGCQE6rt7CvlmE aCEFXM+4JkZ7ZZ9HsTElaMv6wRUQpzUrLHb3vPY1oqK4ZzgWd1nqvUp2xDvYO1YZdkh3ZO NK1LJBClCxR5UQT9/mRt+O5OmuHMnhV8vrjIwKVs0JkFt0pEMts+GlxAxJas0hKBcyxHcq fPlUXAtpukQytorI1/gNZMBPKfVHPRvy5sfdWoS+S7Et4Dh/mwb2iAxCBNDxyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=gmyK55ec; 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"; dmarc=pass (policy=none) header.from=posteo.net ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697115813; a=rsa-sha256; cv=none; b=EkuJh3VVqUWVe9kc1aVKo5hIfvaDVcR++UO1OOCOHq1oLPAOcWfZhNdNhdH+gBm+HF6neU +KwybOJXR1J4yFG8PkQSCQ3Xtc7hzPdqaIt5oUdKvCZgpe4W8mnVPVA+xmzhpibGAKV8SE Bilm7cyLNMCAZXCp666mpez3rFGNNVuLF9KkIprpl0C54Hp8pn13QM+Oytj0mgDPd90N4A B7m9oYsPVe+5585IooGhL64yrSD1Or/ikZIrYvbl4eKdj6SjtuSsHunzYDpH5qEb7pruSS FYTsm07curWkbjxXUuyypADNiND2ea5IrK8UNEwRN5sgsXBk/wgahnsnJFNI/Q== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqvKl-0008Fn-HH; Thu, 12 Oct 2023 09:02:35 -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 1qqvKi-0008Eh-Oz for emacs-orgmode@gnu.org; Thu, 12 Oct 2023 09:02:33 -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 1qqvKg-00049s-OC for emacs-orgmode@gnu.org; Thu, 12 Oct 2023 09:02:32 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 26197240104 for ; Thu, 12 Oct 2023 15:02:28 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1697115748; bh=u6/ifStPsZSata+PvfklS+/oTjKP4KgfkHEXX2nZiIw=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:From; b=gmyK55ecYGHczBPPFIYlxVlUsb2EvySprcpH6t2baeQXHd0fKFNk0iJK8WFJz/i3g hAvHpZuBOL0uzSimSkF97ENy+FVfF8yH1Taw8cNOJh4udyNsScTeiwHexBr+qtJclt nRzUNB7Rp3voFiFHolwZgpgKN4EsA06cHkq10O41LacvquYychBZaHNPGA1Jwghx6S 5e3tOAUYySbcmNWqoX0TsR3TK14Oq0TRwf0IjfWYSBPtYnHDqJxeUDZsUrcwRtGmgw iLGE6w+Qe7H0i0WtbSahqdRHEoVjRq+qGZXS4z6ebKVBeDMlwjUvegf9OxzSrKrgnm vQwsb39dBRNWw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4S5qYH5K22z6tx5; Thu, 12 Oct 2023 15:02:27 +0200 (CEST) From: Ihor Radchenko To: Andrea Cc: emacs-orgmode@gnu.org Subject: Re: [BUG] org-babel-tangle may fail due to (org-babel-tangle-collect-blocks lang-re tangle-file) [9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)] In-Reply-To: References: Date: Thu, 12 Oct 2023 13:04:15 +0000 Message-ID: <87edi0c7qo.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_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 X-Migadu-Spam-Score: -9.12 X-Spam-Score: -9.12 X-Migadu-Queue-Id: 2DF68416AE X-Migadu-Scanner: mx2.migadu.com X-TUID: VpKE5LUTLnwY Andrea writes: > .... > Sometimes I get an error on org-babel-load-file saying that > org-babel-tangle-collect-blocks was called with target-file set to nil. May it be possible to provide more details about the error you are seeing? You can set `debug-on-error' to t and post the backtrace, which will give more details. Or, better, provide a reproducer. See https://orgmode.org/manual/Feedback.html#Feedback > Since that seems an effective but senseless action, I just looked into it and there is > something weird in the code of org-babel-tangle: > > Given the header of the function: > > (defun org-babel-tangle (&optional arg target-file lang-re) > > and the docstring section > > "Optional argument TARGET-FILE can be used to specify a default export > file for all source blocks. " > > I think this let binding in org-babel-tangle is weird and the cause of my error: > > (tangle-file > (when (equal arg '(16)) > (or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info 'no-eval)))) > (user-error "Point is not in a source code block")))) > > Shouldn't that be: > > (tangle-file > (or > (when (equal arg '(16)) > (or (cdr (assq :tangle (nth 2 (org-babel-get-src-block-info 'no-eval)))) > (user-error "Point is not in a source code > block"))) > target-file ;; the target file which was passed as input of org-babel-tangle > )) No, tangle-file being nil should not be a problem. > Any chance I found a bug? Likely, but not necessarily in `org-babel-tangle'. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at