* Howto fix: package autoload is deprecated
@ 2022-09-14 2:38 T.V Raman
2022-09-14 11:30 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: T.V Raman @ 2022-09-14 2:38 UTC (permalink / raw)
To: emacs-devel
I generate autoloads for emacspeak --- and have used (require
'autoload) for a long time, and failed to notice that package autoload
has been deprecated for a while.
What's the new shiny way of doing this, a code pointer would help.
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Howto fix: package autoload is deprecated
2022-09-14 2:38 Howto fix: package autoload is deprecated T.V Raman
@ 2022-09-14 11:30 ` Eli Zaretskii
2022-09-15 2:02 ` T.V Raman
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-09-14 11:30 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
> From: "T.V Raman" <raman@google.com>
> Date: Tue, 13 Sep 2022 19:38:17 -0700
>
> I generate autoloads for emacspeak --- and have used (require
> 'autoload) for a long time, and failed to notice that package autoload
> has been deprecated for a while.
>
> What's the new shiny way of doing this, a code pointer would help.
From NEWS:
** The autoload.el library is now obsolete.
It is superseded by the loaddefs-gen.el library.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Howto fix: package autoload is deprecated
2022-09-14 11:30 ` Eli Zaretskii
@ 2022-09-15 2:02 ` T.V Raman
2022-09-15 2:54 ` Stefan Monnier
2022-09-15 6:03 ` Eli Zaretskii
0 siblings, 2 replies; 9+ messages in thread
From: T.V Raman @ 2022-09-15 2:02 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=gb18030, Size: 931 bytes --]
Eli Zaretskii <eliz@gnu.org> writes:
Thanks for the loaddefs-gen pointer, worked like a charm.
I note that the NEWS file marks that entry with a "---" to indicate no
manual update is needed; but we should minimally mark the info node on
package 'autoload obsolete, and add a short line somewhere on using or
at least mentioning loaddefs-generate
>> From: "T.V Raman" <raman@google.com>
>> Date: Tue, 13 Sep 2022 19:38:17 -0700
>>
>> I generate autoloads for emacspeak --- and have used (require
>> 'autoload) for a long time, and failed to notice that package autoload
>> has been deprecated for a while.
>>
>> What's the new shiny way of doing this, a code pointer would help.
>
> From NEWS:
>
> ** The autoload.el library is now obsolete.
> It is superseded by the loaddefs-gen.el library.
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
7©4 Id: kg:/m/0285kf1 0Ü8
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Howto fix: package autoload is deprecated
2022-09-15 2:02 ` T.V Raman
@ 2022-09-15 2:54 ` Stefan Monnier
2022-09-15 7:16 ` Lars Ingebrigtsen
2022-09-15 13:56 ` T.V Raman
2022-09-15 6:03 ` Eli Zaretskii
1 sibling, 2 replies; 9+ messages in thread
From: Stefan Monnier @ 2022-09-15 2:54 UTC (permalink / raw)
To: T.V Raman; +Cc: Eli Zaretskii, emacs-devel
T.V Raman [2022-09-14 19:02:42] wrote:
> I note that the NEWS file marks that entry with a "---" to indicate no
> manual update is needed; but we should minimally mark the info node on
> package 'autoload obsolete, and add a short line somewhere on using or
> at least mentioning loaddefs-generate
FWIW, I think the obsoletion(?) of `autoload.el` is a bit rash:
it breaks all existing packages which just called the (formerly)
autoloaded entry points without first doing (require 'autoload).
[ `elpa-admin.el` was luckily spared because it does not call autoload
functions directly but calls `package-generate-autoloads` instead. ]
I wish we could actually throw out most of `autoload.el` altogether by
providing "thin" wrappers for the former entry points but using the new
engine under the hood.
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Howto fix: package autoload is deprecated
2022-09-15 2:02 ` T.V Raman
2022-09-15 2:54 ` Stefan Monnier
@ 2022-09-15 6:03 ` Eli Zaretskii
1 sibling, 0 replies; 9+ messages in thread
From: Eli Zaretskii @ 2022-09-15 6:03 UTC (permalink / raw)
To: T.V Raman; +Cc: emacs-devel
> From: "T.V Raman" <raman@google.com>
> Cc: emacs-devel@gnu.org
> Date: Wed, 14 Sep 2022 19:02:42 -0700
>
> Thanks for the loaddefs-gen pointer, worked like a charm.
>
> I note that the NEWS file marks that entry with a "---" to indicate no
> manual update is needed; but we should minimally mark the info node on
> package 'autoload obsolete, and add a short line somewhere on using or
> at least mentioning loaddefs-generate
What do you mean by "the info node on package 'autoload"? I find no
such node in the manual on the master branch. And loaddefs-generate
is already documented there. Are you perhaps reading an old version
of the ELisp manual, not the one from the master branch?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Howto fix: package autoload is deprecated
2022-09-15 2:54 ` Stefan Monnier
@ 2022-09-15 7:16 ` Lars Ingebrigtsen
2022-09-15 17:16 ` Stefan Monnier
2022-09-15 13:56 ` T.V Raman
1 sibling, 1 reply; 9+ messages in thread
From: Lars Ingebrigtsen @ 2022-09-15 7:16 UTC (permalink / raw)
To: Stefan Monnier; +Cc: T.V Raman, Eli Zaretskii, emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> FWIW, I think the obsoletion(?) of `autoload.el` is a bit rash:
> it breaks all existing packages which just called the (formerly)
> autoloaded entry points without first doing (require 'autoload).
Unless I missed something, all the previously ###;;;autoloaded entry
points should still be available without doing that (see subr.el).
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Howto fix: package autoload is deprecated
2022-09-15 2:54 ` Stefan Monnier
2022-09-15 7:16 ` Lars Ingebrigtsen
@ 2022-09-15 13:56 ` T.V Raman
1 sibling, 0 replies; 9+ messages in thread
From: T.V Raman @ 2022-09-15 13:56 UTC (permalink / raw)
To: monnier; +Cc: raman, eliz, emacs-devel
Agreed, though I've myself now moved past the problem for emacspeak.
The thing that made this particularly hard to debug re the obsoletion
is that the new solution is hard to discover, and even if you remove
(require 'autoload) from your own code, subr.el still pulls that
package in --- and that bit in my opinion is a giant kluge that gives
you the worst of all possible worlds.Stefan Monnier writes:
> T.V Raman [2022-09-14 19:02:42] wrote:
> > I note that the NEWS file marks that entry with a "---" to indicate no
> > manual update is needed; but we should minimally mark the info node on
> > package 'autoload obsolete, and add a short line somewhere on using or
> > at least mentioning loaddefs-generate
>
> FWIW, I think the obsoletion(?) of `autoload.el` is a bit rash:
> it breaks all existing packages which just called the (formerly)
> autoloaded entry points without first doing (require 'autoload).
> [ `elpa-admin.el` was luckily spared because it does not call autoload
> functions directly but calls `package-generate-autoloads` instead. ]
>
> I wish we could actually throw out most of `autoload.el` altogether by
> providing "thin" wrappers for the former entry points but using the new
> engine under the hood.
>
>
> Stefan
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Howto fix: package autoload is deprecated
2022-09-15 7:16 ` Lars Ingebrigtsen
@ 2022-09-15 17:16 ` Stefan Monnier
2022-09-15 18:19 ` T.V Raman
0 siblings, 1 reply; 9+ messages in thread
From: Stefan Monnier @ 2022-09-15 17:16 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: T.V Raman, Eli Zaretskii, emacs-devel
>> FWIW, I think the obsoletion(?) of `autoload.el` is a bit rash:
>> it breaks all existing packages which just called the (formerly)
>> autoloaded entry points without first doing (require 'autoload).
> Unless I missed something, all the previously ###;;;autoloaded entry
> points should still be available without doing that (see subr.el).
Hmm... indeed. Sorry 'bout the noise.
Tho I wonder then if Raman's code could work "unchanged" by just
removing the explicit (require 'autoload).
Stefan
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Howto fix: package autoload is deprecated
2022-09-15 17:16 ` Stefan Monnier
@ 2022-09-15 18:19 ` T.V Raman
0 siblings, 0 replies; 9+ messages in thread
From: T.V Raman @ 2022-09-15 18:19 UTC (permalink / raw)
To: monnier; +Cc: larsi, raman, eliz, emacs-devel
for now, no, because if you remove the (require 'autoload), it gets
pulled in by the hack in subr.el.
My issue was that I 1. had missed the obsoletion, and 2. On my new
laptop, (new as from May) building and installing emacs from HEAD
wasn't replacing the info manuals because of compressed vs
uncompressed install, go figure!
So as Eli suspected I was reading an older manual.
Makes me wonder: when Emacs Info pages are displayed, should the
version info of that info manual be part of the Header line?
Stefan Monnier writes:
> >> FWIW, I think the obsoletion(?) of `autoload.el` is a bit rash:
> >> it breaks all existing packages which just called the (formerly)
> >> autoloaded entry points without first doing (require 'autoload).
> > Unless I missed something, all the previously ###;;;autoloaded entry
> > points should still be available without doing that (see subr.el).
>
> Hmm... indeed. Sorry 'bout the noise.
> Tho I wonder then if Raman's code could work "unchanged" by just
> removing the explicit (require 'autoload).
>
>
> Stefan
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
--
Thanks,
--Raman(I Search, I Find, I Misplace, I Research)
♉ Id: kg:/m/0285kf1 🦮
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-09-15 18:19 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-09-14 2:38 Howto fix: package autoload is deprecated T.V Raman
2022-09-14 11:30 ` Eli Zaretskii
2022-09-15 2:02 ` T.V Raman
2022-09-15 2:54 ` Stefan Monnier
2022-09-15 7:16 ` Lars Ingebrigtsen
2022-09-15 17:16 ` Stefan Monnier
2022-09-15 18:19 ` T.V Raman
2022-09-15 13:56 ` T.V Raman
2022-09-15 6:03 ` Eli Zaretskii
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).