unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: defun.foo@proton.me
Cc: 56643@debbugs.gnu.org
Subject: bug#56643: 29.0.50; Help-mode bookmarks not loading with native compilation
Date: Tue, 19 Jul 2022 19:49:23 +0300	[thread overview]
Message-ID: <83k089m4j0.fsf@gnu.org> (raw)
In-Reply-To: <mwm19QUBOCK9jDlMUc4jtyHFCGIUduFARvm89uVMQ-9HNe5SpaZzzjtHIa6XbNBcD2NUL7sqmr-TL71gB0ss4cuDhCMnzxJ-b-SaIHYafoE=@proton.me> (bug-gnu-emacs@gnu.org)

> 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" <bug-gnu-emacs@gnu.org>
> 
> 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 . #<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_9>)
>  (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\x01!\205\a\0\211\x18\302\x02!)\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.





  reply	other threads:[~2022-07-19 16:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-19 13:45 bug#56643: 29.0.50; Help-mode bookmarks not loading with native compilation defun.foo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-19 16:49 ` Eli Zaretskii [this message]
2022-07-19 22:22   ` defun.foo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-20  9:51     ` Andrea Corallo
2022-07-20 11:21     ` Andrea Corallo
2022-07-20 11:45       ` Eli Zaretskii
2022-07-20 18:31         ` Andrea Corallo
2022-07-20 19:16           ` Eli Zaretskii
2022-07-20 22:47             ` Michael Heerdegen
2022-07-21  5:13               ` Eli Zaretskii
2022-07-21 10:01                 ` defun.foo--- via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-21 12:33                   ` Eli Zaretskii
2022-07-22 13:40                     ` Eli Zaretskii
2022-07-22 13:41                     ` Andrea Corallo
2022-07-22 14:40                       ` Eli Zaretskii
2022-07-23  9:57                         ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83k089m4j0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=56643@debbugs.gnu.org \
    --cc=defun.foo@proton.me \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).