unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist
@ 2014-03-29  1:36 Glenn Morris
  2014-03-29  2:26 ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-03-29  1:36 UTC (permalink / raw)
  To: 17137

Package: emacs
Version: 24.3.50

finder.el has finder--builtins-alist to associate directories with packages.
autoload-generate-file-autoloads does not respect this, leading to

  (push (purecopy '(project-am 0 0 3)) package--builtin-versions)

in loaddefs.el, from ede/project-am.el.
This file should be associated with the ede package, per
finder--builtins-alist.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist
  2014-03-29  1:36 bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist Glenn Morris
@ 2014-03-29  2:26 ` Stefan Monnier
  2014-03-29  2:43   ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2014-03-29  2:26 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17137

>   (push (purecopy '(project-am 0 0 3)) package--builtin-versions)
> in loaddefs.el, from ede/project-am.el.
> This file should be associated with the ede package,

Then the file should have a "Package: ede" header.  Or it should not
have a "Version:" header.


        Stefan





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist
  2014-03-29  2:26 ` Stefan Monnier
@ 2014-03-29  2:43   ` Glenn Morris
  2014-03-29 19:40     ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-03-29  2:43 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17137

Stefan Monnier wrote:

>>   (push (purecopy '(project-am 0 0 3)) package--builtin-versions)
>> in loaddefs.el, from ede/project-am.el.
>> This file should be associated with the ede package,
>
> Then the file should have a "Package: ede" header.  Or it should not
> have a "Version:" header.

As I see it, finder.el has already solved this problem, without
requiring changes in the individual files that make up a package.

Anyway, if you want to solve it the other way, lisp/ede/dired.el also
has a Version header. That one is especially fun, since it would lead to
a version for a "dired" package.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist
  2014-03-29  2:43   ` Glenn Morris
@ 2014-03-29 19:40     ` Stefan Monnier
  2014-03-31 17:58       ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2014-03-29 19:40 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17137

>>> (push (purecopy '(project-am 0 0 3)) package--builtin-versions)
>>> in loaddefs.el, from ede/project-am.el.
>>> This file should be associated with the ede package,
>> Then the file should have a "Package: ede" header.  Or it should not
>> have a "Version:" header.
> As I see it, finder.el has already solved this problem, without
> requiring changes in the individual files that make up a package.

Then maybe autoload.el could use that same approach.  I know nothing
about it, so I can't judge.

I also remember now that maybe autoload-generate-file-autoloads should
simply use autoload-file-load-name instead of file-name-nondirectory.


        Stefan





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist
  2014-03-29 19:40     ` Stefan Monnier
@ 2014-03-31 17:58       ` Glenn Morris
  2014-03-31 18:43         ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-03-31 17:58 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17137

Stefan Monnier wrote:

> I also remember now that maybe autoload-generate-file-autoloads should
> simply use autoload-file-load-name instead of file-name-nondirectory.

Can package names contain "/" characters?

Anyway, the easy solution is to remove Version: as you suggested. I
don't think just setting Package: would work, without also setting
Version: to match whatever the actual package version is (because you
would get a random Version: associated with Package: depending on what
order the files were scanned in).

IMO the problem is that "Version" is a very generic header that people
were using before package.el was invented, and now package.el seems to
want complete ownership of it.

But since this autoloads issue only affects things that ship with Emacs,
we can simply fix up the headers as needed.

Perhaps finder-compile-keywords should somehow issue a warning if it
finds a Version: header in the "wrong" file.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist
  2014-03-31 17:58       ` Glenn Morris
@ 2014-03-31 18:43         ` Stefan Monnier
  2014-03-31 18:51           ` Glenn Morris
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2014-03-31 18:43 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17137

>> I also remember now that maybe autoload-generate-file-autoloads should
>> simply use autoload-file-load-name instead of file-name-nondirectory.
> Can package names contain "/" characters?

Don't see why not.

> IMO the problem is that "Version" is a very generic header that people
> were using before package.el was invented, and now package.el seems to
> want complete ownership of it.

Only for files bundled with Emacs.  That's only a problem for
"sub-packages" (i.e. with a file that's a member of a large package has
its own Version: for some reason).

> Perhaps finder-compile-keywords should somehow issue a warning if it
> finds a Version: header in the "wrong" file.

If we can do that, it would be nice, yes.


        Stefan





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist
  2014-03-31 18:43         ` Stefan Monnier
@ 2014-03-31 18:51           ` Glenn Morris
  2014-04-01  0:54             ` Stefan Monnier
  0 siblings, 1 reply; 8+ messages in thread
From: Glenn Morris @ 2014-03-31 18:51 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: 17137

Stefan Monnier wrote:

>>> I also remember now that maybe autoload-generate-file-autoloads should
>>> simply use autoload-file-load-name instead of file-name-nondirectory.
>> Can package names contain "/" characters?
>
> Don't see why not.

I'm thinking of things like NAME-readme.txt, where NAME is eg FOO/BAR.
I would not be surprised if package.el starts throwing "No such
directory: FOO" errors. But I haven't bothered to check. A quick glance
shows that it always calls make-directory with PARENTS non-nil, so maybe
it all works out.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist
  2014-03-31 18:51           ` Glenn Morris
@ 2014-04-01  0:54             ` Stefan Monnier
  0 siblings, 0 replies; 8+ messages in thread
From: Stefan Monnier @ 2014-04-01  0:54 UTC (permalink / raw)
  To: Glenn Morris; +Cc: 17137

>>>> I also remember now that maybe autoload-generate-file-autoloads should
>>>> simply use autoload-file-load-name instead of file-name-nondirectory.
>>> Can package names contain "/" characters?
>> Don't see why not.
> I'm thinking of things like NAME-readme.txt, where NAME is eg FOO/BAR.

Indeed, the GNU ELPA build scripts will likely fail somewhere with
a foo/bar-NN.MM.el or foo/bar-NN.MM.tar as well, and package.el will
probably burp on those as well.

> I would not be surprised if package.el starts throwing "No such
> directory: FOO" errors.

So, we can have such foo/bar packages bundled with Emacs but we won't be
able to move them out into GNU ELPA, so there's no point having them in
package-builtins.


        Stefan





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-04-01  0:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-29  1:36 bug#17137: autoload-generate-file-autoloads should respect finder--builtins-alist Glenn Morris
2014-03-29  2:26 ` Stefan Monnier
2014-03-29  2:43   ` Glenn Morris
2014-03-29 19:40     ` Stefan Monnier
2014-03-31 17:58       ` Glenn Morris
2014-03-31 18:43         ` Stefan Monnier
2014-03-31 18:51           ` Glenn Morris
2014-04-01  0:54             ` Stefan Monnier

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).