From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id aP55MybiZWN8AwEAbAwnHQ (envelope-from ) for ; Sat, 05 Nov 2022 05:10:14 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id wN9ZMybiZWN9dAEAauVa8A (envelope-from ) for ; Sat, 05 Nov 2022 05:10:14 +0100 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 6B58C1B711 for ; Sat, 5 Nov 2022 05:10:14 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1orAUf-0006PL-N2; Sat, 05 Nov 2022 00:09:17 -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 1orAUd-0006PC-I5 for emacs-orgmode@gnu.org; Sat, 05 Nov 2022 00:09:15 -0400 Received: from mout01.posteo.de ([185.67.36.65]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1orAUb-0002c2-H8 for emacs-orgmode@gnu.org; Sat, 05 Nov 2022 00:09:15 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout01.posteo.de (Postfix) with ESMTPS id F3959240026 for ; Sat, 5 Nov 2022 05:09:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1667621349; bh=hKUSO2n+tNpoFkN/v5tQFIdiRKrPOM+CVvixceEQ8yA=; h=From:To:Cc:Subject:Date:From; b=B7+aif+zThCNifNp7zXIrnXgS7evgCvYmTEWLvXmGr06QybeNdhcIqsB3M1mL7/kT sOgNPnXA+MP6XhDZocbXbojlprKITRGJ97WzZ+dZtGEf0fKGY/XwYP1SrglPxnPsiC xuC0yV7PrJl4X1yw1R6mOludr8dJ2gwAM4SCckQwOBQHDMRBktPEEzLh4YaJV73eZe Y71UClCQ/wposNoQA8M+x4BAjC77Y5mD3sasEdKYaZGUdrFVKGK+lw8DpZZUjqrdAZ 1CdFXG03wxTewXLtZVn56Wj0KWIfguar0wTgiGnVWILEPZa0/j91jVZ3rZMB31BWq+ OI5rZb2krz9Eg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4N43sD1kRYz6tr8; Sat, 5 Nov 2022 05:09:03 +0100 (CET) From: Ihor Radchenko To: alain.cochard@unistra.fr Cc: Org Mode List Subject: Re: Single story around subtree export and footnotes, several issues In-Reply-To: <25445.34286.700495.260710@gargle.gargle.HOWL> References: <25445.34286.700495.260710@gargle.gargle.HOWL> Date: Sat, 05 Nov 2022 04:09:44 +0000 Message-ID: <87pme2f3ef.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=185.67.36.65; envelope-from=yantar92@posteo.net; helo=mout01.posteo.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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: , Sender: "Emacs-orgmode" Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org 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=1667621414; 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=k0ISTDpZ39Bn5pkjh8VQmEUfad/P2TTH/5W7NYl+sM0=; b=CFbO8NRRY5yaMMjsWZEsEXMaNoceAU6HweyMQg9jRsOwQK0sEPdXBYbgE2jk08pTY9G8Mh X4sITZVDJWrElzQsprXxm6E767QK8vTddG1VNfJjG4xOtnrZmb/06u3i4azGWouzFF6vQp ImXFbsbos4sjMikVKqlf+36VF1zVD0hcMk3/VAwRqHGIHBSNDyrNCah2W/3mmv+Vzu+vIx RjW8ylBbAwalSbQs1FlMxT3S9KkniltGcgpCwrYGkuLQgkMaYyU6D4pRZQecbGw9RXxU1Y tJVxXspAy8cUivWa6r0zVrfXnEQatjpPLL/omKJf5UVblw2bSDKaqrpSsWWS1Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1667621414; a=rsa-sha256; cv=none; b=jU7J7bzReM4KlWQmTapP3in0qivtgyWE8P4OTElNNwm8/kvhqP8B+BnSGdcEn1Sr4Ymc2G X1JbnPIBmo9YMRQTolTVog6x1GXWK+nSQV/wYKmDkOZSaN2Wo+p/QwXpVEYq/JWoA/683E 5gk3wkz3UYRxSWkiml4BeyLq1tmremxAq6iC2lAnSnxVmXBGd6llyidRLoTQ8AjrQtignN s4vcmjaAL7ai30FLSFexzAecndavq0krgupL/pDuMa8d/WIzSH3kSC7ANLuhyecquhLgg2 h7roOlB3P50TP/EtalPE1ULnNuTn3yYg6K7JjnlNmCmAivqRNS9+yoDSjuLfXA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=B7+aif+z; 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-Migadu-Spam-Score: -3.30 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b=B7+aif+z; 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-Migadu-Queue-Id: 6B58C1B711 X-Spam-Score: -3.30 X-Migadu-Scanner: scn0.migadu.com X-TUID: E7mBSf+/q5Vz Alain.Cochard@unistra.fr writes: > - 1st issue > > I use 'emacs -Q' > > GNU Emacs 27.2 (build 1, x86_64-redhat-linux-gnu, GTK+ Version > 3.24.30, cairo version 1.17.4) of 2021-08-07 > Org mode version 9.4.4 (release_9.4.4 @ /usr/share/emacs/27.2/lisp/org/) > > and visit the file with 'C-x C-f'. > > I export the subtree with 'C-c C-e C-s l o' on the "subtree to be > exported" headline and get the dreadful > > Wrong type argument: consp, nil Thanks for reporting and for the detailed reproducer! Fixed on main. https://git.savannah.gnu.org/cgit/emacs/org-mode.git/commit/?id=3e010d81dcabafcdd97199b8122491a74ad9cbed > - 4th issue > > I quit emacs, restart it with 'emacs -Q', do 'M-x > toggle-debug-on-error', revisit the original file and export the > subtree again. > > (I get a Backtrace which is about 21000 characters so I ommit it so > far.) > > But the buffer is narrowed; I only see: > > 2nd call to footnote 1[fn:1] > call to footnote 2[fn:2] > [fn:2] footnote 2 body > > - 5th issue > > After widening it with 'C-x n w', I apparently see my original file, > but if I do 'C-x s', and answer 'y' to the following question > (debug3.org is the name of my file): > > Save file /home/cochard/Org/debug3.org? (y, n, !, ., q, C-r, C-f, d or C-h) > > then, using for example 'cat debug3.org' from a terminal, I can see > that the last two lines of the file, i.e., > > * COMMENT commented headline > nothing > > have disapeared. This is because the error terminated export process in the middle of it. Org export uses a temporary buffer copy during export. That buffer is cleaned up to remove commented headings, and whatever parts of the original buffer that should not be exported. When, exporting subtree, the buffer may also be narrowed. You should not know this when things do not err in the middle, which is now fixed. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at