From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2JlIDpbZJ2VHoAAAG6o9tA:P1 (envelope-from ) for ; Thu, 12 Oct 2023 13:33:42 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4789::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id 2JlIDpbZJ2VHoAAAG6o9tA (envelope-from ) for ; Thu, 12 Oct 2023 13:33:42 +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 CB6133D8F8 for ; Thu, 12 Oct 2023 13:33:41 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=hotmail.com header.s=selector1 header.b=gZhwY1i8; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.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" ARC-Seal: i=2; s=key1; d=yhetil.org; t=1697110421; a=rsa-sha256; cv=pass; b=lAfGBLh0WXlOjjLrfTIt8iwjte2qR9BRxy1Y3RTZBJWDAuLRMc3Psk2qkrk6l22tU2BP0b nobgmQxAD4CQnCQA42vXCEUTB2gLqraRdkfbN+kKXhZohRYJmKM43QvICy87SVCnQOow63 QDpFCn03RiKLGygUXq7EluRX2AtQMgKDqYGFgz3sjmTP8G1yCpk3FHyEL092Pyz+d/ZEws CypLKQ/lKiAkZL/XR6cA1MXwFFal7FH5pcDbyfTAH62PbpzkBO1hqGv9UcyFIm+1F4orxt c2zZPve+fbJtJuP5PI/749L8LvAmMOGJMxV+564wcM6P+AxxWOZuqSJOsN/lKA== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=hotmail.com header.s=selector1 header.b=gZhwY1i8; arc=pass ("microsoft.com:s=arcselector9901:i=1"); dmarc=pass (policy=none) header.from=hotmail.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" ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1697110421; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=udFgYm9Y5EBG6/QEOIpiiDC2SDHkFPPxdvKKdtpX3LE=; b=QL7N2JJ8K+n6PH/enhlO3lrIQfUn5hWMyBANdX92axeMQvzVXTJJb9o+WE7YdwpNN1LaXi CT3J6mdItNUn/cDbIVoF1+CiBpwP2VjDuRaz3Sf9caPZI72FaMTmy+yUcXVcUpmFYNfW0T x4L6nS5cDzLHDUAhGqUUMJdWUWtGsE/qcPgrPYMiFAg8acmBlm9xGWvn8+N7qqdhNROW29 THrpOEj4h208nFyZNKY/07G9RWQ8RPWmTJzJKt2DgSdA4bKd3OYkRPNioTvOdk7hdJtb/7 y6jPAZvcwWbaUhE6Yzumo/GSZrGrfNLMdd+kWUOIRU6Cc+VNC1a4X3RknQuOeg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qqtw0-00017x-PI; Thu, 12 Oct 2023 07:32:56 -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 1qqtJG-0001OG-Uk for emacs-orgmode@gnu.org; Thu, 12 Oct 2023 06:52:55 -0400 Received: from mail-dbaeur03olkn20831.outbound.protection.outlook.com ([2a01:111:f400:fe1a::831] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qqtJ9-0005Ua-HK for emacs-orgmode@gnu.org; Thu, 12 Oct 2023 06:52:53 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HGTLjRf2N1VcCc+3Qi0R1oVtsBfhQ/HuJD4+gYfwYhLJayy5Ghi/X+8idHkKWnzyxmnl1r3LNw3fj71T5koQGQlv8gATWPcob8nRFLsEel4TNmNXgtlPT4aYPxxsJykYm2N5VGigJN4fugJ3sVRt0AjwhlQDxtNEqTk5C2M4NbnqfrVBPdXRijmVn8QCAWS/YISqP3iOWAhow+02tnDQ6FhIsVbQ4kbDOU7efRn/FvJaE8sURCFYDa0vz6n+n5/Fi3kNJ4SZkDnpxfem4kdx+I6W17G+GqMLKZ+2Mrz9ovhO20CyPLfGrzABZnzpwyI/yKPqVeSQiTmYNxiqDp6ZGw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=udFgYm9Y5EBG6/QEOIpiiDC2SDHkFPPxdvKKdtpX3LE=; b=axfMM4UAeKukdYd3TMPV0CJLvdpsAS2BG18OLF05LC+MyYFr74ahzSGBxdpEI13pwuDcPhPRFbrleEP2wQvk/Fi14XN+sfLB/93LY0AiRnFVS0JnzqlzA02xAFn2DLqQVazz0H8IcLkzwz91lPFMqOBQlE9Lpd8+s2/uCRD8zZBj8BfRCFijx6dZpCeA2w18BeEaP+l5qKKVQMYFsxl17+umO+yOjwcZuwxdqKh3WV+m+D2dzeLkl0gRcw3mF0J28E5qVQwnS+UXvKkNi/9YMeSz00r7O+JcjTMCIIYm0v30UztKiSLeTS+tzdviACDA8dJ3+yOsPi4+pX4AxwVlXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hotmail.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=udFgYm9Y5EBG6/QEOIpiiDC2SDHkFPPxdvKKdtpX3LE=; b=gZhwY1i8tZNLHc4sJjbwtKEbB5nrPJt94JsBmwWniRvwJbOqps4YK8xSvf2DmvqFQauM1hs+XrfHAgwAs9WSpHTvBTInIKEPHT5V5mTZq3Vys6EbNUP06p2/2zezqOZGktirBDcjgb3dEol9XzZJjhbpdwVpyXC1qIvBXzDAWkAsR/YBFsk9lkMgB8bCFBHtzQUbIt/Kg45IDuwCMxviV26+IepLcaJ0lylf4Vt1phP/ckJDnE9KYRh+eiwor6Gc8hstB85QPxFIFFby9w9KNHMoHm7NFxglHqUpjMdhrGoeiLOuTKH6vbbf79BOafKYkV/MTx7MEzT13sbm4lRjnQ== Received: from AS8P193MB2413.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:448::6) by DB9P193MB1628.EURP193.PROD.OUTLOOK.COM (2603:10a6:10:2a1::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6863.43; Thu, 12 Oct 2023 10:47:42 +0000 Received: from AS8P193MB2413.EURP193.PROD.OUTLOOK.COM ([fe80::28dc:2b00:340b:f5f0]) by AS8P193MB2413.EURP193.PROD.OUTLOOK.COM ([fe80::28dc:2b00:340b:f5f0%7]) with mapi id 15.20.6838.033; Thu, 12 Oct 2023 10:47:42 +0000 User-agent: mu4e 1.6.10; emacs 28.1 From: Andrea To: emacs-orgmode@gnu.org Subject: [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/)] Date: Thu, 12 Oct 2023 11:33:57 +0100 Message-ID: Content-Type: text/plain X-TMN: [/BNxRsypP8OHZEvD/wHEEfbToZ2n8q4viTY0oBv9nNNY3WPLDrf0LpKwmbySCXqI] X-ClientProxiedBy: LO4P123CA0591.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:295::13) To AS8P193MB2413.EURP193.PROD.OUTLOOK.COM (2603:10a6:20b:448::6) X-Microsoft-Original-Message-ID: <87cyxk3yno.fsf@hotmail.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AS8P193MB2413:EE_|DB9P193MB1628:EE_ X-MS-Office365-Filtering-Correlation-Id: 93fa9ad9-9f57-4800-fdf9-08dbcb10a8d9 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: BDNKJcw5iTVgUX/5a+IVP/Y8twfIetasCcjL/XOBlbIkkVdaW7z72fjoi51bNG3EtqSaMH5QP4f5u4lSor0eraS3yWjhNsCDbngzAaXytcON3VUfbynV4vblCLP6b9y5EiUO48EOoA6K4CcwEsI4J//+Gxh48lmULfGBgP0nOZUU3L4mjVhV0S+xD0HvF58ZEayDvBaQSdS0L4XLPfdGpe4g68l4I079MbSxtsBc/Jqb3jGSM7B7eQ8MfkOAet36B1N4XVrskZUQEjxaRt56FXKd89grlaKuprUlAMzO6tPQTG7vU5YE9QRq0OPxW1pmBZZUXMVolaSBF+T6ct6VOhmfUqAOeH+6Fu8kLX6hpfyYcxfUG7Wsxqsnhkbzr6eLb+UewvxxOXLq/9m32bzCya/7uPAsfcKo6qq2dH77X5EVh6+ozObi2qARHaCyIbW22IQLucjWmWTZ65n1tRUi/8qAq8OA6uPYCzgSUwwZg8Z3uXdnA4OXw9RO6E8l0bAWcKgZvEot2KUIYkKoeP3lpaf/xTtLbZcnSD/X9Ic5yYSvAPHyfRq7SlRy/0caizqX X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?bwYdgQ0WV4IN6zWyP/TiY2hHJCj0ZwMo2grB+r/68ylkHbc6KgxVKWQU/ByF?= =?us-ascii?Q?hfFZkjH4/Nnda2Gz9d5W2I+6giKdL1o4NleZDy81tzQfX8pPNhf372u+WRqE?= =?us-ascii?Q?3L1ExYamStrhA8ho1HpWiVVL7FqVyx1O9RkkrEhKyeF1X11xZ7cT3BW1cY8z?= =?us-ascii?Q?wTk2ExO3+3y8NQK5amVrcpc42AxPlrihUDT2aXQnJgdvkulM1s3xIu7pHQpr?= =?us-ascii?Q?St3EuFAQ2RG2q1OTLZnqF0F1coZrpQutDS7npQMlycQy1ZPXrfA0pf/xbgR0?= =?us-ascii?Q?64K7fW91MWyRNFEICspOCHAuTf8HW4GDPZ/BS2hc8r16aerOGzc8RHLWZBs1?= =?us-ascii?Q?wE5tUaepLHPdKMnmgDnPqL2xHIvtU2j+rUXBHA7EAslyCMtNxRu8MmYWql9y?= =?us-ascii?Q?skwJJiMmMHtBPDePxvfy0tXJHEahiDRvCrOp0/ZqAHyEBx9KklQn+QeRJGIH?= =?us-ascii?Q?I5DWcZ3jHzx7SdRlnCIgg+d/VCFNdoddcgXkpY0uwkE24Uw/Nb62Qc2tAQZx?= =?us-ascii?Q?C01OeQsljAuiHNG0IgPrZCyFLyZqJjQGsAmfeEfdcbAdBFprrRRYP4UbfCva?= =?us-ascii?Q?0ij7WVphEOrTh7C7u+iuQcvgOcq70PGJbuaoMq1Bp03s+28xi9/u23sQhKkv?= =?us-ascii?Q?iSyuVkUMCW9bmD3wNiEn1T95J4OPKrmPnze5SjZ05leyEIxE/9LDOVStp5A7?= =?us-ascii?Q?ALaW9DUVPt7BxBFr8YVzhRFu0jvl11UeWQeN3EnOXCDc26YSlQu7F1UVvriN?= =?us-ascii?Q?OCMD8wHSU4f2P4PrfiwBKFubxDSyLRndJ65PUC/KeyaIHRND6WCFdrZaXjXh?= =?us-ascii?Q?OMIZkAX7AJB95hBV+LHaURIgSqdleYXD5C+B6K8EV1g4pw8ns7G4fh2WMzxC?= =?us-ascii?Q?SSEVMFh9o086BElu85mSJkbxtSx9RT98YZSaArZc7AWDLAT+N78UEA2diLVn?= =?us-ascii?Q?gmbVdPathdtqRaTW2zYE4pewYx5p9W3lQxAJJDl1YZI2ZsrEoOSjeQvrYljG?= =?us-ascii?Q?ZMOgsXppugBzOqml4ZyIomIZy0ZG84hhE2+aXC4ORejyIHOFAGPKvCcKfo0g?= =?us-ascii?Q?ca2lY4rxcVvdg9yR7zUaCyT0mzrTyrQzoqtwXyzwK142bG7P0ezRHw48PwPW?= =?us-ascii?Q?Lws8tN60xoLafpQgpPwmv2aREJrCh5TCj8hPD0wK2nWLWcgj4E4x/uMr0WCl?= =?us-ascii?Q?x/NcmhFS21OYoo9xZBbZFB2UQC3OwzYmO1UCbExjiq6Vs45ln6/z3lMx3UCv?= =?us-ascii?Q?XHIVEp7HNm7y78rh5/d6YhoGrF9f7YWqTVRWosnel7F9T2ZNLE+/2Z+6/DXH?= =?us-ascii?Q?WC8=3D?= X-OriginatorOrg: sct-15-20-4755-11-msonline-outlook-80ceb.templateTenant X-MS-Exchange-CrossTenant-Network-Message-Id: 93fa9ad9-9f57-4800-fdf9-08dbcb10a8d9 X-MS-Exchange-CrossTenant-AuthSource: AS8P193MB2413.EURP193.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Oct 2023 10:47:42.6467 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9P193MB1628 Received-SPF: pass client-ip=2a01:111:f400:fe1a::831; envelope-from=andrea-dev@hotmail.com; helo=EUR03-DBA-obe.outbound.protection.outlook.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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Thu, 12 Oct 2023 07:32:55 -0400 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-Scanner: mx1.migadu.com X-Migadu-Spam-Score: -10.43 X-Spam-Score: -10.43 X-Migadu-Queue-Id: CB6133D8F8 X-TUID: AdlfNxIqvztq Hello, thanks for maintaining the great Org Mode! I have been keeping a literate Org Mode configuration for my init file. This means that I have tons of src blocks looking like #+begin_src emacs-lisp :tangle yes ... #+end_src 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. Not totally sure if this is had something to do with my configuration, I always solved this by adding some spaces before my blocks (it doesn't make sense, but strangely tended to work). 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 )) With that my problem seems resolved. I think that code is weird because using a when clause causes a possible nil value for that binding. But we may still use the target-file input to save the day, no? Any chance I found a bug? Best, Andrea Emacs : GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.16.0) of 2022-05-31 Package: Org mode version 9.6.9 ( @ /home/andrea/.emacs.d/elpa/org-9.6.9/)