From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YAeYKK0JjGZFcQEAe85BDQ:P1 (envelope-from ) for ; Mon, 08 Jul 2024 15:45:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id YAeYKK0JjGZFcQEAe85BDQ (envelope-from ) for ; Mon, 08 Jul 2024 17:45:49 +0200 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="EavEI/S8"; 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=1720453549; 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=MprL61XjUuW/H2rlfJcnAuOv8qC9P4oCPfgNSCA30n4=; b=g1okYnPlLkaVWKVqvQo5YlIU5kj5MW+bmDnSTAuGhHAHolTsoBFGTXDX5VfYoC820nULes BYMowq6uZfArOhWz02Ia4+Krv0Sm59mRV4raduZt3jkr0nHAgFFbfhnuLXH8haDMSIM9QM kPtWzjEKnF1VhjVVxrAjYBumKMDKUx6Lg+NTal6ctlwTPWO54GxmFzGBRZ507uY0HGyOjQ sfoJZiyiM35ld2nfRDeTus0Kfo3IEUergkfAnJfmVDOWb3Dctvy5crKF65cb88lFH+oNhj Zc7Oi/yTcw0uaI7q8z7wn9fSnckIpp/j96ls/+Kh+/VjlJ0BdBz08C+8cJOnqA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1720453549; a=rsa-sha256; cv=none; b=cNblQgOmGnb2wF6MfSFP5Cdrg7TGlOHBLGARmLNB3qVRxs0MT/YBbMFZbxtAb4ZifAMTkH sOf48NgKDoPFjwjp3LMNJbm15Lt/yaVYKKMO3z2dmicnJNiZb2FedLANzB+mFRarBJR0ZU 9mXCQKd3COL3E7E+WgpMOXDfIPkMYIIHAp2eZqC7aYSuw72XrU5N3qk773dUaQH5yTAu5p sVFmTcd63e1Zu9RpPsv1DVkZe7o7SKt4nyWogTEd+Oc8QWg3vKdOVbzwarRuUCR0DPzzIj 5U7KUQ0xH4COWmNw3+m9lzMnbdGuK2a1toz9Os6TwxS+W5/6lN3rVbq2FYgaLw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=posteo.net header.s=2017 header.b="EavEI/S8"; 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" 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 775FA34C30 for ; Mon, 8 Jul 2024 17:45:49 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sQqYU-0003q9-Sz; Mon, 08 Jul 2024 11:45:31 -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 1sQqYR-0003pU-7m for emacs-orgmode@gnu.org; Mon, 08 Jul 2024 11:45:28 -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 1sQqYN-0003Bh-O1 for emacs-orgmode@gnu.org; Mon, 08 Jul 2024 11:45:26 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id AC680240103 for ; Mon, 8 Jul 2024 17:45:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1720453520; bh=Mtr5axPtdtojP9CkScQ0RDySOU9+1VNVRqrFduznrbQ=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version:Content-Type: From; b=EavEI/S8um+6WdONQWX7i597qkxZrilHknaAyzUzZOwqpTUb8TGIfgYfTHnUPnsJJ XMd5OGL7epAv0rehzr6Y6IJGVAtjyrVp8hJ3YlqX+0zcBrBN3GlvXalr5HBTU+hjjT z/q9HDy51F+SujW/uYvk+dC+9LI4qm3taqJKDZe3b79DW1/ad94NhhKLVrzpy/GZlw 98v9L+E+WJsRUWkFMIKiqVYJegU5hCL4C5REh5xXrEVL3zSlpiF/E+tQmqvbq5mOUQ ykJq12PsF95kKxXmLFTdrHwD793JrYdid82/gwYT0dt00wnr/TtqJuP2KJIcclWuzu 37G8OeEpnKEGw== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4WHpNc00Lfz9rxB; Mon, 8 Jul 2024 17:45:19 +0200 (CEST) From: Ihor Radchenko To: Michael Mauger Cc: "emacs-orgmode@gnu.org" Subject: Re: 31.0.50; Org Persist file formatting In-Reply-To: References: Date: Mon, 08 Jul 2024 15:46:54 +0000 Message-ID: <87r0c3zy1d.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_H3=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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 775FA34C30 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: -9.62 X-Spam-Score: -9.62 X-TUID: U81eCRduRIhk Michael Mauger writes: > This bug has been difficult to reproduce but several people have > encountered it, or symptoms of it. Most recently, there has been this > thread on Reddit: > https://www.reddit.com/r/emacs/comments/1drxsz6/tangled_0_code_blocks_from_filename_problem/ > > Unfortunately, replicating on emacs -Q has proven impossible since -Q > disables some of the implicated features. My Emacs config is contained > in Org Babel files that are invoked with `org-babel-tangle-file' and have > demonstrated the error multiple times. Thanks for reporting! > After some poking around I started getting failure when I tried to > reopen an Org file or ran `normal-mode' on it. Shutting down emacs and > restarting cleared the issue. When the issue arose when reopening the > file within a session, the backtrace was pointing to `plistp' failing in > `org-persist-read'. When I looked at the persist index there were > entries like: > > (:container > ((elisp org-element--headline-cache) (elisp org-element--cache) > (version "2.3")) > :persist-file "49/605653-361a-49a4-a000-47db8d522096" :associated > (:hash "aa1176747642fdac45aaf96095a88367" :file > "/home/michael/Projects/my-config/emacs/my-org.org" :inode > 2554490) > :expiry 30 :last-access 1719791738.4428508 :last-access-hr > "2024-06-30T19:55:38-0400" ...) > > (Note: the "..." in the last entry; sometimes it showed up as "\...".) This is curious. May it be that you have non-default value of `pp-default-function'? > The failure during tangling occurred with `org-get-heading' expecting > `stringp' but getting `nil'. That seemed to be tracked down to > `org-complex-heading-regexp' not being set yet. If an error had aborted > out of the `org-persist-read' it appears we could have half of org-mode > up but not everything properly initialized. Sounds right. > Looking at the code in `org-persist.el' in > `org-persist--write-elisp-file (file data &optional no-circular pp)' > around line 486 it handles calling `pp' or `prin1'. The code for `pp' > uses `pp-use-max-width' (as part of a bug fix #58687) which has since > been superseded in Emacs 30. Yes, it should be fixed. I did not know that they quickly obsoleted that variable. > It looks like the `org-persist-write' code ought to be updated and the > `org-persist-read' code made more robust so that it does not just shut > down processing of Org files entirely. That is if the entry is not a > plist, act as though no entry exists and proceed as if it were a new > org file. Yes. The case when the contents of index file is a valid Elisp data, but not the data we expect is currently not covered. It should be. -- Ihor Radchenko // yantar92, Org mode contributor, Learn more about Org mode at . Support Org development at , or support my work at