From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#56643: 29.0.50; Help-mode bookmarks not loading with native compilation Date: Tue, 19 Jul 2022 19:49:23 +0300 Message-ID: <83k089m4j0.fsf@gnu.org> References: Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7788"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 56643@debbugs.gnu.org To: defun.foo@proton.me Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jul 19 18:50:14 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oDqQI-0001mx-BQ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 18:50:14 +0200 Original-Received: from localhost ([::1]:55034 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oDqQH-00083w-9h for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 19 Jul 2022 12:50:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38746) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDqQ6-000820-8n for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 12:50:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57319) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oDqQ5-0000Lg-Vi for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 12:50:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oDqQ5-00045a-QC for bug-gnu-emacs@gnu.org; Tue, 19 Jul 2022 12:50:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jul 2022 16:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 56643 X-GNU-PR-Package: emacs Original-Received: via spool by 56643-submit@debbugs.gnu.org id=B56643.165824938415692 (code B ref 56643); Tue, 19 Jul 2022 16:50:01 +0000 Original-Received: (at 56643) by debbugs.gnu.org; 19 Jul 2022 16:49:44 +0000 Original-Received: from localhost ([127.0.0.1]:55078 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDqPo-000451-F2 for submit@debbugs.gnu.org; Tue, 19 Jul 2022 12:49:44 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:54004) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oDqPk-00044k-Sc for 56643@debbugs.gnu.org; Tue, 19 Jul 2022 12:49:42 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:38566) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDqPf-0000EE-AG; Tue, 19 Jul 2022 12:49:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=cDk9/IxbI+By/j48GOnp8qBaId40goKkfxbryeMaCyQ=; b=lit7CkkI1HZM ylUkY5I7HrofyVgKCYz9iFYWXc++LvJ8RPO52aeJoXUlsuS9X0ikofawUCJko8hUQWuUa2nYSNFGC wlk73foBtOtTLgL1+/JXEQuz+VdCWExvqdsXrc9JgIU614x+7ReoR3nwdoHFPcHlTrNrlUyeFKEaW DEWI91b7nJY0bSFX4E4rf+85nVhRccW0Wv0vN630NYzZLffRoI0agW0y/bQn+hSNGCZS5gc16WVOu FzJzEGhkUMIPPl+myWWjsGuo7UlgXVC9x31ad2B9Q+XzFA9ycN5hralFWsRrDiBhgjqftBM1NnmyT D70z1vGxGkz+P5Ko3KOWww==; Original-Received: from [87.69.77.57] (port=3849 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oDqPe-0008FY-QJ; Tue, 19 Jul 2022 12:49:35 -0400 In-Reply-To: (bug-gnu-emacs@gnu.org) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:237458 Archived-At: > Date: Tue, 19 Jul 2022 13:45:19 +0000 > From: defun.foo--- via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > 1. Ensure that native compilation is enabled by running M-x native-comp-available-p > 2. Run M-x describe-function {{any-function}} and move to the resulting *Help* buffer > 3. Create a bookmark with C-x r m > 4. Without quitting Emacs, kill the *Help* buffer, then run C-x r b to jump back to the bookmark (this works as expected) > 5. Quit Emacs (C-x C-c), and restart > 6. Attempt to jump to the same bookmark again (running C-x r b), and observe that the bookmark list fails to load and throws an "Invalid read syntax: '#'" error > > Here is an example of a help bookmark as it was serialized to the bookmarks file (note the "help-fn" value): > > ("native-comp-bookmark" > (position . 1) > (last-modified 25301 49750 590832 312000) > (help-fn . #) > (help-args switch-to-buffer "*scratch*") > (position . 1) > (handler . help-bookmark-jump)) > > For comparison, I compiled Emacs without the native compilation flag (and verified that native-comp-available-p returned nil), and went through the same steps above, creating a new bookmark. Jumping back to the bookmark after restarting works as expected, and here is an example of that bookmark serialized without native comp: > > ("vanilla-bookmark" > (position . 1) > (last-modified 25301 49238 861856 736000) > (help-fn . > #[514 "\301!\205\0\211\302!)\207" > [describe-function-orig-buffer buffer-live-p describe-function] > 4 "\n\n(fn FUNCTION BUFFER)"]) > (help-args switch-to-buffer "*scratch*") > (position . 1) > (handler . help-bookmark-jump)) Thanks. I started looking into this, but gave up when I got to help-mode.el (which is where the bookmark support for *Help* lives, and which is where we signal an error trying to read an unreadable object.) We basically have no usable documentation for what bookmark support in help-mode does. Someone who knows what that code does will have to see how to process a help-fn that is a natively-compiled function.