unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Arthur Miller <arthur.miller@live.com>
Cc: emacs-devel@gnu.org
Subject: Re: Patch: perform autoloading when docs is missing from autoload object
Date: Sat, 18 Sep 2021 09:37:57 -0400	[thread overview]
Message-ID: <jwvmtoa9fxd.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <AM9PR09MB4977ED30126607C55E0B1AB596DD9@AM9PR09MB4977.eurprd09.prod.outlook.com> (Arthur Miller's message of "Fri, 17 Sep 2021 23:09:29 +0200")

> I just tested with generated package-quickstart.el file. Below is what I get
> when I M-: (symbol-function 'winum-select-window-0), as both before I
> byte-compiled and after I byte-compiled:

How did you perform the test?

I tested it on my end with the `loaddefs.el` file and "it worked", but
it required several tweaks (like removing the `no-byte-compile:t` from
the file-local variables, and telling `loadup.el` to load `loaddefs`
rather than `loaddefs.el`).

So I wouldn't be surprised if you need to take extra steps to convince
Emacs to compile the file and to load the compiled version of the file.

> So the entire business of docs in autoloads is due to autoload file generation,
> seems to me, if I don't misunderstanding something?

I'm afraid I don't know what you mean by "business of docs in autoloads".

> I certainly have no problems if autoloads generation is fixed and
> built-in autoloads file generator emitted byte offsets instead of kilo
> bytes of fully embedded docs.

Indeed, I think we should be possible to change `autoload.el` so that it
directly generates the "comment + byte-offsets" form in the .el files
so we don't even need to byte-compile them.  Not sure if it's a better
than byte-compiling them.

> But there is the case that nil is a valid value for doc in autoload
> object, and thus I think it is still important to fix help system, to
> fetch docs on demand.

That's true.  We could also just always use nil and always load the
source file to find the doc.  I'm not sure in that case it'd be worth
the trouble trying to avoid loading the whole file (I think it'd take
a fair bit of effort to make it work reliably enough).


        Stefan




  reply	other threads:[~2021-09-18 13:37 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 13:51 Patch: perform autoloading when docs is missing from autoload object Arthur Miller
2021-09-15 18:14 ` Stefan Monnier
2021-09-15 22:29   ` Arthur Miller
2021-09-17 16:38     ` Stefan Monnier
2021-09-17 16:56       ` Generic autoloading? [Was Patch: perform autoloading when docs is missing from autoload object] Qiantan Hong
2021-09-17 19:36         ` Stefan Monnier
2021-09-17 19:51           ` Qiantan Hong
2021-09-17 21:25         ` Arthur Miller
2021-09-17 21:09       ` Patch: perform autoloading when docs is missing from autoload object Arthur Miller
2021-09-18 13:37         ` Stefan Monnier [this message]
2021-09-18 18:25           ` Arthur Miller
2021-09-20 17:02             ` Stefan Monnier
2021-09-22 16:18               ` Arthur Miller
2021-09-16 12:51 ` Lars Ingebrigtsen
2021-09-17  6:49   ` Arthur Miller
2021-09-17 14:01     ` Lars Ingebrigtsen
2021-09-17 15:04       ` Arthur Miller
2021-09-18 13:21         ` Lars Ingebrigtsen
2021-09-18 16:03           ` [External] : " Drew Adams
2021-09-18 17:34             ` Arthur Miller
2021-09-18 17:31           ` Arthur Miller
2021-09-18 17:53             ` Lars Ingebrigtsen
2021-09-18 18:38               ` Arthur Miller

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=jwvmtoa9fxd.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=arthur.miller@live.com \
    --cc=emacs-devel@gnu.org \
    /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).